@0xarchive/sdk 0.6.5 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -404,11 +404,25 @@ for (const exchange of coverage.exchanges) {
404
404
  const btc = await client.dataQuality.symbolCoverage('hyperliquid', 'BTC');
405
405
  const oi = btc.dataTypes.open_interest;
406
406
  console.log(`BTC OI completeness: ${oi.completeness}%`);
407
+ console.log(`Historical coverage: ${oi.historicalCoverage}%`); // Hour-level granularity
407
408
  console.log(`Gaps found: ${oi.gaps.length}`);
408
409
  for (const gap of oi.gaps.slice(0, 5)) {
409
410
  console.log(` ${gap.durationMinutes} min gap: ${gap.start} -> ${gap.end}`);
410
411
  }
411
412
 
413
+ // Check empirical data cadence (when available)
414
+ const ob = btc.dataTypes.orderbook;
415
+ if (ob.cadence) {
416
+ console.log(`Orderbook cadence: ~${ob.cadence.medianIntervalSeconds}s median, p95=${ob.cadence.p95IntervalSeconds}s`);
417
+ }
418
+
419
+ // Time-bounded gap detection (last 7 days)
420
+ const weekAgo = Date.now() - 7 * 24 * 60 * 60 * 1000;
421
+ const btc7d = await client.dataQuality.symbolCoverage('hyperliquid', 'BTC', {
422
+ from: weekAgo,
423
+ to: Date.now(),
424
+ });
425
+
412
426
  // List incidents with filtering
413
427
  const result = await client.dataQuality.listIncidents({ status: 'open' });
414
428
  for (const incident of result.incidents) {
@@ -435,12 +449,21 @@ console.log(`API P99: ${sla.actual.apiLatencyP99Ms}ms (${sla.actual.latencyStatu
435
449
  | `status()` | Overall system health and per-exchange status |
436
450
  | `coverage()` | Data coverage summary for all exchanges |
437
451
  | `exchangeCoverage(exchange)` | Coverage details for a specific exchange |
438
- | `symbolCoverage(exchange, symbol)` | Coverage with gap detection for specific symbol |
452
+ | `symbolCoverage(exchange, symbol, options?)` | Coverage with gap detection, cadence, and historical coverage |
439
453
  | `listIncidents(params)` | List incidents with filtering and pagination |
440
454
  | `getIncident(incidentId)` | Get specific incident details |
441
455
  | `latency()` | Current latency metrics (WebSocket, REST, data freshness) |
442
456
  | `sla(params)` | SLA compliance metrics for a specific month |
443
457
 
458
+ **Note:** Data Quality endpoints (`coverage()`, `exchangeCoverage()`, `symbolCoverage()`) perform complex aggregation queries and may take 30-60 seconds on first request (results are cached server-side for 5 minutes). If you encounter timeout errors, create a client with a longer timeout:
459
+
460
+ ```typescript
461
+ const client = new OxArchive({
462
+ apiKey: 'ox_your_api_key',
463
+ timeout: 60000 // 60 seconds for data quality endpoints
464
+ });
465
+ ```
466
+
444
467
  ### Legacy API (Deprecated)
445
468
 
446
469
  The following legacy methods are deprecated and will be removed in v2.0. They default to Hyperliquid data:
package/dist/index.d.mts CHANGED
@@ -671,6 +671,15 @@ interface CoverageGap {
671
671
  /** Duration of the gap in minutes */
672
672
  durationMinutes: number;
673
673
  }
674
+ /** Empirical data cadence measurement based on last 7 days of data */
675
+ interface DataCadence {
676
+ /** Median interval between consecutive records in seconds */
677
+ medianIntervalSeconds: number;
678
+ /** 95th percentile interval between consecutive records in seconds */
679
+ p95IntervalSeconds: number;
680
+ /** Number of intervals sampled for this measurement */
681
+ sampleCount: number;
682
+ }
674
683
  /** Coverage for a specific symbol and data type */
675
684
  interface SymbolDataTypeCoverage {
676
685
  /** Earliest available data timestamp */
@@ -679,10 +688,21 @@ interface SymbolDataTypeCoverage {
679
688
  latest: string;
680
689
  /** Total number of records */
681
690
  totalRecords: number;
682
- /** Completeness percentage (0-100) */
691
+ /** 24-hour completeness percentage (0-100) */
683
692
  completeness: number;
684
- /** Detected data gaps */
693
+ /** Historical coverage percentage (0-100) based on hours with data / total hours */
694
+ historicalCoverage?: number;
695
+ /** Detected data gaps within the requested time window */
685
696
  gaps: CoverageGap[];
697
+ /** Empirical data cadence (present when sufficient data exists) */
698
+ cadence?: DataCadence;
699
+ }
700
+ /** Options for symbol coverage query */
701
+ interface SymbolCoverageOptions {
702
+ /** Start of gap detection window (Unix milliseconds). Default: now - 30 days */
703
+ from?: number;
704
+ /** End of gap detection window (Unix milliseconds). Default: now */
705
+ to?: number;
686
706
  }
687
707
  /** Per-symbol coverage response */
688
708
  interface SymbolCoverageResponse {
@@ -1658,11 +1678,13 @@ declare class DataQualityResource {
1658
1678
  /**
1659
1679
  * Get data coverage for a specific symbol on an exchange
1660
1680
  *
1661
- * Includes gap detection showing periods where data may be missing.
1681
+ * Includes gap detection, empirical data cadence, and hour-level historical coverage.
1682
+ * Supports optional time bounds for gap detection (default: last 30 days).
1662
1683
  *
1663
1684
  * @param exchange - Exchange name ('hyperliquid' or 'lighter')
1664
1685
  * @param symbol - Symbol name (e.g., 'BTC', 'ETH')
1665
- * @returns SymbolCoverageResponse with per-data-type coverage including gaps
1686
+ * @param options - Optional time bounds for gap detection window
1687
+ * @returns SymbolCoverageResponse with per-data-type coverage including gaps, cadence, and historical coverage
1666
1688
  *
1667
1689
  * @example
1668
1690
  * ```typescript
@@ -1673,9 +1695,21 @@ declare class DataQualityResource {
1673
1695
  * for (const gap of oi.gaps.slice(0, 3)) {
1674
1696
  * console.log(` ${gap.durationMinutes} min gap at ${gap.start}`);
1675
1697
  * }
1698
+ *
1699
+ * // Check cadence
1700
+ * if (btc.dataTypes.orderbook.cadence) {
1701
+ * console.log(`Cadence: ~${btc.dataTypes.orderbook.cadence.medianIntervalSeconds}s`);
1702
+ * }
1703
+ *
1704
+ * // Time-bounded (last 7 days)
1705
+ * const weekAgo = Date.now() - 7 * 24 * 60 * 60 * 1000;
1706
+ * const btc7d = await client.dataQuality.symbolCoverage('hyperliquid', 'BTC', {
1707
+ * from: weekAgo,
1708
+ * to: Date.now(),
1709
+ * });
1676
1710
  * ```
1677
1711
  */
1678
- symbolCoverage(exchange: string, symbol: string): Promise<SymbolCoverageResponse>;
1712
+ symbolCoverage(exchange: string, symbol: string, options?: SymbolCoverageOptions): Promise<SymbolCoverageResponse>;
1679
1713
  /**
1680
1714
  * List incidents with filtering and pagination
1681
1715
  *
@@ -3995,4 +4029,4 @@ type ValidatedCandle = z.infer<typeof CandleSchema>;
3995
4029
  type ValidatedLiquidation = z.infer<typeof LiquidationSchema>;
3996
4030
  type ValidatedWsServerMessage = z.infer<typeof WsServerMessageSchema>;
3997
4031
 
3998
- export { type ApiError, type ApiMeta, ApiMetaSchema, type ApiResponse, ApiResponseSchema, type Candle, CandleArrayResponseSchema, type CandleHistoryParams, type CandleInterval, CandleIntervalSchema, CandleSchema, type ClientOptions, type CompletenessMetrics, type CoverageGap, type CoverageResponse, type CursorResponse, type DataFreshness, type DataTypeCoverage, type DataTypeStatus, type ExchangeCoverage, type ExchangeLatency, type ExchangeStatus, type FundingRate, FundingRateArrayResponseSchema, FundingRateResponseSchema, FundingRateSchema, type GetOrderBookParams, type GetTradesCursorParams, HyperliquidClient, type Incident, type IncidentSeverityValue, type IncidentStatusValue, type IncidentsResponse, type Instrument, InstrumentArrayResponseSchema, InstrumentResponseSchema, InstrumentSchema, type InstrumentType, InstrumentTypeSchema, type LatencyResponse, LighterClient, type LighterGranularity, type LighterInstrument, type Liquidation, LiquidationArrayResponseSchema, type LiquidationHistoryParams, LiquidationSchema, LiquidationSideSchema, type LiquidationsByUserParams, type ListIncidentsParams, type OpenInterest, OpenInterestArrayResponseSchema, OpenInterestResponseSchema, OpenInterestSchema, type OrderBook, OrderBookArrayResponseSchema, type OrderBookHistoryParams, OrderBookReconstructor, OrderBookResponseSchema, OrderBookSchema, type OrderbookDelta, OxArchive, OxArchiveError, OxArchiveWs, type Pagination, type PriceLevel, PriceLevelSchema, type ReconstructOptions, type ReconstructedOrderBook, type RestApiLatency, type SlaActual, type SlaParams, type SlaResponse, type SlaTargets, type StatusResponse, type SymbolCoverageResponse, type SymbolDataTypeCoverage, type SystemStatusValue, type TickData, type TickHistoryParams, type Timestamp, type TimestampedRecord, TimestampedRecordSchema, type Trade, TradeArrayResponseSchema, type TradeDirection, TradeDirectionSchema, TradeSchema, type TradeSide, TradeSideSchema, type ValidatedApiMeta, type ValidatedCandle, type ValidatedFundingRate, type ValidatedInstrument, type ValidatedLiquidation, type ValidatedOpenInterest, type ValidatedOrderBook, type ValidatedPriceLevel, type ValidatedTrade, type ValidatedWsServerMessage, type WebSocketLatency, type WsChannel, WsChannelSchema, type WsClientMessage, type WsConnectionState, WsConnectionStateSchema, type WsData, WsDataSchema, type WsError, WsErrorSchema, type WsEventHandlers, type WsHistoricalBatch, WsHistoricalBatchSchema, type WsHistoricalData, WsHistoricalDataSchema, type WsHistoricalTickData, type WsOptions, type WsPing, type WsPong, WsPongSchema, type WsReplay, type WsReplayCompleted, WsReplayCompletedSchema, type WsReplayPause, type WsReplayPaused, WsReplayPausedSchema, type WsReplayResume, type WsReplayResumed, WsReplayResumedSchema, type WsReplaySeek, type WsReplayStarted, WsReplayStartedSchema, type WsReplayStop, type WsReplayStopped, WsReplayStoppedSchema, type WsServerMessage, WsServerMessageSchema, type WsStream, type WsStreamCompleted, WsStreamCompletedSchema, type WsStreamProgress, WsStreamProgressSchema, type WsStreamStarted, WsStreamStartedSchema, type WsStreamStop, type WsStreamStopped, WsStreamStoppedSchema, type WsSubscribe, type WsSubscribed, WsSubscribedSchema, type WsUnsubscribe, type WsUnsubscribed, WsUnsubscribedSchema, OxArchive as default, reconstructFinal, reconstructOrderBook };
4032
+ export { type ApiError, type ApiMeta, ApiMetaSchema, type ApiResponse, ApiResponseSchema, type Candle, CandleArrayResponseSchema, type CandleHistoryParams, type CandleInterval, CandleIntervalSchema, CandleSchema, type ClientOptions, type CompletenessMetrics, type CoverageGap, type CoverageResponse, type CursorResponse, type DataCadence, type DataFreshness, type DataTypeCoverage, type DataTypeStatus, type ExchangeCoverage, type ExchangeLatency, type ExchangeStatus, type FundingRate, FundingRateArrayResponseSchema, FundingRateResponseSchema, FundingRateSchema, type GetOrderBookParams, type GetTradesCursorParams, HyperliquidClient, type Incident, type IncidentSeverityValue, type IncidentStatusValue, type IncidentsResponse, type Instrument, InstrumentArrayResponseSchema, InstrumentResponseSchema, InstrumentSchema, type InstrumentType, InstrumentTypeSchema, type LatencyResponse, LighterClient, type LighterGranularity, type LighterInstrument, type Liquidation, LiquidationArrayResponseSchema, type LiquidationHistoryParams, LiquidationSchema, LiquidationSideSchema, type LiquidationsByUserParams, type ListIncidentsParams, type OpenInterest, OpenInterestArrayResponseSchema, OpenInterestResponseSchema, OpenInterestSchema, type OrderBook, OrderBookArrayResponseSchema, type OrderBookHistoryParams, OrderBookReconstructor, OrderBookResponseSchema, OrderBookSchema, type OrderbookDelta, OxArchive, OxArchiveError, OxArchiveWs, type Pagination, type PriceLevel, PriceLevelSchema, type ReconstructOptions, type ReconstructedOrderBook, type RestApiLatency, type SlaActual, type SlaParams, type SlaResponse, type SlaTargets, type StatusResponse, type SymbolCoverageOptions, type SymbolCoverageResponse, type SymbolDataTypeCoverage, type SystemStatusValue, type TickData, type TickHistoryParams, type Timestamp, type TimestampedRecord, TimestampedRecordSchema, type Trade, TradeArrayResponseSchema, type TradeDirection, TradeDirectionSchema, TradeSchema, type TradeSide, TradeSideSchema, type ValidatedApiMeta, type ValidatedCandle, type ValidatedFundingRate, type ValidatedInstrument, type ValidatedLiquidation, type ValidatedOpenInterest, type ValidatedOrderBook, type ValidatedPriceLevel, type ValidatedTrade, type ValidatedWsServerMessage, type WebSocketLatency, type WsChannel, WsChannelSchema, type WsClientMessage, type WsConnectionState, WsConnectionStateSchema, type WsData, WsDataSchema, type WsError, WsErrorSchema, type WsEventHandlers, type WsHistoricalBatch, WsHistoricalBatchSchema, type WsHistoricalData, WsHistoricalDataSchema, type WsHistoricalTickData, type WsOptions, type WsPing, type WsPong, WsPongSchema, type WsReplay, type WsReplayCompleted, WsReplayCompletedSchema, type WsReplayPause, type WsReplayPaused, WsReplayPausedSchema, type WsReplayResume, type WsReplayResumed, WsReplayResumedSchema, type WsReplaySeek, type WsReplayStarted, WsReplayStartedSchema, type WsReplayStop, type WsReplayStopped, WsReplayStoppedSchema, type WsServerMessage, WsServerMessageSchema, type WsStream, type WsStreamCompleted, WsStreamCompletedSchema, type WsStreamProgress, WsStreamProgressSchema, type WsStreamStarted, WsStreamStartedSchema, type WsStreamStop, type WsStreamStopped, WsStreamStoppedSchema, type WsSubscribe, type WsSubscribed, WsSubscribedSchema, type WsUnsubscribe, type WsUnsubscribed, WsUnsubscribedSchema, OxArchive as default, reconstructFinal, reconstructOrderBook };
package/dist/index.d.ts CHANGED
@@ -671,6 +671,15 @@ interface CoverageGap {
671
671
  /** Duration of the gap in minutes */
672
672
  durationMinutes: number;
673
673
  }
674
+ /** Empirical data cadence measurement based on last 7 days of data */
675
+ interface DataCadence {
676
+ /** Median interval between consecutive records in seconds */
677
+ medianIntervalSeconds: number;
678
+ /** 95th percentile interval between consecutive records in seconds */
679
+ p95IntervalSeconds: number;
680
+ /** Number of intervals sampled for this measurement */
681
+ sampleCount: number;
682
+ }
674
683
  /** Coverage for a specific symbol and data type */
675
684
  interface SymbolDataTypeCoverage {
676
685
  /** Earliest available data timestamp */
@@ -679,10 +688,21 @@ interface SymbolDataTypeCoverage {
679
688
  latest: string;
680
689
  /** Total number of records */
681
690
  totalRecords: number;
682
- /** Completeness percentage (0-100) */
691
+ /** 24-hour completeness percentage (0-100) */
683
692
  completeness: number;
684
- /** Detected data gaps */
693
+ /** Historical coverage percentage (0-100) based on hours with data / total hours */
694
+ historicalCoverage?: number;
695
+ /** Detected data gaps within the requested time window */
685
696
  gaps: CoverageGap[];
697
+ /** Empirical data cadence (present when sufficient data exists) */
698
+ cadence?: DataCadence;
699
+ }
700
+ /** Options for symbol coverage query */
701
+ interface SymbolCoverageOptions {
702
+ /** Start of gap detection window (Unix milliseconds). Default: now - 30 days */
703
+ from?: number;
704
+ /** End of gap detection window (Unix milliseconds). Default: now */
705
+ to?: number;
686
706
  }
687
707
  /** Per-symbol coverage response */
688
708
  interface SymbolCoverageResponse {
@@ -1658,11 +1678,13 @@ declare class DataQualityResource {
1658
1678
  /**
1659
1679
  * Get data coverage for a specific symbol on an exchange
1660
1680
  *
1661
- * Includes gap detection showing periods where data may be missing.
1681
+ * Includes gap detection, empirical data cadence, and hour-level historical coverage.
1682
+ * Supports optional time bounds for gap detection (default: last 30 days).
1662
1683
  *
1663
1684
  * @param exchange - Exchange name ('hyperliquid' or 'lighter')
1664
1685
  * @param symbol - Symbol name (e.g., 'BTC', 'ETH')
1665
- * @returns SymbolCoverageResponse with per-data-type coverage including gaps
1686
+ * @param options - Optional time bounds for gap detection window
1687
+ * @returns SymbolCoverageResponse with per-data-type coverage including gaps, cadence, and historical coverage
1666
1688
  *
1667
1689
  * @example
1668
1690
  * ```typescript
@@ -1673,9 +1695,21 @@ declare class DataQualityResource {
1673
1695
  * for (const gap of oi.gaps.slice(0, 3)) {
1674
1696
  * console.log(` ${gap.durationMinutes} min gap at ${gap.start}`);
1675
1697
  * }
1698
+ *
1699
+ * // Check cadence
1700
+ * if (btc.dataTypes.orderbook.cadence) {
1701
+ * console.log(`Cadence: ~${btc.dataTypes.orderbook.cadence.medianIntervalSeconds}s`);
1702
+ * }
1703
+ *
1704
+ * // Time-bounded (last 7 days)
1705
+ * const weekAgo = Date.now() - 7 * 24 * 60 * 60 * 1000;
1706
+ * const btc7d = await client.dataQuality.symbolCoverage('hyperliquid', 'BTC', {
1707
+ * from: weekAgo,
1708
+ * to: Date.now(),
1709
+ * });
1676
1710
  * ```
1677
1711
  */
1678
- symbolCoverage(exchange: string, symbol: string): Promise<SymbolCoverageResponse>;
1712
+ symbolCoverage(exchange: string, symbol: string, options?: SymbolCoverageOptions): Promise<SymbolCoverageResponse>;
1679
1713
  /**
1680
1714
  * List incidents with filtering and pagination
1681
1715
  *
@@ -3995,4 +4029,4 @@ type ValidatedCandle = z.infer<typeof CandleSchema>;
3995
4029
  type ValidatedLiquidation = z.infer<typeof LiquidationSchema>;
3996
4030
  type ValidatedWsServerMessage = z.infer<typeof WsServerMessageSchema>;
3997
4031
 
3998
- export { type ApiError, type ApiMeta, ApiMetaSchema, type ApiResponse, ApiResponseSchema, type Candle, CandleArrayResponseSchema, type CandleHistoryParams, type CandleInterval, CandleIntervalSchema, CandleSchema, type ClientOptions, type CompletenessMetrics, type CoverageGap, type CoverageResponse, type CursorResponse, type DataFreshness, type DataTypeCoverage, type DataTypeStatus, type ExchangeCoverage, type ExchangeLatency, type ExchangeStatus, type FundingRate, FundingRateArrayResponseSchema, FundingRateResponseSchema, FundingRateSchema, type GetOrderBookParams, type GetTradesCursorParams, HyperliquidClient, type Incident, type IncidentSeverityValue, type IncidentStatusValue, type IncidentsResponse, type Instrument, InstrumentArrayResponseSchema, InstrumentResponseSchema, InstrumentSchema, type InstrumentType, InstrumentTypeSchema, type LatencyResponse, LighterClient, type LighterGranularity, type LighterInstrument, type Liquidation, LiquidationArrayResponseSchema, type LiquidationHistoryParams, LiquidationSchema, LiquidationSideSchema, type LiquidationsByUserParams, type ListIncidentsParams, type OpenInterest, OpenInterestArrayResponseSchema, OpenInterestResponseSchema, OpenInterestSchema, type OrderBook, OrderBookArrayResponseSchema, type OrderBookHistoryParams, OrderBookReconstructor, OrderBookResponseSchema, OrderBookSchema, type OrderbookDelta, OxArchive, OxArchiveError, OxArchiveWs, type Pagination, type PriceLevel, PriceLevelSchema, type ReconstructOptions, type ReconstructedOrderBook, type RestApiLatency, type SlaActual, type SlaParams, type SlaResponse, type SlaTargets, type StatusResponse, type SymbolCoverageResponse, type SymbolDataTypeCoverage, type SystemStatusValue, type TickData, type TickHistoryParams, type Timestamp, type TimestampedRecord, TimestampedRecordSchema, type Trade, TradeArrayResponseSchema, type TradeDirection, TradeDirectionSchema, TradeSchema, type TradeSide, TradeSideSchema, type ValidatedApiMeta, type ValidatedCandle, type ValidatedFundingRate, type ValidatedInstrument, type ValidatedLiquidation, type ValidatedOpenInterest, type ValidatedOrderBook, type ValidatedPriceLevel, type ValidatedTrade, type ValidatedWsServerMessage, type WebSocketLatency, type WsChannel, WsChannelSchema, type WsClientMessage, type WsConnectionState, WsConnectionStateSchema, type WsData, WsDataSchema, type WsError, WsErrorSchema, type WsEventHandlers, type WsHistoricalBatch, WsHistoricalBatchSchema, type WsHistoricalData, WsHistoricalDataSchema, type WsHistoricalTickData, type WsOptions, type WsPing, type WsPong, WsPongSchema, type WsReplay, type WsReplayCompleted, WsReplayCompletedSchema, type WsReplayPause, type WsReplayPaused, WsReplayPausedSchema, type WsReplayResume, type WsReplayResumed, WsReplayResumedSchema, type WsReplaySeek, type WsReplayStarted, WsReplayStartedSchema, type WsReplayStop, type WsReplayStopped, WsReplayStoppedSchema, type WsServerMessage, WsServerMessageSchema, type WsStream, type WsStreamCompleted, WsStreamCompletedSchema, type WsStreamProgress, WsStreamProgressSchema, type WsStreamStarted, WsStreamStartedSchema, type WsStreamStop, type WsStreamStopped, WsStreamStoppedSchema, type WsSubscribe, type WsSubscribed, WsSubscribedSchema, type WsUnsubscribe, type WsUnsubscribed, WsUnsubscribedSchema, OxArchive as default, reconstructFinal, reconstructOrderBook };
4032
+ export { type ApiError, type ApiMeta, ApiMetaSchema, type ApiResponse, ApiResponseSchema, type Candle, CandleArrayResponseSchema, type CandleHistoryParams, type CandleInterval, CandleIntervalSchema, CandleSchema, type ClientOptions, type CompletenessMetrics, type CoverageGap, type CoverageResponse, type CursorResponse, type DataCadence, type DataFreshness, type DataTypeCoverage, type DataTypeStatus, type ExchangeCoverage, type ExchangeLatency, type ExchangeStatus, type FundingRate, FundingRateArrayResponseSchema, FundingRateResponseSchema, FundingRateSchema, type GetOrderBookParams, type GetTradesCursorParams, HyperliquidClient, type Incident, type IncidentSeverityValue, type IncidentStatusValue, type IncidentsResponse, type Instrument, InstrumentArrayResponseSchema, InstrumentResponseSchema, InstrumentSchema, type InstrumentType, InstrumentTypeSchema, type LatencyResponse, LighterClient, type LighterGranularity, type LighterInstrument, type Liquidation, LiquidationArrayResponseSchema, type LiquidationHistoryParams, LiquidationSchema, LiquidationSideSchema, type LiquidationsByUserParams, type ListIncidentsParams, type OpenInterest, OpenInterestArrayResponseSchema, OpenInterestResponseSchema, OpenInterestSchema, type OrderBook, OrderBookArrayResponseSchema, type OrderBookHistoryParams, OrderBookReconstructor, OrderBookResponseSchema, OrderBookSchema, type OrderbookDelta, OxArchive, OxArchiveError, OxArchiveWs, type Pagination, type PriceLevel, PriceLevelSchema, type ReconstructOptions, type ReconstructedOrderBook, type RestApiLatency, type SlaActual, type SlaParams, type SlaResponse, type SlaTargets, type StatusResponse, type SymbolCoverageOptions, type SymbolCoverageResponse, type SymbolDataTypeCoverage, type SystemStatusValue, type TickData, type TickHistoryParams, type Timestamp, type TimestampedRecord, TimestampedRecordSchema, type Trade, TradeArrayResponseSchema, type TradeDirection, TradeDirectionSchema, TradeSchema, type TradeSide, TradeSideSchema, type ValidatedApiMeta, type ValidatedCandle, type ValidatedFundingRate, type ValidatedInstrument, type ValidatedLiquidation, type ValidatedOpenInterest, type ValidatedOrderBook, type ValidatedPriceLevel, type ValidatedTrade, type ValidatedWsServerMessage, type WebSocketLatency, type WsChannel, WsChannelSchema, type WsClientMessage, type WsConnectionState, WsConnectionStateSchema, type WsData, WsDataSchema, type WsError, WsErrorSchema, type WsEventHandlers, type WsHistoricalBatch, WsHistoricalBatchSchema, type WsHistoricalData, WsHistoricalDataSchema, type WsHistoricalTickData, type WsOptions, type WsPing, type WsPong, WsPongSchema, type WsReplay, type WsReplayCompleted, WsReplayCompletedSchema, type WsReplayPause, type WsReplayPaused, WsReplayPausedSchema, type WsReplayResume, type WsReplayResumed, WsReplayResumedSchema, type WsReplaySeek, type WsReplayStarted, WsReplayStartedSchema, type WsReplayStop, type WsReplayStopped, WsReplayStoppedSchema, type WsServerMessage, WsServerMessageSchema, type WsStream, type WsStreamCompleted, WsStreamCompletedSchema, type WsStreamProgress, WsStreamProgressSchema, type WsStreamStarted, WsStreamStartedSchema, type WsStreamStop, type WsStreamStopped, WsStreamStoppedSchema, type WsSubscribe, type WsSubscribed, WsSubscribedSchema, type WsUnsubscribe, type WsUnsubscribed, WsUnsubscribedSchema, OxArchive as default, reconstructFinal, reconstructOrderBook };
package/dist/index.js CHANGED
@@ -1190,11 +1190,13 @@ var DataQualityResource = class {
1190
1190
  /**
1191
1191
  * Get data coverage for a specific symbol on an exchange
1192
1192
  *
1193
- * Includes gap detection showing periods where data may be missing.
1193
+ * Includes gap detection, empirical data cadence, and hour-level historical coverage.
1194
+ * Supports optional time bounds for gap detection (default: last 30 days).
1194
1195
  *
1195
1196
  * @param exchange - Exchange name ('hyperliquid' or 'lighter')
1196
1197
  * @param symbol - Symbol name (e.g., 'BTC', 'ETH')
1197
- * @returns SymbolCoverageResponse with per-data-type coverage including gaps
1198
+ * @param options - Optional time bounds for gap detection window
1199
+ * @returns SymbolCoverageResponse with per-data-type coverage including gaps, cadence, and historical coverage
1198
1200
  *
1199
1201
  * @example
1200
1202
  * ```typescript
@@ -1205,11 +1207,24 @@ var DataQualityResource = class {
1205
1207
  * for (const gap of oi.gaps.slice(0, 3)) {
1206
1208
  * console.log(` ${gap.durationMinutes} min gap at ${gap.start}`);
1207
1209
  * }
1210
+ *
1211
+ * // Check cadence
1212
+ * if (btc.dataTypes.orderbook.cadence) {
1213
+ * console.log(`Cadence: ~${btc.dataTypes.orderbook.cadence.medianIntervalSeconds}s`);
1214
+ * }
1215
+ *
1216
+ * // Time-bounded (last 7 days)
1217
+ * const weekAgo = Date.now() - 7 * 24 * 60 * 60 * 1000;
1218
+ * const btc7d = await client.dataQuality.symbolCoverage('hyperliquid', 'BTC', {
1219
+ * from: weekAgo,
1220
+ * to: Date.now(),
1221
+ * });
1208
1222
  * ```
1209
1223
  */
1210
- async symbolCoverage(exchange, symbol) {
1224
+ async symbolCoverage(exchange, symbol, options) {
1211
1225
  return this.http.get(
1212
- `${this.basePath}/coverage/${exchange.toLowerCase()}/${symbol.toUpperCase()}`
1226
+ `${this.basePath}/coverage/${exchange.toLowerCase()}/${symbol.toUpperCase()}`,
1227
+ options
1213
1228
  );
1214
1229
  }
1215
1230
  // ===========================================================================