get_data_incidents
List data quality incidents with filters for status, exchange, or time. Get severity, duration, root cause, and resolution details.
Instructions
List data quality incidents (outages, gaps, degradations). Filter by status, exchange, or time. Returns incident details including severity, affected data types, duration, root cause, and resolution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter incidents by status | |
| exchange | No | Venue scope | |
| since | No | Only incidents after this time (Unix ms or ISO) | |
| limit | No | Max results (default 20, max 100) | |
| offset | No | Pagination offset |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Result data object |
Implementation Reference
- src/index.ts:1916-2012 (registration)The tool 'get_data_incidents' is registered using the registerTool helper on lines 1989-2012. It takes optional filter parameters (status, exchange, since, limit, offset) and calls api().dataQuality.listIncidents() to list data quality incidents.
const ExchangeParam = z .enum(["hyperliquid", "lighter", "hip3"]) .optional() .describe("Venue scope"); const IncidentStatusParam = z .enum(["open", "investigating", "identified", "monitoring", "resolved"]) .optional() .describe("Filter incidents by status"); // 30. System Status registerTool( "get_data_quality_status", "Get the current system status for supported venue APIs and data types. Returns overall health (operational/degraded/outage), per-scope status with latency, per-data-type completeness, and active incident count.", {}, ObjectOutputSchema, async () => { const data = await api().dataQuality.status(); return formatResponse(data); } ); // 30. Coverage Overview registerTool( "get_data_coverage", "Get data coverage across supported venue APIs. Returns earliest/latest timestamps, total records, symbol count, resolution, lag, and completeness per data type per venue scope.", {}, ObjectOutputSchema, async () => { const data = await api().dataQuality.coverage(); return formatResponse(data); } ); // Exchange Coverage registerTool( "get_exchange_coverage", "Get data coverage for a specific venue scope. Returns earliest/latest timestamps, total records, symbol count, resolution, and completeness per data type.", { exchange: z.enum(["hyperliquid", "lighter", "hip3"]).describe("Venue scope"), }, ObjectOutputSchema, async (params) => { const data = await api().dataQuality.exchangeCoverage(params.exchange); return formatResponse(data); } ); // 31. Symbol Coverage 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); } ); // 32. Incidents registerTool( "get_data_incidents", "List data quality incidents (outages, gaps, degradations). Filter by status, exchange, or time. Returns incident details including severity, affected data types, duration, root cause, and resolution.", { status: IncidentStatusParam, exchange: ExchangeParam, since: TimestampParam.describe("Only incidents after this time (Unix ms or ISO)"), limit: z.number().optional().describe("Max results (default 20, max 100)"), offset: z.number().optional().describe("Pagination offset"), }, ObjectOutputSchema, async (params) => { const sdkParams: Record<string, unknown> = {}; if (params.status) sdkParams.status = params.status; if (params.exchange) sdkParams.exchange = params.exchange; if (params.since != null) sdkParams.since = typeof params.since === "string" ? toUnixMs(params.since) : params.since; if (params.limit) sdkParams.limit = params.limit; if (params.offset) sdkParams.offset = params.offset; const data = await api().dataQuality.listIncidents( Object.keys(sdkParams).length > 0 ? sdkParams as any : undefined ); return formatResponse(data); } ); - src/index.ts:1916-1924 (schema)Schema definitions for the incident status enum (IncidentStatusParam) and exchange enum (ExchangeParam) used as input schema for get_data_incidents.
const ExchangeParam = z .enum(["hyperliquid", "lighter", "hip3"]) .optional() .describe("Venue scope"); const IncidentStatusParam = z .enum(["open", "investigating", "identified", "monitoring", "resolved"]) .optional() .describe("Filter incidents by status"); - src/index.ts:1916-1936 (helper)Supporting schemas and the registerTool helper (lines 328-358) used to register get_data_incidents.
const ExchangeParam = z .enum(["hyperliquid", "lighter", "hip3"]) .optional() .describe("Venue scope"); const IncidentStatusParam = z .enum(["open", "investigating", "identified", "monitoring", "resolved"]) .optional() .describe("Filter incidents by status"); // 30. System Status registerTool( "get_data_quality_status", "Get the current system status for supported venue APIs and data types. Returns overall health (operational/degraded/outage), per-scope status with latency, per-data-type completeness, and active incident count.", {}, ObjectOutputSchema, async () => { const data = await api().dataQuality.status(); return formatResponse(data); } ); - src/index.ts:328-358 (helper)The registerTool helper function that wraps server.registerTool with API key validation and error handling.
function registerTool( name: string, description: string, inputSchema: ZodRawShape, outputSchema: ZodRawShape, handler: (params: any) => Promise<McpContent> ): void { server.registerTool( name, { description, inputSchema, outputSchema, annotations: TOOL_ANNOTATIONS, }, async (params: any) => { if (!client) { return { content: [{ type: "text" as const, text: MISSING_KEY_MESSAGE }], isError: true, }; } try { return await handler(params); } catch (err) { const error = err instanceof OxArchiveError ? err : new OxArchiveError(String(err), 500); return formatError(error); } } ); } - src/index.ts:1916-2012 (handler)The handler function (lines 2000-2011) that collects optional filter params (status, exchange, since, limit, offset), builds an SDK params object, and calls api().dataQuality.listIncidents() to fetch and return incident data.
const ExchangeParam = z .enum(["hyperliquid", "lighter", "hip3"]) .optional() .describe("Venue scope"); const IncidentStatusParam = z .enum(["open", "investigating", "identified", "monitoring", "resolved"]) .optional() .describe("Filter incidents by status"); // 30. System Status registerTool( "get_data_quality_status", "Get the current system status for supported venue APIs and data types. Returns overall health (operational/degraded/outage), per-scope status with latency, per-data-type completeness, and active incident count.", {}, ObjectOutputSchema, async () => { const data = await api().dataQuality.status(); return formatResponse(data); } ); // 30. Coverage Overview registerTool( "get_data_coverage", "Get data coverage across supported venue APIs. Returns earliest/latest timestamps, total records, symbol count, resolution, lag, and completeness per data type per venue scope.", {}, ObjectOutputSchema, async () => { const data = await api().dataQuality.coverage(); return formatResponse(data); } ); // Exchange Coverage registerTool( "get_exchange_coverage", "Get data coverage for a specific venue scope. Returns earliest/latest timestamps, total records, symbol count, resolution, and completeness per data type.", { exchange: z.enum(["hyperliquid", "lighter", "hip3"]).describe("Venue scope"), }, ObjectOutputSchema, async (params) => { const data = await api().dataQuality.exchangeCoverage(params.exchange); return formatResponse(data); } ); // 31. Symbol Coverage 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); } ); // 32. Incidents registerTool( "get_data_incidents", "List data quality incidents (outages, gaps, degradations). Filter by status, exchange, or time. Returns incident details including severity, affected data types, duration, root cause, and resolution.", { status: IncidentStatusParam, exchange: ExchangeParam, since: TimestampParam.describe("Only incidents after this time (Unix ms or ISO)"), limit: z.number().optional().describe("Max results (default 20, max 100)"), offset: z.number().optional().describe("Pagination offset"), }, ObjectOutputSchema, async (params) => { const sdkParams: Record<string, unknown> = {}; if (params.status) sdkParams.status = params.status; if (params.exchange) sdkParams.exchange = params.exchange; if (params.since != null) sdkParams.since = typeof params.since === "string" ? toUnixMs(params.since) : params.since; if (params.limit) sdkParams.limit = params.limit; if (params.offset) sdkParams.offset = params.offset; const data = await api().dataQuality.listIncidents( Object.keys(sdkParams).length > 0 ? sdkParams as any : undefined ); return formatResponse(data); } );