Resource APIs
Canonical Torq REST resources, pagination, freshness, and wallet-scoped reads.
REST resources are available under /v1 for networks, deployments, assets, entities, oracles,
markets, credit facilities, vaults, tranches, positions, activity, eligibility,
liquidation/recovery, partner programs, wrappers, fees, NAV reports, allocation intelligence, and
messaging.
Complete detail responses or only the fields you need
Vault, market, and distressed-fund detail endpoints return the complete canonical page model by
default. Use fields when a card, table, mobile view, or agent needs only a few values. Torq still
returns the resource identity, chain, address, and freshness evidence when those fields exist.
curl 'https://api.torq.finance/v1/vaults/vault_123?fields=netApyBps,totalAssets,portfolioLiquidity.immediatelyAvailableAssets' \
-H 'x-torq-publishable-key: $TORQ_PUBLISHABLE_KEY'const snapshot = await torq.resources.vaults.select(vaultId, [
'netApyBps',
'totalAssets',
'portfolioLiquidity.immediatelyAvailableAssets',
'publicMetrics.queueStatus',
]);Invalid or unavailable field paths return 400 invalid_fields; they never silently disappear or
fall back to an inferred value. The operation page lists every supported top-level and dotted field.
Detail-page API coverage
| Product | Complete response | Focused collections | Examples of separately selectable fields |
|---|---|---|---|
| Vault | GET /v1/vaults/{resourceId} | /allocations, /liquidity, /activity, /share-mobility, /history | netApyBps, totalAssets, sharePrice, baseAsset, assetManager, feeAccruals.performanceFeeRateBps, publicMetrics.averageRedemptionSettlementSeconds, publicMetrics.largestWithdrawal30dAssets, publicMetrics.ecosystemConcentrationBps, publicMetrics.queueStatus |
| Market | GET /v1/markets/{resourceId} | /activity, /allocators, /history | availableLiquidity, borrowRateAprBps, displayLtvBps, lltvBps, targetUtilizationPct, closeFactorBps, liquidationBonusBps, funding.partitionCount, collateralAsset.economicsTaxonomy, oracle.priceWad |
| Recovery fund | GET /v1/funds/{resourceId} | /holdings, /epochs | navAssets, managerAddress, fundReadinessApproved, impairmentStatus, purchasesEnabled, performanceFeeBps, preferredReturnBps, currentEpoch.status |
Historical endpoints return canonical time buckets rather than chart-ready guesses. Integrators can reproduce Torq charts, choose a different window, or compute their own averages while retaining the bucket interval, timestamps, block evidence, and freshness contract.
Collections use the same envelope:
{
"items": [],
"pageInfo": {
"hasMore": false,
"nextCursor": null
},
"freshness": {
"status": "healthy",
"lagSeconds": 2
}
}Use opaque cursors as returned. Page size is capped at 100. Wallet-scoped endpoints return only rows owned by the authenticated wallet session.