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": {
        "expiresAfter": 1769692563352,
        "nonce": 1769688963352
      },
      "type": "1311"
    },
    "signature": "0xb429a7136360bdc0dc128730c194ca6e718de8ccd2ae2acc8e11c9cdf86acb29...",
    "nonce": 1769688963352
  }'
{
  "tx_hash": "0x7c573d0d802c800a58793bb378b89773f28c2505bcca19f7c20b0ab0e4d66e9e",
  "tx_type": 1311,
  "error": "",
  "data": {
    "success": "true",
    "orders_cancelled": 42
  },
  "address": "0x9908658A316D743159F001026F1ef08aa8F0b55B"
}
Use the underlying JSON-RPC style cancelAll method over HTTP, or call the higher-level cancel_all / cancelAll methods on the ExchangeClient SDK to cancel all orders for the account. Method: POST https://api.hotstuff.trade/exchange
curl --request POST \
  --url https://api.hotstuff.trade/exchange \
  --header 'Content-Type: application/json' \
  --data '{
    "action": {
      "data": {
        "expiresAfter": 1769692563352,
        "nonce": 1769688963352
      },
      "type": "1311"
    },
    "signature": "0xb429a7136360bdc0dc128730c194ca6e718de8ccd2ae2acc8e11c9cdf86acb29...",
    "nonce": 1769688963352
  }'
{
  "tx_hash": "0x7c573d0d802c800a58793bb378b89773f28c2505bcca19f7c20b0ab0e4d66e9e",
  "tx_type": 1311,
  "error": "",
  "data": {
    "success": "true",
    "orders_cancelled": 42
  },
  "address": "0x9908658A316D743159F001026F1ef08aa8F0b55B"
}

Request Body

action
object
required
{
  "data": {
    "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.successStringSuccess status
data.orders_cancelledNumberNumber of orders cancelled
addressStringUser wallet address in hexadecimal format
This is a bulk operation and should be used carefully in production trading systems.