Deposits & Redemptions
Redeem
Redemption calldata
POST
/
lending-external-securities
/
api
/
vaults
/
{vaultId}
/
redeem
curl -X POST "https://api.trusset.org/lending-external-securities/api/vaults/{vaultId}/redeem" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{"shares": "500"}'
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/vaults/${vaultId}/redeem`,
{
method: 'POST',
headers: { 'X-API-Key': 'trusset_your_key_here', 'Content-Type': 'application/json' },
body: JSON.stringify({ shares: '500' })
}
);
const { data } = await res.json();
const tx = await signer.sendTransaction({ to: data.transaction.to, data: data.transaction.data });
await tx.wait();
{
"success": true,
"data": {
"action": "SIGN_TRANSACTION",
"transaction": {
"to": "0x4d0cfe39a3431b145d1a1393d901a36d459a1b13",
"data": "0xdb006a75..."
},
"functionName": "redeem",
"note": "When market utilization blocks part of the value, the redemption fills partially: unpaid shares stay in the wallet.",
"confirmWith": { "endpoint": "confirm-tx", "txHash": true, "txType": "REDEEM" }
}
}
Builds the transaction that redeems vault shares for the settlement asset at the current share price. One signature, no approval step, since the vault burns its own shares.
Redemptions cannot be paused. What bounds them is liquidity: idle funds pay immediately, and beyond that the vault pulls from its market allocations as far as each market’s free liquidity allows.
Path Parameters
string
required
Vault ID.
Body Parameters
string
required
Shares to redeem as a decimal string, parsed at the vault’s
assetDecimals.Response Fields
object
When market utilization blocks part of the value, the redemption fills partially: the investor is paid what liquidity allows and the unpaid shares stay in the wallet. The amount recorded on confirmation comes from the
Redeemed event, meaning the assets actually paid, not the shares requested. Compare the two if you need to detect a partial fill.curl -X POST "https://api.trusset.org/lending-external-securities/api/vaults/{vaultId}/redeem" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{"shares": "500"}'
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/vaults/${vaultId}/redeem`,
{
method: 'POST',
headers: { 'X-API-Key': 'trusset_your_key_here', 'Content-Type': 'application/json' },
body: JSON.stringify({ shares: '500' })
}
);
const { data } = await res.json();
const tx = await signer.sendTransaction({ to: data.transaction.to, data: data.transaction.data });
await tx.wait();
{
"success": true,
"data": {
"action": "SIGN_TRANSACTION",
"transaction": {
"to": "0x4d0cfe39a3431b145d1a1393d901a36d459a1b13",
"data": "0xdb006a75..."
},
"functionName": "redeem",
"note": "When market utilization blocks part of the value, the redemption fills partially: unpaid shares stay in the wallet.",
"confirmWith": { "endpoint": "confirm-tx", "txHash": true, "txType": "REDEEM" }
}
}
⌘I
curl -X POST "https://api.trusset.org/lending-external-securities/api/vaults/{vaultId}/redeem" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{"shares": "500"}'
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/vaults/${vaultId}/redeem`,
{
method: 'POST',
headers: { 'X-API-Key': 'trusset_your_key_here', 'Content-Type': 'application/json' },
body: JSON.stringify({ shares: '500' })
}
);
const { data } = await res.json();
const tx = await signer.sendTransaction({ to: data.transaction.to, data: data.transaction.data });
await tx.wait();
{
"success": true,
"data": {
"action": "SIGN_TRANSACTION",
"transaction": {
"to": "0x4d0cfe39a3431b145d1a1393d901a36d459a1b13",
"data": "0xdb006a75..."
},
"functionName": "redeem",
"note": "When market utilization blocks part of the value, the redemption fills partially: unpaid shares stay in the wallet.",
"confirmWith": { "endpoint": "confirm-tx", "txHash": true, "txType": "REDEEM" }
}
}
