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": [{"cloid": "9c29fda4-79b4-47da-a788-568703333134", "instrumentId": 1}],
        "expiresAfter": 1769692246080,
        "nonce": 1769688646080
      },
      "type": "1303"
    },
    "signature": "0xcb6f241ea57879a6e3cf90de61a78fa0ab9dd856361bd7552acc3e4e8b07017d...",
    "nonce": 1769688646080
  }'
{
  "tx_hash": "0x4a27b7e1fd48bda04e338c7300b2dac46c790f8625a67811f98cc7dde4d8b1c2",
  "tx_type": 1303,
  "error": "",
  "data": {
    "status": {
      "canceled": [
        { "cloid": "9c29fda4-79b4-47da-a788-568703333134", "instrumentId": 1 }
      ]
    }
  },
  "address": "0x9908658A316D743159F001026F1ef08aa8F0b55B"
}
Use the underlying JSON-RPC style cancelByCloid method over HTTP, or call the higher-level cancel_by_cloid / cancelByCloid methods on the ExchangeClient SDK to cancel by client order ID (cloid). 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": [{"cloid": "9c29fda4-79b4-47da-a788-568703333134", "instrumentId": 1}],
        "expiresAfter": 1769692246080,
        "nonce": 1769688646080
      },
      "type": "1303"
    },
    "signature": "0xcb6f241ea57879a6e3cf90de61a78fa0ab9dd856361bd7552acc3e4e8b07017d...",
    "nonce": 1769688646080
  }'
{
  "tx_hash": "0x4a27b7e1fd48bda04e338c7300b2dac46c790f8625a67811f98cc7dde4d8b1c2",
  "tx_type": 1303,
  "error": "",
  "data": {
    "status": {
      "canceled": [
        { "cloid": "9c29fda4-79b4-47da-a788-568703333134", "instrumentId": 1 }
      ]
    }
  },
  "address": "0x9908658A316D743159F001026F1ef08aa8F0b55B"
}

Request Body

action
object
required
{
  "data": {
    "cancels": [{
      "cloid": String,
      "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
This is useful when you assign custom client IDs to your orders and want to cancel them without tracking the numeric exchange oid.