SDK Reference
Typed client for the read-only BOLT v1 API. Every call returns { data, meta }.
typed client
Install
npm i @bolt/sdkTyped example
import { boltClient } from '@bolt/sdk';
const bolt = boltClient({ baseUrl: process.env.BOLT_API_URL });
// Typed markets call — data + provenance envelope.
const { data, meta } = await bolt.markets();
data.markets
.filter((m) => m.status === 'HEALTHY')
.forEach((m) => console.log(m.pool, m.volume?.swaps24h));
console.log('as of block', meta.blockNumber, 'age', meta.freshness.ageSec, 's');Error codes
| Code | HTTP | When |
|---|---|---|
| VALIDATION | THIN | Malformed params or address |
| POOL_MISSING | THIN | Pool / resource not found |
| INSUFFICIENT_OBSERVATIONS | THIN | Oracle cardinality too low to price |
| STALE_DATA | HIGH RISK | Data older than freshness threshold |
| RPC_FAILURE | HIGH RISK | Upstream RPC unreachable |