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": {
        "collateralId": 1,
        "spot": false,
        "nonce": 1769690421578
      },
      "type": "1210"
    },
    "signature": "0xacc3411bc74146cdda0a4991f3436a2e935fefed46cd74a2a6202df9f991a037...",
    "nonce": 1769690421578
  }'
{
  "tx_hash": "0x5cdeea606058f15236fa8616b6ae13ccfd48bee25dba2f464b3645ddc361375f",
  "tx_type": 1210,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Use the ExchangeClient claimReferralRewards method to claim your accumulated referral rewards to either spot or derivatives collateral. Method: POST https://api.hotstuff.trade/exchange
curl --request POST \
  --url https://api.hotstuff.trade/exchange \
  --header 'Content-Type: application/json' \
  --data '{
    "action": {
      "data": {
        "collateralId": 1,
        "spot": false,
        "nonce": 1769690421578
      },
      "type": "1210"
    },
    "signature": "0xacc3411bc74146cdda0a4991f3436a2e935fefed46cd74a2a6202df9f991a037...",
    "nonce": 1769690421578
  }'
{
  "tx_hash": "0x5cdeea606058f15236fa8616b6ae13ccfd48bee25dba2f464b3645ddc361375f",
  "tx_type": 1210,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}

Request Body

action
object
required
{
  "data": {
    "collateralId": Number,
    "spot": Boolean,
    "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