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": {
        "code": "REF_MKZFZFZK",
        "nonce": 1769690420912
      },
      "type": "1208"
    },
    "signature": "0x852044390aaf68b329302ad7af9d2d5443eebd3b8a098b092e7e0c1b530c45b7...",
    "nonce": 1769690420912
  }'
{
  "tx_hash": "0x93c0692352b3256a22067f845ca0be1a4271684e90454418411b5f7e86ba7500",
  "tx_type": 1208,
  "success": true,
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Use the ExchangeClient createReferralCode method to create a new referral code for your 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": {
        "code": "REF_MKZFZFZK",
        "nonce": 1769690420912
      },
      "type": "1208"
    },
    "signature": "0x852044390aaf68b329302ad7af9d2d5443eebd3b8a098b092e7e0c1b530c45b7...",
    "nonce": 1769690420912
  }'
{
  "tx_hash": "0x93c0692352b3256a22067f845ca0be1a4271684e90454418411b5f7e86ba7500",
  "tx_type": 1208,
  "success": true,
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}

Request Body

action
object
required
{
  "data": {
    "code": 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
successBooleanWhether the operation was successful
dataObjectResponse data object
addressStringUser wallet address in hexadecimal format