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": {
        "instrumentId": 1,
        "leverage": 10,
        "nonce": 1769690420382
      },
      "type": "1203"
    },
    "signature": "0x1c95312b98f5a49ebf8289eb5b6db29ac71c0b2b7b744e27af6a62bf6803723b...",
    "nonce": 1769690420382
  }'
{
  "tx_hash": "0x1c95312b98f5a49ebf8289eb5b6db29ac71c0b2b7b744e27af6a62bf6803723b",
  "tx_type": 1203,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Use the ExchangeClient updatePerpInstrumentLeverage method to change the leverage for a given perpetual instrument. Method: POST https://api.hotstuff.trade/exchange
curl --request POST \
  --url https://api.hotstuff.trade/exchange \
  --header 'Content-Type: application/json' \
  --data '{
    "action": {
      "data": {
        "instrumentId": 1,
        "leverage": 10,
        "nonce": 1769690420382
      },
      "type": "1203"
    },
    "signature": "0x1c95312b98f5a49ebf8289eb5b6db29ac71c0b2b7b744e27af6a62bf6803723b...",
    "nonce": 1769690420382
  }'
{
  "tx_hash": "0x1c95312b98f5a49ebf8289eb5b6db29ac71c0b2b7b744e27af6a62bf6803723b",
  "tx_type": 1203,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}

Request Body

action
object
required
{
  "data": {
    "instrumentId": Number,
    "leverage": Number,
    "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