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,
        "amount": "5.0",
        "destination": "0x1234567890123456789012345678901234567890",
        "nonce": 1769690768744
      },
      "type": "1052"
    },
    "signature": "0x7e159734d8482a49f6f81945d1423a3d44e6f08214aa54081dee15d5b1cf3d8c...",
    "nonce": 1769690768744
  }'
{
  "tx_hash": "0xee720feca655572fc8d709a66b0d8ef8e44e2affee46a4e208d69b087afe6592",
  "tx_type": 1052,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Use the ExchangeClient accountDerivativeBalanceTransferRequest method to transfer derivative balance to another address. 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,
        "amount": "5.0",
        "destination": "0x1234567890123456789012345678901234567890",
        "nonce": 1769690768744
      },
      "type": "1052"
    },
    "signature": "0x7e159734d8482a49f6f81945d1423a3d44e6f08214aa54081dee15d5b1cf3d8c...",
    "nonce": 1769690768744
  }'
{
  "tx_hash": "0xee720feca655572fc8d709a66b0d8ef8e44e2affee46a4e208d69b087afe6592",
  "tx_type": 1052,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}

Request Body

action
object
required
{
  "data": {
    "collateralId": Number,
    "amount": String,
    "destination": 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