DOCS · API
READ THE INSTRUMENT BY WIRE.
Every endpoint returns JSON with the block number it was read at. Chain integers are decimal strings. Errors are { error: { code, title, message } } with a matching HTTP status. Routes are rate-limited per IP, read-only, and never forward user input as an RPC method.
/api/market/:addressFull block-stamped reading for a token address, pool address or ticker: price, reserves, liquidity, depth ladder, impact, verdict, evidence.
/api/market/WETH ↗/api/quote?market=&amount=&side=Simulate a USD-sized trade against the pool: amountIn, amountOut, averagePrice (fee excluded), effectivePrice, spotPrice, priceImpact, minimumReceived, blockNumber.
/api/quote?market=AAPL&amount=10000&side=BUY ↗/api/compare?markets=a,b,c,dUp to four readings, each independent with its own block stamp; per-slot errors.
/api/compare?markets=WETH,AAPL ↗/api/marketsThe universe: every registry stock token and configured crypto token with a supported pool, list-mode scores.
/api/markets ↗/api/receipt/:addressSVG market receipt of the current reading (shareable, OG-friendly).
/api/receipt/WETH ↗/api/scan { input }The terminal pipeline with every step recorded (VALIDATING → READING CONTRACT → IDENTIFYING POOL → READING RESERVES → MEASURING DEPTH → CALCULATING IMPACT → PRINTING REPORT).
{"input":"0x…"}/api/receipts/:assetReceipts other wallets stamped on chain for this asset (ReltRegistry), newest first, read at one block.
/api/receipts/0x0bd7d308f8e1639fab988df18a8011f41eacad73 ↗/api/watchlist/:addressThe assets a wallet keeps on chain in ReltRegistry.
/api/watchlist/0x0000000000000000000000000000000000000001 ↗/api/contractsReltStock contract status (QuoterV2, ReltRegistry): configured address, bytecode present, identity verified. Add ?payloads=1 for creation bytecode.
/api/contracts ↗/api/tokenThe $RELT plate: status SOON until RELT_TOKEN_ADDRESS is set, then ERC-20 metadata, pool reading and verdict, live.
/api/token ↗/api/registryNormalized asset registry (symbol, name, tokenAddress, underlyingAsset, assetType, chain, verified). Identity only.
/api/registry ↗/api/statusInstrument diagnostics: RPC endpoints, adapters, registry state, active thresholds.
/api/status ↗MARKET RESPONSE SHAPE
{
chain: { id, name },
blockNumber, timestamp, freshness: { ageSec, bucket: FRESH|AGING|STALE, rpcEndpoint },
token0, token1, asset, quote,
pool: { address, protocol: UNISWAP_V2|UNISWAP_V3, feeTier, factory, verified },
price: { usd, inQuote, withheldReason },
reserves: { asset, quote },
liquidityUsd, totalLiquidityUsd,
depth: { impact05, impact1, impact2, impact5, impact10, side: "BUY", status },
depthDetail: { buy, sell }, // per-level amountIn / usd / OK|PARTIAL|UNAVAILABLE
impact: { tradeUsd, priceImpactPct, status },
activity: { windowBlocks, fromBlock, toBlock, swaps, volumeUsd },
verdict: { verdict, label, score, zone, reasons, components, flags },
source: { rpcEndpoint, latencyMs, evidence, selectedSourceReason, sources },
measuredBy: "ReltStock"
}ADDING A PROTOCOL
Implement MarketAdapter in src/lib/providers/types.ts (discovery specs, block-stamped pool reads, exact-input quote, depth at impact levels) and register it in src/lib/providers/market.ts. Anything without an adapter is reported as UNSUPPORTED MARKET — never approximated. Methodology: /methodology.