Markets
List Markets
List all active external securities lending markets for your instance
GET
/
lending-external-securities
/
api
/
markets
curl "https://api.trusset.org/lending-external-securities/api/markets?includeOnChain=true" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
'https://api.trusset.org/lending-external-securities/api/markets?includeOnChain=true',
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
for (const m of data.markets) {
const live = m.onChain?.isOnChain ? m.onChain : null;
console.log(m.collateralTokenSymbol, m.collateralMode, live?.availableLiquidity ?? 'unavailable');
}
{
"success": true,
"data": {
"markets": [
{
"id": "clx_secmarket_001",
"marketAddress": "0x70A0E25c7b768B87e658348B3b577678A173E038",
"oracleAddress": "0x3b25752c1459C5Cf1b0bfcFdF0D56883c8047423",
"insuranceFundAddress": "0x8f1a...9c22",
"adapterAddress": "0x4d2b...77ae",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"collateralAgent": "0x555...666",
"liquidationOperator": "0x777...888",
"priceSource": "NAV",
"collateralTokenAddress": "0xabc...def",
"collateralTokenName": "Nyala Fund I",
"collateralTokenSymbol": "NYF1",
"collateralTokenIsin": "DE000A0F5UF5",
"collateralMode": "FREEZE",
"collateralFactor": "7500",
"liquidationThreshold": "8500",
"closeFactor": "5000",
"useDutchAuction": false,
"totalDeposits": "1000000",
"totalBorrows": "250000",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "84",
"curator": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"seekingCurator": false,
"curatorImported": false,
"realizationMode": "EXCHANGE_SALE",
"liquidityCommitment": "1000000",
"borrowAssetSymbol": "USDC",
"borrowAssetDecimals": 6,
"collateralDecimals": 18,
"permitSupported": true,
"rateMode": "CLAMPED",
"rateFloor": "200",
"rateCap": "1200",
"maxFixedRate": null,
"operatorShare": "1000",
"reserveRatio": "500",
"maxLoanDuration": "15552000",
"termGracePeriod": "432000",
"terminalDueDate": null,
"termPenalty": "300",
"marketDueFloor": null,
"allowExtension": true,
"isStale": false,
"priceAge": 3241,
"maxPriceAge": 86400,
"oracleLastUpdate": "2025-06-15T11:06:00.000Z",
"active": true,
"createdAt": "2025-06-01T09:00:00.000Z",
"isOnChain": true,
"onChain": {
"isOnChain": true,
"paused": false,
"totalDeposits": "1000000.000000",
"totalBorrows": "250000.000000",
"availableLiquidity": "750000.000000",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "84",
"activeLoans": 4,
"activeAuctions": 0,
"pendingLiquidations": 0,
"pendingLiquidationDebt": "0.000000"
}
}
]
},
"metadata": {
"timestamp": "2025-06-15T12:00:00.000Z",
"requestId": "a1b2c3d4-...",
"instanceId": "inst_abc123"
}
}
Returns every active market deployed under the instance bound to your API key. Archived and inactive markets are excluded.
The stored aggregates are served by default and
onChain is null. Live per-market state is opt-in through includeOnChain, because enriching a list runs a full position sync per market and turns a list read into an unbounded chain scan. For live state on a single market, prefer Get Market or Get Market Metrics.
When enrichment is requested it is still best effort. If the RPC is unreachable for a given market, onChain comes back null and the stored fields are served regardless. Always check onChain before reading from it.
Query Parameters
boolean
default:"false"
Set to
true to read live contract state for every market in the list. Any other value leaves onChain as null.Response Fields
object
Show child attributes
Show child attributes
array
Show child attributes
Show child attributes
string
Market ID. Use this as
marketId on every other endpoint.string
Lending market contract.
string
Price oracle contract.
string
Insurance fund contract.
string
Collateral adapter. A freeze adapter in
FREEZE mode, a custody adapter in CUSTODY mode.string
This market’s own liquidation router. Every market has one for life, and there is no shared router.
string
Named pledgee recorded on the market and on every adapter lock.
string
Address holding
OPERATOR_ROLE on this market’s liquidation router.string
Where seized collateral is sent for realization. Fixed by the lender of record when it took the role and not rotatable afterwards.
string
NAV, MARKET or ORACLE.string
The external feed an
ORACLE market reads. null on every other price source.string
Security token accepted as collateral.
string
Collateral token name.
string
Collateral token symbol.
string
ISIN of the underlying security, when recorded.
string
FREEZE or CUSTODY.integer
Decimals of the collateral token. Every collateral amount on this surface is formatted at this scale.
string
The market’s identity gate, or
null when none is installed.string
Settlement token the market lends and is repaid in.
string
Its symbol, for example
USDC.integer
Its decimals. Every borrow-side amount is formatted at this scale.
boolean
Whether the settlement asset implements EIP-2612, so Repay Loan can take a single-signature
permit. null until probed.string
Maximum loan to value in basis points.
string
Liquidation trigger in basis points.
string
Liquidator incentive in basis points.
string
Maximum fraction of debt repayable in one liquidation, in basis points.
string
Supply cap across the market, in collateral units.
"0" means uncapped.string
Supply cap per borrower, in collateral units.
"0" means uncapped.boolean
Whether liquidations open a Dutch auction.
string
Last recorded pool deposits.
string
Last recorded outstanding borrows.
string
Last recorded utilization in basis points.
string
Last recorded borrow rate in basis points.
string
Last recorded supply rate in basis points.
boolean
Always true in this response.
string
ISO 8601 timestamp.
boolean
Whether the market has a deployed address recorded.
object
Live contract metrics.
null unless includeOnChain=true, and null when the read failed. See Get Market Metrics for the full field list.Lender of record
array
Show child attributes
Show child attributes
string
The institution holding the lender-of-record role, or
null while the market is still seeking one.boolean
true while no institution has taken the role. Every money path on the market is refused with MARKET_PENDING_CURATOR while this holds.boolean
Whether this row exists because the instance took the role on another platform’s market, rather than because it deployed the market itself.
string
How the lender of record declared it will realize seized collateral:
EXCHANGE_SALE, ISSUER_REDEMPTION or AUCTION.string
Liquidity the lender of record committed when it took the role, in borrow asset units.
Rate and term offering
Fixed at deployment and healed from the chain whenever the market is read. All rate values are basis-point strings, all durations are strings of seconds.array
Show child attributes
Show child attributes
string
CURVE, CLAMPED or FIXED.string
Floor the model holds to.
"0" on CURVE.string
Cap the model holds to.
"0" on CURVE.string
Ceiling the lender of record may stamp a fixed rate at, or
null.string
Share of post-infrastructure interest that goes to the lender of record, in basis points. It is one of the three deductions between the borrow rate and the supply rate.
string
Share of the pool held back from borrowing, in basis points.
string
Seconds a loan may run before it falls due.
"0" means the market makes open-ended loans.string
Seconds after the due date before the term penalty applies.
string
Unix seconds every loan falls due by, whatever its own duration, or
null.string
Penalty applied past the grace period, in basis points.
string
Earliest due date the market will accept, or
null.boolean
Whether a borrower may be granted more time on a termed loan.
Oracle staleness
Read once per oracle across the whole list and attached to every market, so the list is safe to poll.array
Show child attributes
Show child attributes
Database totals on the market record are refreshed after write operations executed through this API. Treat the
onChain block as authoritative for live figures.curl "https://api.trusset.org/lending-external-securities/api/markets?includeOnChain=true" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
'https://api.trusset.org/lending-external-securities/api/markets?includeOnChain=true',
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
for (const m of data.markets) {
const live = m.onChain?.isOnChain ? m.onChain : null;
console.log(m.collateralTokenSymbol, m.collateralMode, live?.availableLiquidity ?? 'unavailable');
}
{
"success": true,
"data": {
"markets": [
{
"id": "clx_secmarket_001",
"marketAddress": "0x70A0E25c7b768B87e658348B3b577678A173E038",
"oracleAddress": "0x3b25752c1459C5Cf1b0bfcFdF0D56883c8047423",
"insuranceFundAddress": "0x8f1a...9c22",
"adapterAddress": "0x4d2b...77ae",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"collateralAgent": "0x555...666",
"liquidationOperator": "0x777...888",
"priceSource": "NAV",
"collateralTokenAddress": "0xabc...def",
"collateralTokenName": "Nyala Fund I",
"collateralTokenSymbol": "NYF1",
"collateralTokenIsin": "DE000A0F5UF5",
"collateralMode": "FREEZE",
"collateralFactor": "7500",
"liquidationThreshold": "8500",
"closeFactor": "5000",
"useDutchAuction": false,
"totalDeposits": "1000000",
"totalBorrows": "250000",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "84",
"curator": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"seekingCurator": false,
"curatorImported": false,
"realizationMode": "EXCHANGE_SALE",
"liquidityCommitment": "1000000",
"borrowAssetSymbol": "USDC",
"borrowAssetDecimals": 6,
"collateralDecimals": 18,
"permitSupported": true,
"rateMode": "CLAMPED",
"rateFloor": "200",
"rateCap": "1200",
"maxFixedRate": null,
"operatorShare": "1000",
"reserveRatio": "500",
"maxLoanDuration": "15552000",
"termGracePeriod": "432000",
"terminalDueDate": null,
"termPenalty": "300",
"marketDueFloor": null,
"allowExtension": true,
"isStale": false,
"priceAge": 3241,
"maxPriceAge": 86400,
"oracleLastUpdate": "2025-06-15T11:06:00.000Z",
"active": true,
"createdAt": "2025-06-01T09:00:00.000Z",
"isOnChain": true,
"onChain": {
"isOnChain": true,
"paused": false,
"totalDeposits": "1000000.000000",
"totalBorrows": "250000.000000",
"availableLiquidity": "750000.000000",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "84",
"activeLoans": 4,
"activeAuctions": 0,
"pendingLiquidations": 0,
"pendingLiquidationDebt": "0.000000"
}
}
]
},
"metadata": {
"timestamp": "2025-06-15T12:00:00.000Z",
"requestId": "a1b2c3d4-...",
"instanceId": "inst_abc123"
}
}
⌘I
curl "https://api.trusset.org/lending-external-securities/api/markets?includeOnChain=true" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
'https://api.trusset.org/lending-external-securities/api/markets?includeOnChain=true',
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
for (const m of data.markets) {
const live = m.onChain?.isOnChain ? m.onChain : null;
console.log(m.collateralTokenSymbol, m.collateralMode, live?.availableLiquidity ?? 'unavailable');
}
{
"success": true,
"data": {
"markets": [
{
"id": "clx_secmarket_001",
"marketAddress": "0x70A0E25c7b768B87e658348B3b577678A173E038",
"oracleAddress": "0x3b25752c1459C5Cf1b0bfcFdF0D56883c8047423",
"insuranceFundAddress": "0x8f1a...9c22",
"adapterAddress": "0x4d2b...77ae",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"collateralAgent": "0x555...666",
"liquidationOperator": "0x777...888",
"priceSource": "NAV",
"collateralTokenAddress": "0xabc...def",
"collateralTokenName": "Nyala Fund I",
"collateralTokenSymbol": "NYF1",
"collateralTokenIsin": "DE000A0F5UF5",
"collateralMode": "FREEZE",
"collateralFactor": "7500",
"liquidationThreshold": "8500",
"closeFactor": "5000",
"useDutchAuction": false,
"totalDeposits": "1000000",
"totalBorrows": "250000",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "84",
"curator": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"seekingCurator": false,
"curatorImported": false,
"realizationMode": "EXCHANGE_SALE",
"liquidityCommitment": "1000000",
"borrowAssetSymbol": "USDC",
"borrowAssetDecimals": 6,
"collateralDecimals": 18,
"permitSupported": true,
"rateMode": "CLAMPED",
"rateFloor": "200",
"rateCap": "1200",
"maxFixedRate": null,
"operatorShare": "1000",
"reserveRatio": "500",
"maxLoanDuration": "15552000",
"termGracePeriod": "432000",
"terminalDueDate": null,
"termPenalty": "300",
"marketDueFloor": null,
"allowExtension": true,
"isStale": false,
"priceAge": 3241,
"maxPriceAge": 86400,
"oracleLastUpdate": "2025-06-15T11:06:00.000Z",
"active": true,
"createdAt": "2025-06-01T09:00:00.000Z",
"isOnChain": true,
"onChain": {
"isOnChain": true,
"paused": false,
"totalDeposits": "1000000.000000",
"totalBorrows": "250000.000000",
"availableLiquidity": "750000.000000",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "84",
"activeLoans": 4,
"activeAuctions": 0,
"pendingLiquidations": 0,
"pendingLiquidationDebt": "0.000000"
}
}
]
},
"metadata": {
"timestamp": "2025-06-15T12:00:00.000Z",
"requestId": "a1b2c3d4-...",
"instanceId": "inst_abc123"
}
}
