Chain-qualified identifiers
An asset is named by its chain and address — never by a ticker alone.
"solana:EPjF…Dt1v""USDC"A public API and TypeScript SDK for the BACKT registry, quotes and evidence records.
Three static resources any host can serve, and five dynamic endpoints that run locally in the SDK or on a server you run.
| Method | Endpoint | Purpose | Runs |
|---|---|---|---|
| Static resourcesserved as JSON | |||
| GET | /v1/assets | List and filter the curated asset registry. | Static resourcefiltered client-side |
| GET | /v1/assets/{id} | Retrieve a market passport, addresses and evidence. | Static resource |
| GET | /v1/agents | Read agent descriptions, capabilities and strategy versions. | Static resource |
| Dynamic endpointslocal SDK or your own server | |||
| POST | /v1/quotes | Request execution quotes through provider adapters. | Local runtimeor a server you run |
| POST | /v1/portfolios/plan | Calculate an allocation from user constraints. | Local runtimeor a server you run |
| POST | /v1/scenarios | Run a stress test on live inputs; results return as scenario records. | Local runtimeor a server you run |
| POST | /v1/agents/run | Execute a scoped agent workflow and return evidence. | Local runtimeor a server you run |
| POST | /v1/transactions/prepare | Prepare unsigned transaction payloads for wallet review. | Local runtimeor a server you run |
The API never accepts private wallet keys and never signs for users. Preparation ends at an unsigned payload for wallet review.
Endpoints that call Jupiter or GeckoTerminal inherit their rate limits. A limit reached returns rate_limited, with the provider named.
Every result carries a schema version, request ID, status and data payload. Each data record carries its own classification, so a mixed result is labeled line by line.
| Field | Meaning |
|---|---|
| Every result | |
schemaVersion | Version of the contract the result conforms to. |
requestId | Identifier for tracing one request through adapters and logs. |
status | Whether the request succeeded. Freshness lives on each record. |
data | The payload. Records inside it carry their own classification. |
| Every data record | |
classification | LiveDerivedScenarioUnavailableExactly one per record, sent as live, derived, scenario or unavailable. |
sources | References to where the value came from — a provider, an issuer document or input records. |
observedAt · retrievedAt | When the value was observed at its source, and when it was fetched. |
expiresAt | When the value stops being usable, such as a quote’s expiry. |
assumptions | The assumptions and shock parameters behind derived or scenario values. |
A live price, a derived price impact, a stress-test result and a field whose source went stale.
{
"schemaVersion": "1.0",
"requestId": "req_7Q5M3X9V",
"status": "ok",
"data": {
"asset": "solana:A1KLoBrKBde8Ty9qtNQUtq3C2ortoC3u7twggz7sEto6",
"records": [
{
"field": "price",
"classification": "live",
"value": "1.0931",
"unit": "USD",
"sources": [{ "provider": "jupiter", "kind": "token-price" }],
"observedAt": "2026-10-12T14:02:08Z",
"retrievedAt": "2026-10-12T14:02:09Z",
"expiresAt": "2026-10-12T14:02:39Z"
},
{
"field": "priceImpact",
"classification": "derived",
"value": "0.0031",
"method": "abs(priceImpact) from a live quote at trade size",
"inputTimestamps": { "quote": "2026-10-12T14:02:08Z" },
"size": {
"asset": "solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"baseUnits": "200000000",
"decimals": 6
},
"expiresAt": "2026-10-12T14:02:39Z"
},
{
"field": "stressedValueChange",
"classification": "scenario",
"value": "-0.079",
"inputTimestamps": { "price": "2026-10-12T14:02:08Z" },
"assumptions": {
"priceShock": "-0.10",
"liquidityShock": "-0.40",
"bridgeDelayMinutes": 30
}
},
{
"field": "redemptionTerms",
"classification": "unavailable",
"value": null,
"reason": "stale_data",
"sources": [{ "issuer": "Ondo", "kind": "issuer-document" }],
"lastObservedAt": "2026-10-03T09:00:00Z"
}
]
}
}priceNamed source, observation and retrieval times, and an expiry.
priceImpactMethod and input timestamp, at a stated trade size.
stressedValueChangeA stress test on live inputs, with its shock parameters attached.
redemptionTermsThe source went stale, so the value is null with a reason.
Errors distinguish invalid input, unsupported assets or routes, stale data, provider failure and rate limiting.
invalid_inputunsupported_asset · unsupported_routestale_dataprovider_failurerate_limitedChain-qualified asset identifiers, decimal strings or integer base units for money, and explicit asset decimals. Token amounts are never calculated with floating-point arithmetic.
An asset is named by its chain and address — never by a ticker alone.
"solana:EPjF…Dt1v""USDC"Human-readable amounts travel as strings, so nothing is rounded on the way.
"amount": "200.00""amount": 200.0Or as an integer in the asset’s smallest unit, with its decimals stated alongside.
"baseUnits": "200000000", "decimals": 6"baseUnits": 2e8Token amounts are never calculated with floating-point arithmetic.
BigInt("200000000")0.1 + 0.2 → 0.30000000000000004Every module in @backt/sdk returns the response contract above.
backt.registry01Asset discovery, market passports and source records.
listAssets()getAssetPassport()backt.agents02Agent manifests and scoped workflow execution.
runAgent()backt.portfolio03Allocation planning and exposure calculations.
planPortfolio()backt.scenarios04Stress tests on live inputs, returned as scenario records.
runScenario()backt.routes05Quote adapters for Jupiter routes on Solana.
getQuotes()backt.transactions06Unsigned payload preparation and wallet handoff.
prepareTransactions()backt.evidence07Schema validation, freshness checks and data classification.
No module holds private keys, signs transactions or spends on its own. transactions stops at an unsigned payload.
Local mode runs calculations and stress tests in the browser or your own runtime. Remote mode connects to an HTTP deployment you configure.
createClient({ transport: 'local' })createClient({ transport: 'remote', endpoint: '<your deployment>' })import { createClient } from '@backt/sdk'
const USDC = 'solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
// Local transport: calculations and stress tests run in this runtime.
const backt = createClient({ transport: 'local' })
// registry: static JSON, filtered client-side
const assets = await backt.registry.listAssets({ class: 'treasuries', chain: 'solana' })
const passport = await backt.registry.getAssetPassport(assets.data[0].id)
// agents: a scoped workflow that returns its evidence
const scout = await backt.agents.runAgent('scout', { brief: 'Tokenized Treasury products' })
// portfolio: money as decimal strings, never floats
const plan = await backt.portfolio.planPortfolio({
budget: { amount: '200.00', asset: USDC, decimals: 6 },
maxWeight: 0.4,
candidates: scout.data.candidates,
})
// scenarios: stress tests on live inputs; every record comes back 'scenario'
const stress = await backt.scenarios.runScenario({
plan: plan.data,
shocks: { price: '-0.10', liquidity: '-0.40', bridgeDelayMinutes: 30 },
})
// routes, then transactions: every quote carries an expiry
const quotes = await backt.routes.getQuotes({ plan: plan.data })
const unsigned = await backt.transactions.prepareTransactions({ quotes: quotes.data })
// Hand the unsigned payload to the user's wallet to sign.
// The SDK never holds keys or signs.The rules that keep scenario results, provider secrets and user funds where they belong.
Scenario tools are separate from execution adapters, so a scenario result can’t prepare a trade.
Provider responses and verified token addresses are checked before any transaction is prepared.
Prepared actions are bound to the user-approved asset, recipient, amount, slippage and quote expiry.
Every execution requires a fresh wallet approval. Nothing spends on its own.
The API never accepts private wallet keys and never signs transactions on a user’s behalf.
Provider secrets stay in the user’s local runtime or a creator’s protected server. Shared secrets are never embedded in the frontend.
Remotely deployed dynamic endpoints get input limits, request cancellation and rate limits.
Schemas, amount calculations, provider error handling, freshness thresholds — and the separation of scenario outputs from real execution.