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": {
        "orders": [{
          "instrumentId": 1,
          "side": "b",
          "positionSide": "BOTH",
          "price": "92291",
          "size": "0.00597",
          "tif": "IOC",
          "ro": false,
          "po": false,
          "cloid": "9c29fda4-79b4-47da-a788-568703333134",
          "triggerPx": "",
          "isMarket": true,
          "tpsl": "",
          "grouping": ""
        }],
        "expiresAfter": 1769690725903,
        "nonce": 1769687125903
      },
      "type": "1301"
    },
    "signature": "0xe39195212e76aa39cb8d91ebbd0da51aa3c9f540c5a121f6ae57fd682458a44b...",
    "nonce": 1769687125903
  }'
{
  "tx_hash": "0x0651207eef3271391dba93b96bb7d961a6d7b490fdfe9ee7a22b8c5f842b5867",
  "tx_type": 1301,
  "error": "",
  "data": {
    "status": {
      "oid": 77738308
    }
  },
  "address": "0x9908658A316D743159F001026F1ef08aa8F0b55B"
}
Use the underlying JSON-RPC style placeOrder method over HTTP, or call the higher-level place_order / placeOrder methods on the ExchangeClient SDK. Make sure you have already created an exchange instance as shown in exchangeClient. Method: POST https://api.hotstuff.trade/exchange
curl --request POST \
  --url https://api.hotstuff.trade/exchange \
  --header 'Content-Type: application/json' \
  --data '{
    "action": {
      "data": {
        "orders": [{
          "instrumentId": 1,
          "side": "b",
          "positionSide": "BOTH",
          "price": "92291",
          "size": "0.00597",
          "tif": "IOC",
          "ro": false,
          "po": false,
          "cloid": "9c29fda4-79b4-47da-a788-568703333134",
          "triggerPx": "",
          "isMarket": true,
          "tpsl": "",
          "grouping": ""
        }],
        "expiresAfter": 1769690725903,
        "nonce": 1769687125903
      },
      "type": "1301"
    },
    "signature": "0xe39195212e76aa39cb8d91ebbd0da51aa3c9f540c5a121f6ae57fd682458a44b...",
    "nonce": 1769687125903
  }'
{
  "tx_hash": "0x0651207eef3271391dba93b96bb7d961a6d7b490fdfe9ee7a22b8c5f842b5867",
  "tx_type": 1301,
  "error": "",
  "data": {
    "status": {
      "oid": 77738308
    }
  },
  "address": "0x9908658A316D743159F001026F1ef08aa8F0b55B"
}

Request Body

action
object
required
{
  "data": {
    "expiresAfter": Number,
    "nonce": Number,
    "orders": [{
      "cloid": String,
      "grouping": String,
      "instrumentId": Number,
      "isMarket": Boolean,
      "po": Boolean,
      "positionSide": String,
      "price": String,
      "ro": Boolean,
      "side": String,
      "size": String,
      "tif": String,
      "tpsl": String,
      "triggerPx": String
    }]
  },
  "type": String
}
signature
string
required
Signed payload in hexadecimal format
nonce
number
required
Current timestamp in milliseconds

Response

FieldTypeDescription
tx_hashStringTransaction hash in 66-character hexadecimal format
tx_typeNumberTransaction type identifier
errorStringError message if request failed, empty string on success
dataObjectResponse data object containing order status
data.statusObject | nullOrder status object with oid, null if error
addressStringUser wallet address in 42-character hexadecimal format