Skip to main content
POST
https://api.hotstuff.trade
/
exchange
curl --request POST \
  --url https://api.hotstuff.trade/exchange \
  --header 'Content-Type: application/json' \
  --data '{
    "action": {
      "data": {
        "cancels": [{"oid": 136085931, "instrumentId": 1}],
        "expiresAfter": 1769692246080,
        "nonce": 1769688646080
      },
      "type": "1302"
    },
    "signature": "0xcb6f241ea57879a6e3cf90de61a78fa0ab9dd856361bd7552acc3e4e8b07017d...",
    "nonce": 1769688646080
  }'
{
  "tx_hash": "0x4a27b7e1fd48bda04e338c7300b2dac46c790f8625a67811f98cc7dde4d8b1c2",
  "tx_type": 1302,
  "error": "",
  "data": {
    "status": {
      "canceled": [
        { "oid": 136085931, "instrumentId": 1 }
      ]
    }
  },
  "address": "0x9908658A316D743159F001026F1ef08aa8F0b55B"
}
Use the underlying JSON-RPC style cancelByOid method over HTTP, or call the higher-level cancel_by_oid / cancelByOid methods on the ExchangeClient SDK to cancel specific orders by exchange order ID (oid). Method: POST https://api.hotstuff.trade/exchange
curl --request POST \
  --url https://api.hotstuff.trade/exchange \
  --header 'Content-Type: application/json' \
  --data '{
    "action": {
      "data": {
        "cancels": [{"oid": 136085931, "instrumentId": 1}],
        "expiresAfter": 1769692246080,
        "nonce": 1769688646080
      },
      "type": "1302"
    },
    "signature": "0xcb6f241ea57879a6e3cf90de61a78fa0ab9dd856361bd7552acc3e4e8b07017d...",
    "nonce": 1769688646080
  }'
{
  "tx_hash": "0x4a27b7e1fd48bda04e338c7300b2dac46c790f8625a67811f98cc7dde4d8b1c2",
  "tx_type": 1302,
  "error": "",
  "data": {
    "status": {
      "canceled": [
        { "oid": 136085931, "instrumentId": 1 }
      ]
    }
  },
  "address": "0x9908658A316D743159F001026F1ef08aa8F0b55B"
}

Request Body

action
object
required
{
  "data": {
    "cancels": [{
      "oid": Number,
      "instrumentId": Number
    }],
    "expiresAfter": Number,
    "nonce": Number
  },
  "type": String
}
signature
string
required
Signed payload in hexadecimal format
nonce
number
required
Current timestamp in milliseconds

Response

FieldTypeDescription
tx_hashStringTransaction hash in hexadecimal format
tx_typeNumberTransaction type identifier
errorStringError message if request failed, empty string on success
dataObjectResponse data object containing cancel status
data.statusObject | nullCancel status, null if error
addressStringUser wallet address in hexadecimal format