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": {
        "agent": "0x436e1aDF2A0fAe363aCc76dEce9b3b8CD5214D07",
        "forAccount": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf",
        "nonce": 1769690419983
      },
      "type": "1211"
    },
    "signature": "0x9df6a7188171428af1e04dd85b6655d4496bb3c70da084bbff422f77d47bc9e3...",
    "nonce": 1769690419983
  }'
{
  "tx_hash": "0x2d4f742ea8900456ef9d1cf01c1c559199fb4139e662f3a635876d625e6b2a7d",
  "tx_type": 1211,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Use the ExchangeClient revokeAgent method to revoke an existing agent so it can no longer act on behalf of your account or sub-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": {
        "agent": "0x436e1aDF2A0fAe363aCc76dEce9b3b8CD5214D07",
        "forAccount": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf",
        "nonce": 1769690419983
      },
      "type": "1211"
    },
    "signature": "0x9df6a7188171428af1e04dd85b6655d4496bb3c70da084bbff422f77d47bc9e3...",
    "nonce": 1769690419983
  }'
{
  "tx_hash": "0x2d4f742ea8900456ef9d1cf01c1c559199fb4139e662f3a635876d625e6b2a7d",
  "tx_type": 1211,
  "error": "",
  "data": {},
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}

Request Body

action
object
required
{
  "data": {
    "agent": String,
    "forAccount": 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