Markets
List Markets
List the active lending markets recorded on your instance
GET
/
lending-external-securities-v2
/
api
/
markets
curl "https://api.trusset.org/lending-external-securities-v2/api/markets?includeOnChain=true" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
'https://api.trusset.org/lending-external-securities-v2/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?.borrowableLiquidity ?? 'unavailable');
}
{
"success": true,
"data": {
"markets": [
{
"id": "cmssh7p1k0001cghxq2m4v8rz",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"oracleAddress": "0x3b25752c1459c5cf1b0bfcfdf0d56883c8047423",
"insuranceFundAddress": "0x8f1a4c2e9b7d3056a1e8c4f29d0b7a3e5c619c22",
"adapterAddress": "0x4d2b9e71c3a05f8d6e2b41c7a9f03d58e6b177ae",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"collateralAgent": "0x5a1f7c3e9d2b4068e1c5a7f3b9d0e2c4a6f81666",
"liquidationOperator": "0x7e2c4a9f1b3d5068c2e4a6f8b0d1c3e5a7f92888",
"saleRecipient": "0x9c3e5a7f1b2d4068e0c2a4f6b8d9e1c3a5f70b11",
"priceSource": "NAV",
"externalOracleFeed": null,
"collateralTokenAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
"collateralTokenName": "Nyala Fund I",
"collateralTokenSymbol": "NYF1",
"collateralTokenIsin": "DE000A0F5UF5",
"collateralMode": "FREEZE",
"collateralDecimals": 18,
"identityRegistryAddress": "0x0000000000000000000000000000000000000000",
"borrowAssetAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
"borrowAssetSymbol": "USDC",
"borrowAssetDecimals": 6,
"permitSupported": true,
"payToSupported": true,
"collateralFactor": "7500",
"liquidationThreshold": "8500",
"liquidationBonus": "500",
"closeFactor": "5000",
"maxTotalCollateral": "0.0",
"maxUserCollateral": "0.0",
"useDutchAuction": false,
"totalDeposits": "1000000.0",
"totalBorrows": "250000.0",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "83.1938",
"curator": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"seekingCurator": false,
"curatorImported": false,
"realizationMode": "ISSUER_REDEMPTION",
"liquidityCommitment": "1000000000000",
"rateMode": "CLAMPED",
"rateFloor": "200",
"rateCap": "1200",
"maxFixedRate": null,
"operatorShare": "800",
"reserveRatio": "500",
"maxLoanDuration": "15552000",
"termGracePeriod": "432000",
"terminalDueDate": null,
"termPenalty": "300",
"marketDueFloor": null,
"allowExtension": true,
"isStale": false,
"priceAge": 3241,
"maxPriceAge": 86400,
"oracleLastUpdate": "2026-09-25T11:06:00.000Z",
"active": true,
"createdAt": "2026-09-01T09:00:00.000Z",
"isOnChain": true,
"onChain": {
"isOnChain": true,
"paused": false,
"totalDeposits": "1000000.0",
"totalBorrows": "250000.0",
"availableLiquidity": "750000.0",
"borrowableLiquidity": "700000.0",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "83.1938",
"activeLoans": 4,
"activeAuctions": 0,
"pendingLiquidations": 0,
"pendingLiquidationDebt": "0.0"
}
}
]
},
"error": null,
"metadata": {
"timestamp": "2026-09-25T12:00:00.000Z",
"requestId": "7c1e4b2a-9f3d-4e8a-b5c6-2d1f0a9e8b7c",
"instanceId": "inst_abc123"
}
}
Returns every active market recorded on the instance bound to your API key: the markets it deployed and the markets it took the lender-of-record role on. Archived and inactive markets are excluded.
The stored record is served by default and
The queue and adoption routes, the asset data routes and the pledge routes are keyed by the contract address instead. See Base Path.
onChain is null. Live per-market state is opt-in through includeOnChain, because enriching a list runs a 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.
Enrichment is best effort. When the chain cannot be read for a market, its onChain block carries isOnChain: false and zeroed figures, plus readFailed: true for a market that has a deployed contract. The stored fields are served regardless, so check onChain.isOnChain 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
The market’s record ID. Send it as
marketId on every other endpoint. See Market IDs.string
Lending module 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.
null while the market is seeking a lender of record.string
Address holding
OPERATOR_ROLE on this market’s liquidation router, or null when none is recorded.string
Where seized collateral is sent for realization. Fixed when the lender of record took the role. The router admin can rotate it only through an announced, one-hour-delayed flow, which this API key surface does not expose.
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 borrower identity register recorded for the market, lowercased. The zero address or
null means the market has no borrower register. identityGate on Get Market reads the register from the contract itself.string
Settlement token (stablecoin) 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.boolean
Whether the market’s implementation can pay a loan’s proceeds to a wallet other than the borrower, so Open Loan accepts
payToAddress. false on an implementation without the pay-to entry point, null when the implementation could not be read or the market has no address.string
Maximum loan to value in basis points, as last recorded.
string
Liquidation trigger in basis points, as last recorded.
string
The market’s liquidation penalty in basis points, as last recorded. The contract calls it
liquidationPenalty.string
Maximum fraction of debt repayable in one liquidation, in basis points.
string
Supply cap across the market, in collateral units.
"0.0" means uncapped.string
Supply cap per borrower, in collateral units.
"0.0" means uncapped.boolean
Whether liquidations open a Dutch auction.
string
Last recorded pool liquidity, in borrow asset units.
string
Last recorded outstanding principal, in borrow asset units.
string
Last recorded utilization in basis points.
string
Last recorded borrow rate in basis points. On a
FIXED market it is the rate stamped onto new loans, not the model’s curve.string
Last recorded supply rate in basis points. It can carry up to four decimal places.
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. 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. Opening a loan, borrowing more and providing liquidity are 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. UNDECLARED while the market is seeking a lender of record.string
Liquidity the lender of record committed when it took the role, as an integer string in the borrow asset’s base units. A commitment of 1,000,000 USDC reads
"1000000000000".Rate and term offering
Set at deployment. The rate mode, fixed-rate ceiling, term configuration, extension switch and reserve ratio can each change afterwards through their own endpoints. These columns are healed from the chain whenever the market is read in detail or an offering change is confirmed, so a list read can trail the chain. Rate values are basis-point strings, 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. On FIXED it equals the fixed rate.string
Cap the model holds to.
"0" on CURVE. On FIXED it equals the fixed rate.string
Ceiling on any fixed rate the rate model owner can set, or
null when none is recorded. It can only move down.string
The lender of record’s share of repaid interest after the Trusset infrastructure fee, in basis points. On current markets it is the factory’s fixed
800, and a fixed 5 percent distributor share is taken beside it. Get Fee Split reads the whole split from the contracts.string
Share of the pool held back from borrowing, in basis points.
string
Seconds a loan may run before it falls due.
"0" means no rolling term, and the market makes open-ended loans unless terminalDueDate is set.string
Seconds after the due date before an unpaid loan can be liquidated on its term.
string
Unix seconds every loan falls due by, whatever its own duration, or
null.string
Penalty charged when an overdue loan is liquidated on its term, in basis points.
string
Market-wide extension floor in unix seconds: no termed loan falls due before it. Raised through a
FLOOR extension, null when never set.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
boolean
Whether the stored price is older than the oracle’s
maxPriceAge. null when the oracle could not be read, which is not the same as fresh.integer
Seconds since the last price update, or
null.integer
The oracle’s staleness bound in seconds, or
null.string
ISO 8601 timestamp of the last price update, or
null.The stored totals are refreshed when loan and liquidity transactions are confirmed through this API, and when the market is synchronized from the chain. Treat the
onChain block as authoritative for live figures.Market IDs
Every route that takesmarketId in its path, and Get Router Stats in its query, takes the market’s record ID: the id this list returns, such as cmssh7p1k0001cghxq2m4v8rz. The market’s contract address is marketAddress, and it is not accepted in its place. Each instance that deployed a market or took the lender-of-record role on it keeps its own record of the market, so one contract address can carry a different ID on each instance.
A contract address sent as marketId answers 404 MARKET_NOT_FOUND. When your instance holds a market at that address, the message names its record ID, and details carries marketId and marketAddress, so the call can be repeated with the ID. When it holds none, details carries marketAddress alone. Any other ID your instance does not hold answers MARKET_NOT_FOUND with no details.
{
"success": false,
"error": {
"code": "MARKET_NOT_FOUND",
"message": "marketId is the market's record id, not its contract address. This instance holds the market at 0x70a0e25c7b768b87e658348b3b577678a173e038 as cmssh7p1k0001cghxq2m4v8rz: send that id instead.",
"details": {
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038"
}
}
}
curl "https://api.trusset.org/lending-external-securities-v2/api/markets?includeOnChain=true" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
'https://api.trusset.org/lending-external-securities-v2/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?.borrowableLiquidity ?? 'unavailable');
}
{
"success": true,
"data": {
"markets": [
{
"id": "cmssh7p1k0001cghxq2m4v8rz",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"oracleAddress": "0x3b25752c1459c5cf1b0bfcfdf0d56883c8047423",
"insuranceFundAddress": "0x8f1a4c2e9b7d3056a1e8c4f29d0b7a3e5c619c22",
"adapterAddress": "0x4d2b9e71c3a05f8d6e2b41c7a9f03d58e6b177ae",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"collateralAgent": "0x5a1f7c3e9d2b4068e1c5a7f3b9d0e2c4a6f81666",
"liquidationOperator": "0x7e2c4a9f1b3d5068c2e4a6f8b0d1c3e5a7f92888",
"saleRecipient": "0x9c3e5a7f1b2d4068e0c2a4f6b8d9e1c3a5f70b11",
"priceSource": "NAV",
"externalOracleFeed": null,
"collateralTokenAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
"collateralTokenName": "Nyala Fund I",
"collateralTokenSymbol": "NYF1",
"collateralTokenIsin": "DE000A0F5UF5",
"collateralMode": "FREEZE",
"collateralDecimals": 18,
"identityRegistryAddress": "0x0000000000000000000000000000000000000000",
"borrowAssetAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
"borrowAssetSymbol": "USDC",
"borrowAssetDecimals": 6,
"permitSupported": true,
"payToSupported": true,
"collateralFactor": "7500",
"liquidationThreshold": "8500",
"liquidationBonus": "500",
"closeFactor": "5000",
"maxTotalCollateral": "0.0",
"maxUserCollateral": "0.0",
"useDutchAuction": false,
"totalDeposits": "1000000.0",
"totalBorrows": "250000.0",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "83.1938",
"curator": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"seekingCurator": false,
"curatorImported": false,
"realizationMode": "ISSUER_REDEMPTION",
"liquidityCommitment": "1000000000000",
"rateMode": "CLAMPED",
"rateFloor": "200",
"rateCap": "1200",
"maxFixedRate": null,
"operatorShare": "800",
"reserveRatio": "500",
"maxLoanDuration": "15552000",
"termGracePeriod": "432000",
"terminalDueDate": null,
"termPenalty": "300",
"marketDueFloor": null,
"allowExtension": true,
"isStale": false,
"priceAge": 3241,
"maxPriceAge": 86400,
"oracleLastUpdate": "2026-09-25T11:06:00.000Z",
"active": true,
"createdAt": "2026-09-01T09:00:00.000Z",
"isOnChain": true,
"onChain": {
"isOnChain": true,
"paused": false,
"totalDeposits": "1000000.0",
"totalBorrows": "250000.0",
"availableLiquidity": "750000.0",
"borrowableLiquidity": "700000.0",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "83.1938",
"activeLoans": 4,
"activeAuctions": 0,
"pendingLiquidations": 0,
"pendingLiquidationDebt": "0.0"
}
}
]
},
"error": null,
"metadata": {
"timestamp": "2026-09-25T12:00:00.000Z",
"requestId": "7c1e4b2a-9f3d-4e8a-b5c6-2d1f0a9e8b7c",
"instanceId": "inst_abc123"
}
}
⌘I
curl "https://api.trusset.org/lending-external-securities-v2/api/markets?includeOnChain=true" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
'https://api.trusset.org/lending-external-securities-v2/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?.borrowableLiquidity ?? 'unavailable');
}
{
"success": true,
"data": {
"markets": [
{
"id": "cmssh7p1k0001cghxq2m4v8rz",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"oracleAddress": "0x3b25752c1459c5cf1b0bfcfdf0d56883c8047423",
"insuranceFundAddress": "0x8f1a4c2e9b7d3056a1e8c4f29d0b7a3e5c619c22",
"adapterAddress": "0x4d2b9e71c3a05f8d6e2b41c7a9f03d58e6b177ae",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"collateralAgent": "0x5a1f7c3e9d2b4068e1c5a7f3b9d0e2c4a6f81666",
"liquidationOperator": "0x7e2c4a9f1b3d5068c2e4a6f8b0d1c3e5a7f92888",
"saleRecipient": "0x9c3e5a7f1b2d4068e0c2a4f6b8d9e1c3a5f70b11",
"priceSource": "NAV",
"externalOracleFeed": null,
"collateralTokenAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
"collateralTokenName": "Nyala Fund I",
"collateralTokenSymbol": "NYF1",
"collateralTokenIsin": "DE000A0F5UF5",
"collateralMode": "FREEZE",
"collateralDecimals": 18,
"identityRegistryAddress": "0x0000000000000000000000000000000000000000",
"borrowAssetAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
"borrowAssetSymbol": "USDC",
"borrowAssetDecimals": 6,
"permitSupported": true,
"payToSupported": true,
"collateralFactor": "7500",
"liquidationThreshold": "8500",
"liquidationBonus": "500",
"closeFactor": "5000",
"maxTotalCollateral": "0.0",
"maxUserCollateral": "0.0",
"useDutchAuction": false,
"totalDeposits": "1000000.0",
"totalBorrows": "250000.0",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "83.1938",
"curator": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"seekingCurator": false,
"curatorImported": false,
"realizationMode": "ISSUER_REDEMPTION",
"liquidityCommitment": "1000000000000",
"rateMode": "CLAMPED",
"rateFloor": "200",
"rateCap": "1200",
"maxFixedRate": null,
"operatorShare": "800",
"reserveRatio": "500",
"maxLoanDuration": "15552000",
"termGracePeriod": "432000",
"terminalDueDate": null,
"termPenalty": "300",
"marketDueFloor": null,
"allowExtension": true,
"isStale": false,
"priceAge": 3241,
"maxPriceAge": 86400,
"oracleLastUpdate": "2026-09-25T11:06:00.000Z",
"active": true,
"createdAt": "2026-09-01T09:00:00.000Z",
"isOnChain": true,
"onChain": {
"isOnChain": true,
"paused": false,
"totalDeposits": "1000000.0",
"totalBorrows": "250000.0",
"availableLiquidity": "750000.0",
"borrowableLiquidity": "700000.0",
"utilizationRate": "2500",
"borrowRate": "450",
"supplyRate": "83.1938",
"activeLoans": 4,
"activeAuctions": 0,
"pendingLiquidations": 0,
"pendingLiquidationDebt": "0.0"
}
}
]
},
"error": null,
"metadata": {
"timestamp": "2026-09-25T12:00:00.000Z",
"requestId": "7c1e4b2a-9f3d-4e8a-b5c6-2d1f0a9e8b7c",
"instanceId": "inst_abc123"
}
}
