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": {
        "broker": "0x1234567890123456789012345678901234567890",
        "maxFeeRate": "0.001",
        "nonce": 1769690420567
      },
      "type": "1207"
    },
    "signature": "0x79a8f17e198acb5532166f9705a4b9d49ac029cc390b310e07f11b2b3a03f591...",
    "nonce": 1769690420567
  }'
{
  "tx_hash": "0xece5d2eef11c627cf91b2b434b6b488a82ad85dd38a413f3f4467409e4aaa71f",
  "tx_type": 1207,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Use the ExchangeClient approveBrokerFee method to approve a broker and set a maximum fee rate they can charge. Method: POST https://api.hotstuff.trade/exchange
curl --request POST \
  --url https://api.hotstuff.trade/exchange \
  --header 'Content-Type: application/json' \
  --data '{
    "action": {
      "data": {
        "broker": "0x1234567890123456789012345678901234567890",
        "maxFeeRate": "0.001",
        "nonce": 1769690420567
      },
      "type": "1207"
    },
    "signature": "0x79a8f17e198acb5532166f9705a4b9d49ac029cc390b310e07f11b2b3a03f591...",
    "nonce": 1769690420567
  }'
{
  "tx_hash": "0xece5d2eef11c627cf91b2b434b6b488a82ad85dd38a413f3f4467409e4aaa71f",
  "tx_type": 1207,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}

Request Body

action
object
required
{
  "data": {
    "broker": String,
    "maxFeeRate": String,
    "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
addressStringUser wallet address in hexadecimal format