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": {
        "vaultAddress": "0x1234567890123456789012345678901234567890",
        "amount": "100.0",
        "nonce": 1769691074949
      },
      "type": "1401"
    },
    "signature": "0x865876d8ea761547980c364c54e310f0cc6c2cc852fdcbff3c3534fc2d2b77d9...",
    "nonce": 1769691074949
  }'
{
  "tx_hash": "0x24666c7647f68ed388aa6f5aa2e08a7f36adc5f6339b5d12937e15e3b2cb928c",
  "tx_type": 1401,
  "error": "",
  "data": {
    "shares_minted": "100.0"
  },
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}

Documentation Index

Fetch the complete documentation index at: https://docs.hotstuff.trade/llms.txt

Use this file to discover all available pages before exploring further.

Use the ExchangeClient depositToVault method to deposit collateral into a vault.
curl --request POST \
  --url https://api.hotstuff.trade/exchange \
  --header 'Content-Type: application/json' \
  --data '{
    "action": {
      "data": {
        "vaultAddress": "0x1234567890123456789012345678901234567890",
        "amount": "100.0",
        "nonce": 1769691074949
      },
      "type": "1401"
    },
    "signature": "0x865876d8ea761547980c364c54e310f0cc6c2cc852fdcbff3c3534fc2d2b77d9...",
    "nonce": 1769691074949
  }'
{
  "tx_hash": "0x24666c7647f68ed388aa6f5aa2e08a7f36adc5f6339b5d12937e15e3b2cb928c",
  "tx_type": 1401,
  "error": "",
  "data": {
    "shares_minted": "100.0"
  },
  "address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}

Request body

action
object
required
{
  "data": {
    "vaultAddress": String,
    "amount": String,
    "nonce": Number
  },
  "type": String
}
signature
string
required
Signed payload in hexadecimal format
nonce
number
required
Current timestamp in milliseconds

Body

application/json
action
object
required
signature
string
required
nonce
integer
required

Response

200 - application/json

Successful response

tx_hash
string
tx_type
integer
error
string
data
object
address
string