@0xarchive/sdk 0.7.0 → 0.8.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
@@ -4,6 +4,7 @@ Official TypeScript/JavaScript SDK for [0xarchive](https://0xarchive.io) - Histo
4
4
 
5
5
  Supports multiple exchanges:
6
6
  - **Hyperliquid** - Perpetuals data from April 2023
7
+ - **Hyperliquid HIP-3** - Builder-deployed perpetuals (Pro+ only, February 2026+)
7
8
  - **Lighter.xyz** - Perpetuals data (August 2025+ for fills, Jan 2026+ for OB, OI, Funding Rate)
8
9
 
9
10
  ## Installation
@@ -31,6 +32,12 @@ console.log(`Hyperliquid BTC mid price: ${hlOrderbook.midPrice}`);
31
32
  const lighterOrderbook = await client.lighter.orderbook.get('BTC');
32
33
  console.log(`Lighter BTC mid price: ${lighterOrderbook.midPrice}`);
33
34
 
35
+ // HIP-3 builder perps (Pro+ only, February 2026+)
36
+ const hip3Orderbook = await client.hyperliquid.hip3.orderbook.get('xyz:XYZ100');
37
+ const hip3Trades = await client.hyperliquid.hip3.trades.recent('xyz:XYZ100');
38
+ const hip3Funding = await client.hyperliquid.hip3.funding.current('xyz:XYZ100');
39
+ const hip3Oi = await client.hyperliquid.hip3.openInterest.current('xyz:XYZ100');
40
+
34
41
  // Get historical order book snapshots
35
42
  const history = await client.hyperliquid.orderbook.history('ETH', {
36
43
  start: Date.now() - 86400000, // 24 hours ago
package/dist/index.d.mts CHANGED
@@ -1095,7 +1095,8 @@ interface TickHistoryParams {
1095
1095
  declare class OrderBookResource {
1096
1096
  private http;
1097
1097
  private basePath;
1098
- constructor(http: HttpClient, basePath?: string);
1098
+ private coinTransform;
1099
+ constructor(http: HttpClient, basePath?: string, coinTransform?: (coin: string) => string);
1099
1100
  /**
1100
1101
  * Get order book snapshot for a coin
1101
1102
  *
@@ -1287,7 +1288,8 @@ declare class OrderBookResource {
1287
1288
  declare class TradesResource {
1288
1289
  private http;
1289
1290
  private basePath;
1290
- constructor(http: HttpClient, basePath?: string);
1291
+ private coinTransform;
1292
+ constructor(http: HttpClient, basePath?: string, coinTransform?: (coin: string) => string);
1291
1293
  /**
1292
1294
  * Get trade history for a coin using cursor-based pagination
1293
1295
  *
@@ -1322,9 +1324,10 @@ declare class TradesResource {
1322
1324
  /**
1323
1325
  * Get most recent trades for a coin.
1324
1326
  *
1325
- * Note: This method is only available for Lighter (client.lighter.trades.recent())
1326
- * which has real-time data ingestion. Hyperliquid uses hourly backfill so this
1327
- * endpoint is not available for Hyperliquid.
1327
+ * Note: This method is available for Lighter (client.lighter.trades.recent())
1328
+ * and HIP-3 (client.hyperliquid.hip3.trades.recent()) which have real-time data
1329
+ * ingestion. Hyperliquid uses hourly backfill so this endpoint is not available
1330
+ * for Hyperliquid.
1328
1331
  *
1329
1332
  * @param coin - The coin symbol (e.g., 'BTC', 'ETH')
1330
1333
  * @param limit - Number of trades to return (default: 100)
@@ -1429,7 +1432,8 @@ declare class LighterInstrumentsResource {
1429
1432
  declare class FundingResource {
1430
1433
  private http;
1431
1434
  private basePath;
1432
- constructor(http: HttpClient, basePath?: string);
1435
+ private coinTransform;
1436
+ constructor(http: HttpClient, basePath?: string, coinTransform?: (coin: string) => string);
1433
1437
  /**
1434
1438
  * Get funding rate history for a coin with cursor-based pagination
1435
1439
  *
@@ -1478,7 +1482,8 @@ declare class FundingResource {
1478
1482
  declare class OpenInterestResource {
1479
1483
  private http;
1480
1484
  private basePath;
1481
- constructor(http: HttpClient, basePath?: string);
1485
+ private coinTransform;
1486
+ constructor(http: HttpClient, basePath?: string, coinTransform?: (coin: string) => string);
1482
1487
  /**
1483
1488
  * Get open interest history for a coin with cursor-based pagination
1484
1489
  *
@@ -1665,7 +1670,7 @@ declare class DataQualityResource {
1665
1670
  /**
1666
1671
  * Get data coverage for a specific exchange
1667
1672
  *
1668
- * @param exchange - Exchange name ('hyperliquid' or 'lighter')
1673
+ * @param exchange - Exchange name ('hyperliquid', 'lighter', or 'hip3')
1669
1674
  * @returns ExchangeCoverage with coverage info for all data types on this exchange
1670
1675
  *
1671
1676
  * @example
@@ -1681,8 +1686,8 @@ declare class DataQualityResource {
1681
1686
  * Includes gap detection, empirical data cadence, and hour-level historical coverage.
1682
1687
  * Supports optional time bounds for gap detection (default: last 30 days).
1683
1688
  *
1684
- * @param exchange - Exchange name ('hyperliquid' or 'lighter')
1685
- * @param symbol - Symbol name (e.g., 'BTC', 'ETH')
1689
+ * @param exchange - Exchange name ('hyperliquid', 'lighter', or 'hip3')
1690
+ * @param symbol - Symbol name (e.g., 'BTC', 'ETH', or HIP3 coins like 'xyz:XYZ100')
1686
1691
  * @param options - Optional time bounds for gap detection window
1687
1692
  * @returns SymbolCoverageResponse with per-data-type coverage including gaps, cadence, and historical coverage
1688
1693
  *
@@ -1817,6 +1822,42 @@ declare class HyperliquidClient {
1817
1822
  * Liquidation events (May 2025+)
1818
1823
  */
1819
1824
  readonly liquidations: LiquidationsResource;
1825
+ /**
1826
+ * HIP-3 builder-deployed perpetuals (Pro+ only, February 2026+)
1827
+ */
1828
+ readonly hip3: Hip3Client;
1829
+ constructor(http: HttpClient);
1830
+ }
1831
+ /**
1832
+ * HIP-3 builder-deployed perpetuals client
1833
+ *
1834
+ * Access Hyperliquid HIP-3 builder perps data through the 0xarchive API.
1835
+ * Requires Pro tier or higher.
1836
+ *
1837
+ * @example
1838
+ * ```typescript
1839
+ * const client = new OxArchive({ apiKey: '...' });
1840
+ * const orderbook = await client.hyperliquid.hip3.orderbook.get('xyz:XYZ100');
1841
+ * const trades = await client.hyperliquid.hip3.trades.recent('xyz:XYZ100');
1842
+ * ```
1843
+ */
1844
+ declare class Hip3Client {
1845
+ /**
1846
+ * Order book snapshots (February 2026+)
1847
+ */
1848
+ readonly orderbook: OrderBookResource;
1849
+ /**
1850
+ * Trade/fill history
1851
+ */
1852
+ readonly trades: TradesResource;
1853
+ /**
1854
+ * Funding rates
1855
+ */
1856
+ readonly funding: FundingResource;
1857
+ /**
1858
+ * Open interest
1859
+ */
1860
+ readonly openInterest: OpenInterestResource;
1820
1861
  constructor(http: HttpClient);
1821
1862
  }
1822
1863
  /**
@@ -4029,4 +4070,4 @@ type ValidatedCandle = z.infer<typeof CandleSchema>;
4029
4070
  type ValidatedLiquidation = z.infer<typeof LiquidationSchema>;
4030
4071
  type ValidatedWsServerMessage = z.infer<typeof WsServerMessageSchema>;
4031
4072
 
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 };
4073
+ 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, Hip3Client, 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
@@ -1095,7 +1095,8 @@ interface TickHistoryParams {
1095
1095
  declare class OrderBookResource {
1096
1096
  private http;
1097
1097
  private basePath;
1098
- constructor(http: HttpClient, basePath?: string);
1098
+ private coinTransform;
1099
+ constructor(http: HttpClient, basePath?: string, coinTransform?: (coin: string) => string);
1099
1100
  /**
1100
1101
  * Get order book snapshot for a coin
1101
1102
  *
@@ -1287,7 +1288,8 @@ declare class OrderBookResource {
1287
1288
  declare class TradesResource {
1288
1289
  private http;
1289
1290
  private basePath;
1290
- constructor(http: HttpClient, basePath?: string);
1291
+ private coinTransform;
1292
+ constructor(http: HttpClient, basePath?: string, coinTransform?: (coin: string) => string);
1291
1293
  /**
1292
1294
  * Get trade history for a coin using cursor-based pagination
1293
1295
  *
@@ -1322,9 +1324,10 @@ declare class TradesResource {
1322
1324
  /**
1323
1325
  * Get most recent trades for a coin.
1324
1326
  *
1325
- * Note: This method is only available for Lighter (client.lighter.trades.recent())
1326
- * which has real-time data ingestion. Hyperliquid uses hourly backfill so this
1327
- * endpoint is not available for Hyperliquid.
1327
+ * Note: This method is available for Lighter (client.lighter.trades.recent())
1328
+ * and HIP-3 (client.hyperliquid.hip3.trades.recent()) which have real-time data
1329
+ * ingestion. Hyperliquid uses hourly backfill so this endpoint is not available
1330
+ * for Hyperliquid.
1328
1331
  *
1329
1332
  * @param coin - The coin symbol (e.g., 'BTC', 'ETH')
1330
1333
  * @param limit - Number of trades to return (default: 100)
@@ -1429,7 +1432,8 @@ declare class LighterInstrumentsResource {
1429
1432
  declare class FundingResource {
1430
1433
  private http;
1431
1434
  private basePath;
1432
- constructor(http: HttpClient, basePath?: string);
1435
+ private coinTransform;
1436
+ constructor(http: HttpClient, basePath?: string, coinTransform?: (coin: string) => string);
1433
1437
  /**
1434
1438
  * Get funding rate history for a coin with cursor-based pagination
1435
1439
  *
@@ -1478,7 +1482,8 @@ declare class FundingResource {
1478
1482
  declare class OpenInterestResource {
1479
1483
  private http;
1480
1484
  private basePath;
1481
- constructor(http: HttpClient, basePath?: string);
1485
+ private coinTransform;
1486
+ constructor(http: HttpClient, basePath?: string, coinTransform?: (coin: string) => string);
1482
1487
  /**
1483
1488
  * Get open interest history for a coin with cursor-based pagination
1484
1489
  *
@@ -1665,7 +1670,7 @@ declare class DataQualityResource {
1665
1670
  /**
1666
1671
  * Get data coverage for a specific exchange
1667
1672
  *
1668
- * @param exchange - Exchange name ('hyperliquid' or 'lighter')
1673
+ * @param exchange - Exchange name ('hyperliquid', 'lighter', or 'hip3')
1669
1674
  * @returns ExchangeCoverage with coverage info for all data types on this exchange
1670
1675
  *
1671
1676
  * @example
@@ -1681,8 +1686,8 @@ declare class DataQualityResource {
1681
1686
  * Includes gap detection, empirical data cadence, and hour-level historical coverage.
1682
1687
  * Supports optional time bounds for gap detection (default: last 30 days).
1683
1688
  *
1684
- * @param exchange - Exchange name ('hyperliquid' or 'lighter')
1685
- * @param symbol - Symbol name (e.g., 'BTC', 'ETH')
1689
+ * @param exchange - Exchange name ('hyperliquid', 'lighter', or 'hip3')
1690
+ * @param symbol - Symbol name (e.g., 'BTC', 'ETH', or HIP3 coins like 'xyz:XYZ100')
1686
1691
  * @param options - Optional time bounds for gap detection window
1687
1692
  * @returns SymbolCoverageResponse with per-data-type coverage including gaps, cadence, and historical coverage
1688
1693
  *
@@ -1817,6 +1822,42 @@ declare class HyperliquidClient {
1817
1822
  * Liquidation events (May 2025+)
1818
1823
  */
1819
1824
  readonly liquidations: LiquidationsResource;
1825
+ /**
1826
+ * HIP-3 builder-deployed perpetuals (Pro+ only, February 2026+)
1827
+ */
1828
+ readonly hip3: Hip3Client;
1829
+ constructor(http: HttpClient);
1830
+ }
1831
+ /**
1832
+ * HIP-3 builder-deployed perpetuals client
1833
+ *
1834
+ * Access Hyperliquid HIP-3 builder perps data through the 0xarchive API.
1835
+ * Requires Pro tier or higher.
1836
+ *
1837
+ * @example
1838
+ * ```typescript
1839
+ * const client = new OxArchive({ apiKey: '...' });
1840
+ * const orderbook = await client.hyperliquid.hip3.orderbook.get('xyz:XYZ100');
1841
+ * const trades = await client.hyperliquid.hip3.trades.recent('xyz:XYZ100');
1842
+ * ```
1843
+ */
1844
+ declare class Hip3Client {
1845
+ /**
1846
+ * Order book snapshots (February 2026+)
1847
+ */
1848
+ readonly orderbook: OrderBookResource;
1849
+ /**
1850
+ * Trade/fill history
1851
+ */
1852
+ readonly trades: TradesResource;
1853
+ /**
1854
+ * Funding rates
1855
+ */
1856
+ readonly funding: FundingResource;
1857
+ /**
1858
+ * Open interest
1859
+ */
1860
+ readonly openInterest: OpenInterestResource;
1820
1861
  constructor(http: HttpClient);
1821
1862
  }
1822
1863
  /**
@@ -4029,4 +4070,4 @@ type ValidatedCandle = z.infer<typeof CandleSchema>;
4029
4070
  type ValidatedLiquidation = z.infer<typeof LiquidationSchema>;
4030
4071
  type ValidatedWsServerMessage = z.infer<typeof WsServerMessageSchema>;
4031
4072
 
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 };
4073
+ 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, Hip3Client, 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
@@ -28,6 +28,7 @@ __export(index_exports, {
28
28
  FundingRateArrayResponseSchema: () => FundingRateArrayResponseSchema,
29
29
  FundingRateResponseSchema: () => FundingRateResponseSchema,
30
30
  FundingRateSchema: () => FundingRateSchema,
31
+ Hip3Client: () => Hip3Client,
31
32
  HyperliquidClient: () => HyperliquidClient,
32
33
  InstrumentArrayResponseSchema: () => InstrumentArrayResponseSchema,
33
34
  InstrumentResponseSchema: () => InstrumentResponseSchema,
@@ -596,9 +597,10 @@ function reconstructFinal(tickData, depth) {
596
597
 
597
598
  // src/resources/orderbook.ts
598
599
  var OrderBookResource = class {
599
- constructor(http, basePath = "/v1") {
600
+ constructor(http, basePath = "/v1", coinTransform = (c) => c.toUpperCase()) {
600
601
  this.http = http;
601
602
  this.basePath = basePath;
603
+ this.coinTransform = coinTransform;
602
604
  }
603
605
  /**
604
606
  * Get order book snapshot for a coin
@@ -609,7 +611,7 @@ var OrderBookResource = class {
609
611
  */
610
612
  async get(coin, params) {
611
613
  const response = await this.http.get(
612
- `${this.basePath}/orderbook/${coin.toUpperCase()}`,
614
+ `${this.basePath}/orderbook/${this.coinTransform(coin)}`,
613
615
  params,
614
616
  this.http.validationEnabled ? OrderBookResponseSchema : void 0
615
617
  );
@@ -644,7 +646,7 @@ var OrderBookResource = class {
644
646
  */
645
647
  async history(coin, params) {
646
648
  const response = await this.http.get(
647
- `${this.basePath}/orderbook/${coin.toUpperCase()}/history`,
649
+ `${this.basePath}/orderbook/${this.coinTransform(coin)}/history`,
648
650
  params,
649
651
  this.http.validationEnabled ? OrderBookArrayResponseSchema : void 0
650
652
  );
@@ -684,7 +686,7 @@ var OrderBookResource = class {
684
686
  */
685
687
  async historyTick(coin, params) {
686
688
  const response = await this.http.get(
687
- `${this.basePath}/orderbook/${coin.toUpperCase()}/history`,
689
+ `${this.basePath}/orderbook/${this.coinTransform(coin)}/history`,
688
690
  {
689
691
  ...params,
690
692
  granularity: "tick"
@@ -837,9 +839,10 @@ var OrderBookResource = class {
837
839
 
838
840
  // src/resources/trades.ts
839
841
  var TradesResource = class {
840
- constructor(http, basePath = "/v1") {
842
+ constructor(http, basePath = "/v1", coinTransform = (c) => c.toUpperCase()) {
841
843
  this.http = http;
842
844
  this.basePath = basePath;
845
+ this.coinTransform = coinTransform;
843
846
  }
844
847
  /**
845
848
  * Get trade history for a coin using cursor-based pagination
@@ -873,7 +876,7 @@ var TradesResource = class {
873
876
  */
874
877
  async list(coin, params) {
875
878
  const response = await this.http.get(
876
- `${this.basePath}/trades/${coin.toUpperCase()}`,
879
+ `${this.basePath}/trades/${this.coinTransform(coin)}`,
877
880
  params,
878
881
  this.http.validationEnabled ? TradeArrayResponseSchema : void 0
879
882
  );
@@ -885,9 +888,10 @@ var TradesResource = class {
885
888
  /**
886
889
  * Get most recent trades for a coin.
887
890
  *
888
- * Note: This method is only available for Lighter (client.lighter.trades.recent())
889
- * which has real-time data ingestion. Hyperliquid uses hourly backfill so this
890
- * endpoint is not available for Hyperliquid.
891
+ * Note: This method is available for Lighter (client.lighter.trades.recent())
892
+ * and HIP-3 (client.hyperliquid.hip3.trades.recent()) which have real-time data
893
+ * ingestion. Hyperliquid uses hourly backfill so this endpoint is not available
894
+ * for Hyperliquid.
891
895
  *
892
896
  * @param coin - The coin symbol (e.g., 'BTC', 'ETH')
893
897
  * @param limit - Number of trades to return (default: 100)
@@ -895,7 +899,7 @@ var TradesResource = class {
895
899
  */
896
900
  async recent(coin, limit) {
897
901
  const response = await this.http.get(
898
- `${this.basePath}/trades/${coin.toUpperCase()}/recent`,
902
+ `${this.basePath}/trades/${this.coinTransform(coin)}/recent`,
899
903
  { limit },
900
904
  this.http.validationEnabled ? TradeArrayResponseSchema : void 0
901
905
  );
@@ -969,9 +973,10 @@ var LighterInstrumentsResource = class {
969
973
 
970
974
  // src/resources/funding.ts
971
975
  var FundingResource = class {
972
- constructor(http, basePath = "/v1") {
976
+ constructor(http, basePath = "/v1", coinTransform = (c) => c.toUpperCase()) {
973
977
  this.http = http;
974
978
  this.basePath = basePath;
979
+ this.coinTransform = coinTransform;
975
980
  }
976
981
  /**
977
982
  * Get funding rate history for a coin with cursor-based pagination
@@ -982,7 +987,7 @@ var FundingResource = class {
982
987
  */
983
988
  async history(coin, params) {
984
989
  const response = await this.http.get(
985
- `${this.basePath}/funding/${coin.toUpperCase()}`,
990
+ `${this.basePath}/funding/${this.coinTransform(coin)}`,
986
991
  params,
987
992
  this.http.validationEnabled ? FundingRateArrayResponseSchema : void 0
988
993
  );
@@ -999,7 +1004,7 @@ var FundingResource = class {
999
1004
  */
1000
1005
  async current(coin) {
1001
1006
  const response = await this.http.get(
1002
- `/v1/funding/${coin.toUpperCase()}/current`,
1007
+ `${this.basePath}/funding/${this.coinTransform(coin)}/current`,
1003
1008
  void 0,
1004
1009
  this.http.validationEnabled ? FundingRateResponseSchema : void 0
1005
1010
  );
@@ -1009,9 +1014,10 @@ var FundingResource = class {
1009
1014
 
1010
1015
  // src/resources/openinterest.ts
1011
1016
  var OpenInterestResource = class {
1012
- constructor(http, basePath = "/v1") {
1017
+ constructor(http, basePath = "/v1", coinTransform = (c) => c.toUpperCase()) {
1013
1018
  this.http = http;
1014
1019
  this.basePath = basePath;
1020
+ this.coinTransform = coinTransform;
1015
1021
  }
1016
1022
  /**
1017
1023
  * Get open interest history for a coin with cursor-based pagination
@@ -1022,7 +1028,7 @@ var OpenInterestResource = class {
1022
1028
  */
1023
1029
  async history(coin, params) {
1024
1030
  const response = await this.http.get(
1025
- `${this.basePath}/openinterest/${coin.toUpperCase()}`,
1031
+ `${this.basePath}/openinterest/${this.coinTransform(coin)}`,
1026
1032
  params,
1027
1033
  this.http.validationEnabled ? OpenInterestArrayResponseSchema : void 0
1028
1034
  );
@@ -1039,7 +1045,7 @@ var OpenInterestResource = class {
1039
1045
  */
1040
1046
  async current(coin) {
1041
1047
  const response = await this.http.get(
1042
- `/v1/openinterest/${coin.toUpperCase()}/current`,
1048
+ `${this.basePath}/openinterest/${this.coinTransform(coin)}/current`,
1043
1049
  void 0,
1044
1050
  this.http.validationEnabled ? OpenInterestResponseSchema : void 0
1045
1051
  );
@@ -1173,7 +1179,7 @@ var DataQualityResource = class {
1173
1179
  /**
1174
1180
  * Get data coverage for a specific exchange
1175
1181
  *
1176
- * @param exchange - Exchange name ('hyperliquid' or 'lighter')
1182
+ * @param exchange - Exchange name ('hyperliquid', 'lighter', or 'hip3')
1177
1183
  * @returns ExchangeCoverage with coverage info for all data types on this exchange
1178
1184
  *
1179
1185
  * @example
@@ -1193,8 +1199,8 @@ var DataQualityResource = class {
1193
1199
  * Includes gap detection, empirical data cadence, and hour-level historical coverage.
1194
1200
  * Supports optional time bounds for gap detection (default: last 30 days).
1195
1201
  *
1196
- * @param exchange - Exchange name ('hyperliquid' or 'lighter')
1197
- * @param symbol - Symbol name (e.g., 'BTC', 'ETH')
1202
+ * @param exchange - Exchange name ('hyperliquid', 'lighter', or 'hip3')
1203
+ * @param symbol - Symbol name (e.g., 'BTC', 'ETH', or HIP3 coins like 'xyz:XYZ100')
1198
1204
  * @param options - Optional time bounds for gap detection window
1199
1205
  * @returns SymbolCoverageResponse with per-data-type coverage including gaps, cadence, and historical coverage
1200
1206
  *
@@ -1346,6 +1352,10 @@ var HyperliquidClient = class {
1346
1352
  * Liquidation events (May 2025+)
1347
1353
  */
1348
1354
  liquidations;
1355
+ /**
1356
+ * HIP-3 builder-deployed perpetuals (Pro+ only, February 2026+)
1357
+ */
1358
+ hip3;
1349
1359
  constructor(http) {
1350
1360
  const basePath = "/v1/hyperliquid";
1351
1361
  this.orderbook = new OrderBookResource(http, basePath);
@@ -1355,6 +1365,33 @@ var HyperliquidClient = class {
1355
1365
  this.openInterest = new OpenInterestResource(http, basePath);
1356
1366
  this.candles = new CandlesResource(http, basePath);
1357
1367
  this.liquidations = new LiquidationsResource(http, basePath);
1368
+ this.hip3 = new Hip3Client(http);
1369
+ }
1370
+ };
1371
+ var Hip3Client = class {
1372
+ /**
1373
+ * Order book snapshots (February 2026+)
1374
+ */
1375
+ orderbook;
1376
+ /**
1377
+ * Trade/fill history
1378
+ */
1379
+ trades;
1380
+ /**
1381
+ * Funding rates
1382
+ */
1383
+ funding;
1384
+ /**
1385
+ * Open interest
1386
+ */
1387
+ openInterest;
1388
+ constructor(http) {
1389
+ const basePath = "/v1/hyperliquid/hip3";
1390
+ const coinTransform = (c) => c;
1391
+ this.orderbook = new OrderBookResource(http, basePath, coinTransform);
1392
+ this.trades = new TradesResource(http, basePath, coinTransform);
1393
+ this.funding = new FundingResource(http, basePath, coinTransform);
1394
+ this.openInterest = new OpenInterestResource(http, basePath, coinTransform);
1358
1395
  }
1359
1396
  };
1360
1397
  var LighterClient = class {
@@ -2037,6 +2074,7 @@ var OxArchiveWs = class {
2037
2074
  FundingRateArrayResponseSchema,
2038
2075
  FundingRateResponseSchema,
2039
2076
  FundingRateSchema,
2077
+ Hip3Client,
2040
2078
  HyperliquidClient,
2041
2079
  InstrumentArrayResponseSchema,
2042
2080
  InstrumentResponseSchema,