Queries
Get Vault
Full vault record plus live chain state and an optional holder position
GET
/
lending-external-securities
/
api
/
vaults
/
{vaultId}
curl "https://api.trusset.org/lending-external-securities/api/vaults/{vaultId}?address=0x5ad87a0621175206b72d10e4b8577b192e7f40ab" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/vaults/${vaultId}?address=${wallet}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (data.onChain?.readFailed) {
// keep last verified values and retry
} else {
console.log(`share price ${data.onChain.sharePrice}, ${data.onChain.idleAssets} ${data.assetSymbol} idle`);
}
{
"success": true,
"data": {
"id": "cmssh8t2u0003cghxkx1w1fwd",
"own": false,
"vaultAddress": "0x4d0cfe39a3431b145d1a1393d901a36d459a1b13",
"assetSymbol": "USDC",
"assetDecimals": 6,
"name": "Trusset Prime Demo Vault",
"symbol": "TPV",
"performanceFeeBps": 500,
"active": true,
"riskDisclosure": "Deposits fund overcollateralized security-token lending markets.",
"riskDisclosureUrl": "https://bank.example/vault-risk",
"operatedBy": { "instanceName": "Trusset Client Demo", "issuerName": "Trusset UG", "isBank": true },
"onChain": {
"isOnChain": true,
"readFailed": false,
"owner": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
"asset": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
"identityRegistry": "0xe9114c40934f6fb6bb317935156b731f7a86d006",
"totalAssets": "125000.0",
"totalShares": "123456.789012",
"sharePrice": "1.0125",
"idleAssets": "25000.0",
"allocatedAssets": "100000.0",
"depositsPaused": false,
"performanceFeeBps": 500,
"allocations": [
{
"marketAddress": "0xae10e07a899526e97be3940ca6ee03af28394495",
"marketName": "Trusset Security Token",
"marketSymbol": "TRST",
"lpShares": "100000000000",
"lpValue": "101250.0",
"lpValueRaw": "101250000000",
"deposited": "100000.0",
"marketAvailable": "62500.0",
"utilizationBps": 5503,
"borrowRateBps": 750,
"supplyRateBps": 309
}
],
"interest": {
"readFailed": false,
"grossAnnual": "3128.625",
"netAnnual": "2972.19375",
"blendedGrossApyBps": 250,
"blendedNetApyBps": 237,
"performanceFeeBps": 500
}
},
"holder": {
"holderAddress": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
"shares": "1000.0",
"value": "1012.5",
"readFailed": false
}
}
}
{
"success": true,
"data": {
"id": "cmssh8t2u0003cghxkx1w1fwd",
"name": "Trusset Prime Demo Vault",
"onChain": { "readFailed": true, "isOnChain": null },
"holder": null
}
}
{
"success": false,
"error": {
"code": "VAULT_NOT_FOUND",
"message": "Vault not found"
}
}
Returns the complete vault record with two enrichment blocks:
onChain, the vault’s live state read from the chain in one aggregate, and holder, the position of the wallet named in address. Without an address, holder is null.
Path Parameters
string
required
Vault ID from List Vaults.
Query Parameters
string
Wallet to read a position for. When present,
holder carries that wallet’s shares and their current value.Response Fields
object
Show child attributes
Show child attributes
object
Show child attributes
Show child attributes
boolean
True when the chain could not be read. Every other field in this block is then absent, apart from
isOnChain and supportsNotice. Keep your last verified values instead of rendering zeros.boolean
true on a clean read, null when the read failed.string
The vault contract, lowercased.
string
The wallet that owns the vault on-chain.
string
Settlement token, read from the contract rather than from the record.
string
The register that admits depositors, read from the contract.
string
Everything the vault is worth: idle funds plus its value across allocated markets. Formatted at the vault’s asset decimals.
string
The same figure in base units.
string
Shares in issue.
string
The same figure in base units.
string
Value of one share in the settlement asset, as an 18-decimal string.
"1.0" is par. It rises as the funded markets pay interest.string
Funds not allocated to any market.
string
Total assets minus idle assets: funds working in the operator’s lending markets.
string
What a redemption could actually pay out at this moment, in the settlement asset. It is idle funds plus, for each allocated market, the smaller of two figures: what the vault holds there, and what that market has uncommitted. Size a redemption against this, not against
idleAssets.string
The same figure in base units.
boolean
True while the operator has paused deposits. Redemptions cannot be paused.
null when unreadable, which is not the same as unpaused.integer
Live fee. The contract only accepts decreases.
integer
The block these figures were read at.
boolean
false when at least one allocated market would not answer, so totalAssets understates the vault. Treat a false here the way you would treat readFailed.boolean
Whether this vault runs the implementation that announces its changes and can write a dead market off.
object
{ horizon, bounded, complete }. horizon is seconds until every allocation could in principle be wound down. bounded is false when at least one funded market carries an open-ended loan, and complete says whether every leg answered. The whole block is null when the vault does not expose it.array
Per-market legs:
marketAddress, marketName, marketSymbol, lpValue, lpValueRaw, lpShares, deposited, marketAvailable, and a per-leg readFailed when one market could not be read. Each healthy leg also carries utilizationBps, borrowRateBps, and supplyRateBps, which are the rates shown on that market’s own page.object
Show child attributes
Show child attributes
boolean
True when any allocation leg could not be read. The other fields are then absent, because a sum over the legs that did answer would understate the total.
string
Interest the current allocations would earn over a year at today’s rates, before the performance fee. In the settlement asset.
string
The same figure after the operator’s performance fee.
integer
Gross annual interest over total assets, in basis points. Idle funds earn nothing, so this sits below the rate of any single funded market.
null when the vault holds nothing.integer
The same blended rate after the fee. This is the rate an investor earns.
integer
The fee applied to get from gross to net.
object
object
Present only on your own vault,
null on every other. Carries readFailed, and on a clean read upgradeAvailable, upgradeActivatesAt, upgradeReady and pendingIsPlatform, describing whether the vault’s implementation differs from the platform’s current one and when a pending upgrade becomes activatable.object
Present only on your own vault,
null on every other. Carries readFailed and a markets array of the operator’s lending markets that settle in the vault’s asset and could draw on it, each with marketId, marketAddress, marketName, marketSymbol, borrowAssetSymbol and a readiness verdict.readFailed: true means the RPC could not answer, not that the vault is empty. A vault whose read failed still holds every deposit it held a minute ago. Show your last verified figures with a warning, retry, and never render zeros in their place.sharePrice is an 18-decimal string regardless of the asset’s own decimals. Every other amount in the block is formatted at assetDecimals.The
interest block describes what the current allocations would earn at today’s rates. Rates move with each market’s utilization, so treat it as the present run rate rather than a forecast. It costs no extra call: the rates come from the same market read that produces the allocation legs.curl "https://api.trusset.org/lending-external-securities/api/vaults/{vaultId}?address=0x5ad87a0621175206b72d10e4b8577b192e7f40ab" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/vaults/${vaultId}?address=${wallet}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (data.onChain?.readFailed) {
// keep last verified values and retry
} else {
console.log(`share price ${data.onChain.sharePrice}, ${data.onChain.idleAssets} ${data.assetSymbol} idle`);
}
{
"success": true,
"data": {
"id": "cmssh8t2u0003cghxkx1w1fwd",
"own": false,
"vaultAddress": "0x4d0cfe39a3431b145d1a1393d901a36d459a1b13",
"assetSymbol": "USDC",
"assetDecimals": 6,
"name": "Trusset Prime Demo Vault",
"symbol": "TPV",
"performanceFeeBps": 500,
"active": true,
"riskDisclosure": "Deposits fund overcollateralized security-token lending markets.",
"riskDisclosureUrl": "https://bank.example/vault-risk",
"operatedBy": { "instanceName": "Trusset Client Demo", "issuerName": "Trusset UG", "isBank": true },
"onChain": {
"isOnChain": true,
"readFailed": false,
"owner": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
"asset": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
"identityRegistry": "0xe9114c40934f6fb6bb317935156b731f7a86d006",
"totalAssets": "125000.0",
"totalShares": "123456.789012",
"sharePrice": "1.0125",
"idleAssets": "25000.0",
"allocatedAssets": "100000.0",
"depositsPaused": false,
"performanceFeeBps": 500,
"allocations": [
{
"marketAddress": "0xae10e07a899526e97be3940ca6ee03af28394495",
"marketName": "Trusset Security Token",
"marketSymbol": "TRST",
"lpShares": "100000000000",
"lpValue": "101250.0",
"lpValueRaw": "101250000000",
"deposited": "100000.0",
"marketAvailable": "62500.0",
"utilizationBps": 5503,
"borrowRateBps": 750,
"supplyRateBps": 309
}
],
"interest": {
"readFailed": false,
"grossAnnual": "3128.625",
"netAnnual": "2972.19375",
"blendedGrossApyBps": 250,
"blendedNetApyBps": 237,
"performanceFeeBps": 500
}
},
"holder": {
"holderAddress": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
"shares": "1000.0",
"value": "1012.5",
"readFailed": false
}
}
}
{
"success": true,
"data": {
"id": "cmssh8t2u0003cghxkx1w1fwd",
"name": "Trusset Prime Demo Vault",
"onChain": { "readFailed": true, "isOnChain": null },
"holder": null
}
}
{
"success": false,
"error": {
"code": "VAULT_NOT_FOUND",
"message": "Vault not found"
}
}
⌘I
curl "https://api.trusset.org/lending-external-securities/api/vaults/{vaultId}?address=0x5ad87a0621175206b72d10e4b8577b192e7f40ab" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/vaults/${vaultId}?address=${wallet}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (data.onChain?.readFailed) {
// keep last verified values and retry
} else {
console.log(`share price ${data.onChain.sharePrice}, ${data.onChain.idleAssets} ${data.assetSymbol} idle`);
}
{
"success": true,
"data": {
"id": "cmssh8t2u0003cghxkx1w1fwd",
"own": false,
"vaultAddress": "0x4d0cfe39a3431b145d1a1393d901a36d459a1b13",
"assetSymbol": "USDC",
"assetDecimals": 6,
"name": "Trusset Prime Demo Vault",
"symbol": "TPV",
"performanceFeeBps": 500,
"active": true,
"riskDisclosure": "Deposits fund overcollateralized security-token lending markets.",
"riskDisclosureUrl": "https://bank.example/vault-risk",
"operatedBy": { "instanceName": "Trusset Client Demo", "issuerName": "Trusset UG", "isBank": true },
"onChain": {
"isOnChain": true,
"readFailed": false,
"owner": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
"asset": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
"identityRegistry": "0xe9114c40934f6fb6bb317935156b731f7a86d006",
"totalAssets": "125000.0",
"totalShares": "123456.789012",
"sharePrice": "1.0125",
"idleAssets": "25000.0",
"allocatedAssets": "100000.0",
"depositsPaused": false,
"performanceFeeBps": 500,
"allocations": [
{
"marketAddress": "0xae10e07a899526e97be3940ca6ee03af28394495",
"marketName": "Trusset Security Token",
"marketSymbol": "TRST",
"lpShares": "100000000000",
"lpValue": "101250.0",
"lpValueRaw": "101250000000",
"deposited": "100000.0",
"marketAvailable": "62500.0",
"utilizationBps": 5503,
"borrowRateBps": 750,
"supplyRateBps": 309
}
],
"interest": {
"readFailed": false,
"grossAnnual": "3128.625",
"netAnnual": "2972.19375",
"blendedGrossApyBps": 250,
"blendedNetApyBps": 237,
"performanceFeeBps": 500
}
},
"holder": {
"holderAddress": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
"shares": "1000.0",
"value": "1012.5",
"readFailed": false
}
}
}
{
"success": true,
"data": {
"id": "cmssh8t2u0003cghxkx1w1fwd",
"name": "Trusset Prime Demo Vault",
"onChain": { "readFailed": true, "isOnChain": null },
"holder": null
}
}
{
"success": false,
"error": {
"code": "VAULT_NOT_FOUND",
"message": "Vault not found"
}
}
