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": "EXISTING_REFERRAL_CODE",
        "nonce": 1769690421243
      },
      "type": "1209"
    },
    "signature": "0x2bff264012e94c730a0e974e4467266b9347cf0be3768187ce44d6e41b64eaaa...",
    "nonce": 1769690421243
  }'
{
  "tx_hash": "0x38fef635d32e0deee784607ebe258b1372b7ad8888e40af85d3162a88f6d9bdc",
  "tx_type": 1209,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Use the ExchangeClient setReferrer method to set your referrer using an existing referral code. 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": "EXISTING_REFERRAL_CODE",
        "nonce": 1769690421243
      },
      "type": "1209"
    },
    "signature": "0x2bff264012e94c730a0e974e4467266b9347cf0be3768187ce44d6e41b64eaaa...",
    "nonce": 1769690421243
  }'
{
  "tx_hash": "0x38fef635d32e0deee784607ebe258b1372b7ad8888e40af85d3162a88f6d9bdc",
  "tx_type": 1209,
  "error": "",
  "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
errorStringError message if request failed, empty string on success
dataObjectResponse data object
addressStringUser wallet address in hexadecimal format