get_symbol_coverage
Retrieve detailed data coverage metrics for any symbol on a specific exchange, including completeness, detected gaps, and cadence.
Instructions
Get detailed data coverage for a specific symbol on a venue scope. Returns per-data-type coverage with earliest/latest, total records, completeness, detected data gaps, and cadence metrics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exchange | Yes | Venue scope | |
| symbol | Yes | Symbol, e.g. 'BTC', 'ETH', 'km:US500' | |
| from | No | Start of gap detection window (Unix ms or ISO). Defaults to 30 days ago. | |
| to | No | End of gap detection window (Unix ms or ISO). Defaults to now. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Result data object |
Implementation Reference
- src/index.ts:1965-1986 (registration)Tool registration for get_symbol_coverage — registers the tool with input schema (exchange, symbol, from, to) and handler that delegates to api().dataQuality.symbolCoverage()
registerTool( "get_symbol_coverage", "Get detailed data coverage for a specific symbol on a venue scope. Returns per-data-type coverage with earliest/latest, total records, completeness, detected data gaps, and cadence metrics.", { exchange: z.enum(["hyperliquid", "lighter", "hip3"]).describe("Venue scope"), symbol: z.string().describe("Symbol, e.g. 'BTC', 'ETH', 'km:US500'"), from: TimestampParam.describe("Start of gap detection window (Unix ms or ISO). Defaults to 30 days ago."), to: TimestampParam.describe("End of gap detection window (Unix ms or ISO). Defaults to now."), }, ObjectOutputSchema, async (params) => { const options: Record<string, unknown> = {}; if (params.from != null) options.from = toUnixMs(params.from); if (params.to != null) options.to = toUnixMs(params.to); const data = await api().dataQuality.symbolCoverage( params.exchange, params.symbol, Object.keys(options).length > 0 ? options as any : undefined ); return formatResponse(data); } ); - src/index.ts:1968-1973 (schema)Input schema for get_symbol_coverage: exchange (hyperliquid/lighter/hip3), symbol string, optional from/to timestamps
{ exchange: z.enum(["hyperliquid", "lighter", "hip3"]).describe("Venue scope"), symbol: z.string().describe("Symbol, e.g. 'BTC', 'ETH', 'km:US500'"), from: TimestampParam.describe("Start of gap detection window (Unix ms or ISO). Defaults to 30 days ago."), to: TimestampParam.describe("End of gap detection window (Unix ms or ISO). Defaults to now."), }, - src/index.ts:139-141 (schema)Output schema used by get_symbol_coverage — returns a single data object
const ObjectOutputSchema: ZodRawShape = { data: z.record(z.unknown()).describe("Result data object"), }; - src/index.ts:147-154 (helper)Helper used to convert from/to timestamps to Unix milliseconds before passing to the SDK
function toUnixMs(ts: number | string): number { if (typeof ts === "number") return ts; // MCP/JSON-RPC may deliver numeric timestamps as strings if (/^\d+$/.test(ts)) return Number(ts); const parsed = Date.parse(ts); if (isNaN(parsed)) throw new Error(`Invalid timestamp: "${ts}"`); return parsed; } - src/index.ts:1975-1985 (handler)Handler logic for get_symbol_coverage — extracts params, builds optional from/to options, calls api().dataQuality.symbolCoverage(), and formats the response
async (params) => { const options: Record<string, unknown> = {}; if (params.from != null) options.from = toUnixMs(params.from); if (params.to != null) options.to = toUnixMs(params.to); const data = await api().dataQuality.symbolCoverage( params.exchange, params.symbol, Object.keys(options).length > 0 ? options as any : undefined ); return formatResponse(data); }