curl --request POST \
--url https://api.hotstuff.trade/exchange \
--header 'Content-Type: application/json' \
--data '{
"action": {
"data": {
"vaultAddress": "0x1234567890123456789012345678901234567890",
"shares": "50.0",
"nonce": 1769691075449
},
"type": "1402"
},
"signature": "0xc1aa6c72696fe7396404049143da22d26301a565d3b9cdcab36ac5872def6a89...",
"nonce": 1769691075449
}'
{
"tx_hash": "0xa04e3a17347b9561983107ce39ae6671d6a20a787a20427d07094c6ab7b7543e",
"tx_type": 1402,
"error": "",
"data": {
"assets_redeemed": "50.0"
},
"address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Vaults
Redeem from Vault
Send POST request to /exchange, or use the ExchangeClient SDKs.
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",
"shares": "50.0",
"nonce": 1769691075449
},
"type": "1402"
},
"signature": "0xc1aa6c72696fe7396404049143da22d26301a565d3b9cdcab36ac5872def6a89...",
"nonce": 1769691075449
}'
{
"tx_hash": "0xa04e3a17347b9561983107ce39ae6671d6a20a787a20427d07094c6ab7b7543e",
"tx_type": 1402,
"error": "",
"data": {
"assets_redeemed": "50.0"
},
"address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Use the ExchangeClient
redeemFromVault method to redeem shares from a vault and receive collateral.
curl --request POST \
--url https://api.hotstuff.trade/exchange \
--header 'Content-Type: application/json' \
--data '{
"action": {
"data": {
"vaultAddress": "0x1234567890123456789012345678901234567890",
"shares": "50.0",
"nonce": 1769691075449
},
"type": "1402"
},
"signature": "0xc1aa6c72696fe7396404049143da22d26301a565d3b9cdcab36ac5872def6a89...",
"nonce": 1769691075449
}'
{
"tx_hash": "0xa04e3a17347b9561983107ce39ae6671d6a20a787a20427d07094c6ab7b7543e",
"tx_type": 1402,
"error": "",
"data": {
"assets_redeemed": "50.0"
},
"address": "0xEc6d21B8c1FF6dF523F22c4cf54F077e5F7cAfBf"
}
Request body
{
"data": {
"vaultAddress": String,
"shares": String,
"nonce": Number
},
"type": String
}
Signed payload in hexadecimal format
Current timestamp in milliseconds
⌘I