@0xarchive/sdk 1.3.0 → 1.6.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/LICENSE +21 -0
- package/README.md +1449 -1324
- package/dist/index.d.mts +818 -214
- package/dist/index.d.ts +818 -214
- package/dist/index.js +421 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +419 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -6
package/dist/index.d.ts
CHANGED
|
@@ -132,6 +132,18 @@ interface Trade {
|
|
|
132
132
|
makerAddress?: string;
|
|
133
133
|
/** Taker's wallet address (for market-level WebSocket trades) */
|
|
134
134
|
takerAddress?: string;
|
|
135
|
+
/** Builder address that routed this order. Present only when the order was placed through a builder. */
|
|
136
|
+
builderAddress?: string;
|
|
137
|
+
/** Builder fee charged on this fill, paid to the builder (in quote currency, typically USDC). Present only when builderAddress is set. */
|
|
138
|
+
builderFee?: string;
|
|
139
|
+
/** HIP-3 deployer fee share on this fill (in quote currency). Negative for the maker side (rebate), positive for the taker side. Present only on HIP-3 fills. */
|
|
140
|
+
deployerFee?: string;
|
|
141
|
+
/** Priority fee burned in HYPE (not USDC) for write priority on the Hyperliquid validator queue. Independent of builderFee and deployerFee — paid to the network, not to a builder or deployer. Present only when the order paid for priority. */
|
|
142
|
+
priorityGas?: number;
|
|
143
|
+
/** Client order ID */
|
|
144
|
+
cloid?: string;
|
|
145
|
+
/** TWAP execution ID */
|
|
146
|
+
twapId?: number;
|
|
135
147
|
}
|
|
136
148
|
/**
|
|
137
149
|
* Cursor-based pagination parameters (recommended)
|
|
@@ -236,6 +248,168 @@ interface Hip3Instrument {
|
|
|
236
248
|
/** Timestamp of latest data point */
|
|
237
249
|
latestTimestamp?: string;
|
|
238
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* HIP-4 outcome-market per-side instrument metadata.
|
|
253
|
+
*
|
|
254
|
+
* Returned from `/v1/hyperliquid/hip4/instruments` and
|
|
255
|
+
* `/v1/hyperliquid/hip4/instruments/{symbol}`. One row per side (`#0`, `#1`, ...).
|
|
256
|
+
* Coin format: `#<10*outcome_id + side>` (e.g. `#0` = outcome 0 / Yes, `#1` = outcome 0 / No).
|
|
257
|
+
*
|
|
258
|
+
* Symbol path encoding: the backend accepts both the bare numeric form (`0`, `1`)
|
|
259
|
+
* and the on-chain `#`-prefixed form (`#0`, `#1`). The bare form is recommended in
|
|
260
|
+
* URLs to avoid `%23` encoding hassles. The SDK passes the value through as-is —
|
|
261
|
+
* it does NOT auto-encode `#`.
|
|
262
|
+
*
|
|
263
|
+
* Note: HIP-4 `mark_price` / `midPrice` on related endpoints (open interest,
|
|
264
|
+
* prices, summary) are implied probabilities in [0, 1], not USD prices.
|
|
265
|
+
*/
|
|
266
|
+
interface Hip4Outcome {
|
|
267
|
+
/** Numeric outcome id (groups two sides under a single market). */
|
|
268
|
+
outcomeId: number;
|
|
269
|
+
/** Side index within the outcome (0 = Yes, 1 = No). */
|
|
270
|
+
side: number;
|
|
271
|
+
/** Public asset_id: 100_000_000 + 10*outcome_id + side. */
|
|
272
|
+
assetId: number;
|
|
273
|
+
/** Coin string with leading `#` (e.g. `#0`). Backend also accepts the bare numeric form. */
|
|
274
|
+
coin: string;
|
|
275
|
+
/** Same as `coin` for HIP-4. */
|
|
276
|
+
symbol: string;
|
|
277
|
+
/** Human-readable market name including side suffix. */
|
|
278
|
+
name?: string;
|
|
279
|
+
/** Raw description string from upstream (pipe-delimited key:value pairs). */
|
|
280
|
+
description?: string;
|
|
281
|
+
/** Side label (e.g. "Yes", "No"). */
|
|
282
|
+
sideName?: string;
|
|
283
|
+
/** Recurring class (e.g. "priceBinary"). */
|
|
284
|
+
recurringClass?: string;
|
|
285
|
+
/** Underlying asset for recurring markets (e.g. "BTC"). */
|
|
286
|
+
recurringUnderlying?: string;
|
|
287
|
+
/** Expiry timestamp ISO-8601 for recurring markets. */
|
|
288
|
+
recurringExpiry?: string;
|
|
289
|
+
/** Target price strike for recurring price-binary markets. */
|
|
290
|
+
recurringTargetPx?: number;
|
|
291
|
+
/** Cadence for recurring markets (e.g. "1d"). */
|
|
292
|
+
recurringPeriod?: string;
|
|
293
|
+
/** Builder/deployer wallet address. */
|
|
294
|
+
builderAddress?: string;
|
|
295
|
+
/** True after settlement; ingester unsubscribes settled markets. */
|
|
296
|
+
isSettled?: boolean;
|
|
297
|
+
/** Settlement value (typically 1.0 = Yes won, 0.0 = No won). Set when isSettled=true. */
|
|
298
|
+
settlementValue?: number;
|
|
299
|
+
/** Settlement timestamp (ISO-8601). Set when isSettled=true. */
|
|
300
|
+
settlementAt?: string;
|
|
301
|
+
/** Per-side human-readable title (e.g. "BTC above 78,213 on May 4 at 06:00 UTC? — Yes"). */
|
|
302
|
+
displayTitle?: string;
|
|
303
|
+
/** Per-side URL slug (e.g. "btc-above-78213-yes-may-04-0600"). */
|
|
304
|
+
slug?: string;
|
|
305
|
+
/** When this outcome was first observed in upstream metadata. */
|
|
306
|
+
firstSeenAt?: string;
|
|
307
|
+
/** When this outcome metadata row was last updated. */
|
|
308
|
+
lastUpdatedAt?: string;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* HIP-4 aggregated open-interest snapshot for a single outcome.
|
|
312
|
+
* Populated only on the detail variant `/outcomes/{outcome_id}`; omitted on the list variant.
|
|
313
|
+
*/
|
|
314
|
+
interface Hip4AggregatedOi {
|
|
315
|
+
/** Latest open interest contracts on side 0 (Yes). */
|
|
316
|
+
side0OpenInterestContracts?: number;
|
|
317
|
+
/** Latest open interest contracts on side 1 (No). */
|
|
318
|
+
side1OpenInterestContracts?: number;
|
|
319
|
+
/** Display sum of both sides' open interest contracts. */
|
|
320
|
+
outcomeDisplayOpenInterestContracts?: number;
|
|
321
|
+
/** Number of fully-paired YES+NO sets outstanding. */
|
|
322
|
+
pairedSetSupplyContracts?: number;
|
|
323
|
+
/** True if both sides report identical supply (sanity check). */
|
|
324
|
+
sideSupplyParity?: boolean;
|
|
325
|
+
/** Quote currency (always "USDH" today). */
|
|
326
|
+
currency?: string;
|
|
327
|
+
/** When this aggregate was computed. */
|
|
328
|
+
asOf?: string;
|
|
329
|
+
/** Source timestamp for side 0 OI. */
|
|
330
|
+
side0AsOf?: string;
|
|
331
|
+
/** Source timestamp for side 1 OI. */
|
|
332
|
+
side1AsOf?: string;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* HIP-4 outcome-market per-outcome aggregate metadata.
|
|
336
|
+
*
|
|
337
|
+
* Returned from `/v1/hyperliquid/hip4/outcomes` (list, no `aggregatedOi`),
|
|
338
|
+
* `/v1/hyperliquid/hip4/outcomes/{outcome_id}` (detail, includes `aggregatedOi`),
|
|
339
|
+
* and `/v1/hyperliquid/hip4/outcomes/by-slug/{slug}` (detail, includes `aggregatedOi`).
|
|
340
|
+
* One row per outcome (combines both sides into a single market view).
|
|
341
|
+
*
|
|
342
|
+
* Note: HIP-4 mark/mid prices on related endpoints are implied probabilities
|
|
343
|
+
* in [0, 1], not USD prices.
|
|
344
|
+
*/
|
|
345
|
+
interface Hip4OutcomeAggregate {
|
|
346
|
+
/** Numeric outcome id. */
|
|
347
|
+
outcomeId: number;
|
|
348
|
+
/** Underlying market name (without side suffix). */
|
|
349
|
+
name?: string;
|
|
350
|
+
/** Raw description string from upstream. */
|
|
351
|
+
descriptionRaw?: string;
|
|
352
|
+
/** Outcome class (e.g. "priceBinary"). */
|
|
353
|
+
class?: string;
|
|
354
|
+
/** Underlying asset (e.g. "BTC"). */
|
|
355
|
+
underlying?: string;
|
|
356
|
+
/** Expiry timestamp ISO-8601. */
|
|
357
|
+
expiry?: string;
|
|
358
|
+
/** Strike price for price-binary markets (USD, not a probability). */
|
|
359
|
+
targetPrice?: number;
|
|
360
|
+
/** Cadence (e.g. "1d"). */
|
|
361
|
+
period?: string;
|
|
362
|
+
/** Per-side specs for this outcome. */
|
|
363
|
+
sideSpecs?: Hip4OutcomeSideSpec[];
|
|
364
|
+
/** True after settlement. */
|
|
365
|
+
isSettled?: boolean;
|
|
366
|
+
/** Status (e.g. "live", "settled"). */
|
|
367
|
+
status?: string;
|
|
368
|
+
/** Source seen-at timestamp. */
|
|
369
|
+
sourceSeenAt?: string;
|
|
370
|
+
/** Outcome-level human-readable title (no side suffix). e.g. "BTC above 78,213 on May 4 at 06:00 UTC?" */
|
|
371
|
+
displayTitle?: string;
|
|
372
|
+
/** Outcome-level URL slug (e.g. "btc-above-78213-may-04-0600"). */
|
|
373
|
+
slug?: string;
|
|
374
|
+
/**
|
|
375
|
+
* Two-element pair of side coins, ordered by side (`[#side0, #side1]`).
|
|
376
|
+
* Convenience for clients that just want to know which `#N` codes belong to
|
|
377
|
+
* this outcome without iterating `sideSpecs`.
|
|
378
|
+
*/
|
|
379
|
+
outcomePair?: [string, string];
|
|
380
|
+
/** Latest aggregated OI (detail endpoint only). */
|
|
381
|
+
aggregatedOi?: Hip4AggregatedOi;
|
|
382
|
+
}
|
|
383
|
+
/** Per-side spec embedded in `Hip4OutcomeAggregate.sideSpecs`. */
|
|
384
|
+
interface Hip4OutcomeSideSpec {
|
|
385
|
+
/** Side index (0 = Yes, 1 = No). */
|
|
386
|
+
side: number;
|
|
387
|
+
/** Side label. */
|
|
388
|
+
name?: string;
|
|
389
|
+
/** Coin string (e.g. `#0`). */
|
|
390
|
+
coin: string;
|
|
391
|
+
/** Public asset_id. */
|
|
392
|
+
assetId?: number;
|
|
393
|
+
/** Per-side human-readable title. */
|
|
394
|
+
displayTitle?: string;
|
|
395
|
+
/** Per-side URL slug. */
|
|
396
|
+
slug?: string;
|
|
397
|
+
}
|
|
398
|
+
/** Filter params for `/v1/hyperliquid/hip4/outcomes`. */
|
|
399
|
+
interface Hip4ListOutcomesParams {
|
|
400
|
+
/** Filter by settlement state. Omit to return all. */
|
|
401
|
+
isSettled?: boolean;
|
|
402
|
+
/**
|
|
403
|
+
* Slug filter. When provided, the response is a single-element list (or empty)
|
|
404
|
+
* containing the outcome whose per-outcome OR per-side slug matches. Composes
|
|
405
|
+
* with `isSettled`.
|
|
406
|
+
*/
|
|
407
|
+
slug?: string;
|
|
408
|
+
/** Cursor for next page. */
|
|
409
|
+
cursor?: number | string;
|
|
410
|
+
/** Max results per page. */
|
|
411
|
+
limit?: number;
|
|
412
|
+
}
|
|
239
413
|
/**
|
|
240
414
|
* Funding rate record
|
|
241
415
|
*/
|
|
@@ -463,22 +637,35 @@ interface PriceHistoryParams extends CursorPaginationParams {
|
|
|
463
637
|
* WebSocket channel types.
|
|
464
638
|
*
|
|
465
639
|
* - ticker/all_tickers: real-time only
|
|
466
|
-
* - liquidations:
|
|
467
|
-
* - hip3_liquidations:
|
|
640
|
+
* - liquidations: realtime + replay (Hyperliquid; live as of 1.6.0)
|
|
641
|
+
* - hip3_liquidations: realtime + replay (HIP-3; live as of 1.6.0)
|
|
468
642
|
* - open_interest, funding, lighter_open_interest, lighter_funding,
|
|
469
643
|
* hip3_open_interest, hip3_funding: historical only (replay/stream)
|
|
644
|
+
*
|
|
645
|
+
* HIP-4 channels (outcome contracts; no funding, no liquidations, no candles):
|
|
646
|
+
* - hip4_orderbook, hip4_trades, hip4_open_interest: realtime + replay
|
|
647
|
+
* - hip4_l4_diffs, hip4_l4_orders: real-time only (Pro+)
|
|
648
|
+
*
|
|
649
|
+
* Liquidation messages share the trade wire format: each item is a fill row
|
|
650
|
+
* with `is_liquidation: true`.
|
|
470
651
|
*/
|
|
471
|
-
type WsChannel = 'orderbook' | 'trades' | 'candles' | 'liquidations' | 'ticker' | 'all_tickers' | 'open_interest' | 'funding' | 'lighter_orderbook' | 'lighter_trades' | 'lighter_candles' | 'lighter_open_interest' | 'lighter_funding' | 'lighter_l3_orderbook' | 'hip3_orderbook' | 'hip3_trades' | 'hip3_candles' | 'hip3_open_interest' | 'hip3_funding' | 'hip3_liquidations' | 'l4_diffs' | 'l4_orders' | 'hip3_l4_diffs' | 'hip3_l4_orders';
|
|
652
|
+
type WsChannel = 'orderbook' | 'trades' | 'candles' | 'liquidations' | 'ticker' | 'all_tickers' | 'open_interest' | 'funding' | 'lighter_orderbook' | 'lighter_trades' | 'lighter_candles' | 'lighter_open_interest' | 'lighter_funding' | 'lighter_l3_orderbook' | 'hip3_orderbook' | 'hip3_trades' | 'hip3_candles' | 'hip3_open_interest' | 'hip3_funding' | 'hip3_liquidations' | 'hip4_orderbook' | 'hip4_trades' | 'hip4_open_interest' | 'l4_diffs' | 'l4_orders' | 'hip3_l4_diffs' | 'hip3_l4_orders' | 'hip4_l4_diffs' | 'hip4_l4_orders';
|
|
472
653
|
/** Subscribe message from client */
|
|
473
654
|
interface WsSubscribe {
|
|
474
655
|
op: 'subscribe';
|
|
475
656
|
channel: WsChannel;
|
|
657
|
+
/** Wire field for coin/symbol. The server accepts `symbol` (canonical)
|
|
658
|
+
* and `coin` (deprecated alias) during the migration period. */
|
|
659
|
+
symbol?: string;
|
|
660
|
+
/** @deprecated Use `symbol`. The server still accepts `coin` for now. */
|
|
476
661
|
coin?: string;
|
|
477
662
|
}
|
|
478
663
|
/** Unsubscribe message from client */
|
|
479
664
|
interface WsUnsubscribe {
|
|
480
665
|
op: 'unsubscribe';
|
|
481
666
|
channel: WsChannel;
|
|
667
|
+
symbol?: string;
|
|
668
|
+
/** @deprecated Use `symbol`. */
|
|
482
669
|
coin?: string;
|
|
483
670
|
}
|
|
484
671
|
/** Ping message from client */
|
|
@@ -492,6 +679,8 @@ interface WsReplay {
|
|
|
492
679
|
channel?: WsChannel;
|
|
493
680
|
/** Multiple channels for multi-channel replay. Mutually exclusive with `channel`. */
|
|
494
681
|
channels?: WsChannel[];
|
|
682
|
+
symbol?: string;
|
|
683
|
+
/** @deprecated Use `symbol`. */
|
|
495
684
|
coin?: string;
|
|
496
685
|
/** Start timestamp (Unix ms) */
|
|
497
686
|
start: number;
|
|
@@ -525,6 +714,8 @@ interface WsStream {
|
|
|
525
714
|
channel?: WsChannel;
|
|
526
715
|
/** Multiple channels for multi-channel streaming. Mutually exclusive with `channel`. */
|
|
527
716
|
channels?: WsChannel[];
|
|
717
|
+
symbol?: string;
|
|
718
|
+
/** @deprecated Use `symbol`. */
|
|
528
719
|
coin?: string;
|
|
529
720
|
/** Start timestamp (Unix ms) */
|
|
530
721
|
start: number;
|
|
@@ -720,8 +911,29 @@ interface WsL4Batch {
|
|
|
720
911
|
coin: string;
|
|
721
912
|
data: any[];
|
|
722
913
|
}
|
|
914
|
+
/**
|
|
915
|
+
* HIP-4 outcome settlement notification.
|
|
916
|
+
*
|
|
917
|
+
* Pushed once per `(outcome_id, side)` when `hip4_outcome_metadata.is_settled`
|
|
918
|
+
* flips to true. After delivering this message the server proactively
|
|
919
|
+
* unsubscribes the client from every hip4_* subscription on the settled coin —
|
|
920
|
+
* treat this as a terminal signal for the coin.
|
|
921
|
+
*/
|
|
922
|
+
interface WsOutcomeSettled {
|
|
923
|
+
type: 'outcome_settled';
|
|
924
|
+
/** HIP-4 coin (e.g. `#55850`). */
|
|
925
|
+
coin: string;
|
|
926
|
+
/** Numeric outcome id. */
|
|
927
|
+
outcome_id: number;
|
|
928
|
+
/** Side index (0 = Yes, 1 = No). */
|
|
929
|
+
side: number;
|
|
930
|
+
/** Settlement value (typically 1.0 for the winning side, 0.0 for the losing side). */
|
|
931
|
+
settlement_value?: number;
|
|
932
|
+
/** Settlement timestamp (ISO-8601). */
|
|
933
|
+
settlement_at?: string;
|
|
934
|
+
}
|
|
723
935
|
/** Server message union type */
|
|
724
|
-
type WsServerMessage = WsSubscribed | WsUnsubscribed | WsPong | WsError | WsData | WsReplayStarted | WsReplayPaused | WsReplayResumed | WsReplayCompleted | WsReplayStopped | WsReplaySnapshot | WsHistoricalData | WsHistoricalTickData | WsStreamStarted | WsStreamProgress | WsHistoricalBatch | WsStreamCompleted | WsStreamStopped | WsGapDetected | WsL4Snapshot | WsL4Batch;
|
|
936
|
+
type WsServerMessage = WsSubscribed | WsUnsubscribed | WsPong | WsError | WsData | WsReplayStarted | WsReplayPaused | WsReplayResumed | WsReplayCompleted | WsReplayStopped | WsReplaySnapshot | WsHistoricalData | WsHistoricalTickData | WsStreamStarted | WsStreamProgress | WsHistoricalBatch | WsStreamCompleted | WsStreamStopped | WsGapDetected | WsL4Snapshot | WsL4Batch | WsOutcomeSettled;
|
|
725
937
|
/**
|
|
726
938
|
* WebSocket connection options.
|
|
727
939
|
*
|
|
@@ -898,7 +1110,7 @@ interface ExchangeCoverage {
|
|
|
898
1110
|
}
|
|
899
1111
|
/** Overall coverage response */
|
|
900
1112
|
interface CoverageResponse {
|
|
901
|
-
/** Coverage for
|
|
1113
|
+
/** Coverage for supported venue APIs */
|
|
902
1114
|
exchanges: ExchangeCoverage[];
|
|
903
1115
|
}
|
|
904
1116
|
/** Gap information for per-symbol coverage */
|
|
@@ -1161,6 +1373,138 @@ declare class HttpClient {
|
|
|
1161
1373
|
post<T>(path: string, body?: Record<string, unknown>, schema?: z.ZodType<T>): Promise<T>;
|
|
1162
1374
|
}
|
|
1163
1375
|
|
|
1376
|
+
interface L4OrderBookParams {
|
|
1377
|
+
timestamp?: number | string;
|
|
1378
|
+
depth?: number;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* L4 Order Book API resource
|
|
1382
|
+
*
|
|
1383
|
+
* Access L4 orderbook snapshots, diffs, and history.
|
|
1384
|
+
*
|
|
1385
|
+
* @example
|
|
1386
|
+
* ```typescript
|
|
1387
|
+
* // Get current L4 orderbook
|
|
1388
|
+
* const orderbook = await client.hyperliquid.l4Orderbook.get('BTC');
|
|
1389
|
+
*
|
|
1390
|
+
* // Get L4 orderbook diffs
|
|
1391
|
+
* const diffs = await client.hyperliquid.l4Orderbook.diffs('BTC', {
|
|
1392
|
+
* start: Date.now() - 86400000,
|
|
1393
|
+
* end: Date.now(),
|
|
1394
|
+
* limit: 1000
|
|
1395
|
+
* });
|
|
1396
|
+
*
|
|
1397
|
+
* // Get L4 orderbook history
|
|
1398
|
+
* const history = await client.hyperliquid.l4Orderbook.history('BTC', {
|
|
1399
|
+
* start: Date.now() - 86400000,
|
|
1400
|
+
* end: Date.now(),
|
|
1401
|
+
* limit: 1000
|
|
1402
|
+
* });
|
|
1403
|
+
* ```
|
|
1404
|
+
*/
|
|
1405
|
+
declare class L4OrderBookResource {
|
|
1406
|
+
private http;
|
|
1407
|
+
private basePath;
|
|
1408
|
+
private coinTransform;
|
|
1409
|
+
constructor(http: HttpClient, basePath?: string, coinTransform?: (s: string) => string);
|
|
1410
|
+
/**
|
|
1411
|
+
* Get L4 order book snapshot for a symbol
|
|
1412
|
+
*
|
|
1413
|
+
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
1414
|
+
* @param params - Optional parameters (timestamp, depth)
|
|
1415
|
+
* @returns L4 order book snapshot
|
|
1416
|
+
*/
|
|
1417
|
+
get(symbol: string, params?: L4OrderBookParams): Promise<any>;
|
|
1418
|
+
/**
|
|
1419
|
+
* Get L4 order book diffs with cursor-based pagination
|
|
1420
|
+
*
|
|
1421
|
+
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
1422
|
+
* @param params - Time range and cursor pagination parameters
|
|
1423
|
+
* @returns CursorResponse with L4 orderbook diffs and nextCursor for pagination
|
|
1424
|
+
*/
|
|
1425
|
+
diffs(symbol: string, params: CursorPaginationParams): Promise<CursorResponse<any[]>>;
|
|
1426
|
+
/**
|
|
1427
|
+
* Get L4 order book history with cursor-based pagination
|
|
1428
|
+
*
|
|
1429
|
+
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
1430
|
+
* @param params - Time range and cursor pagination parameters
|
|
1431
|
+
* @returns CursorResponse with L4 orderbook snapshots and nextCursor for pagination
|
|
1432
|
+
*/
|
|
1433
|
+
history(symbol: string, params: CursorPaginationParams): Promise<CursorResponse<any[]>>;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
interface OrderHistoryParams extends CursorPaginationParams {
|
|
1437
|
+
user?: string;
|
|
1438
|
+
status?: string;
|
|
1439
|
+
order_type?: string;
|
|
1440
|
+
}
|
|
1441
|
+
interface OrderFlowParams {
|
|
1442
|
+
start: number | string;
|
|
1443
|
+
end: number | string;
|
|
1444
|
+
interval?: string;
|
|
1445
|
+
limit?: number;
|
|
1446
|
+
}
|
|
1447
|
+
interface TpslParams extends CursorPaginationParams {
|
|
1448
|
+
user?: string;
|
|
1449
|
+
triggered?: boolean;
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Orders API resource
|
|
1453
|
+
*
|
|
1454
|
+
* @example
|
|
1455
|
+
* ```typescript
|
|
1456
|
+
* // Get order history
|
|
1457
|
+
* const result = await client.hyperliquid.orders.history('BTC', {
|
|
1458
|
+
* start: Date.now() - 86400000,
|
|
1459
|
+
* end: Date.now(),
|
|
1460
|
+
* limit: 1000
|
|
1461
|
+
* });
|
|
1462
|
+
*
|
|
1463
|
+
* // Get order flow
|
|
1464
|
+
* const flow = await client.hyperliquid.orders.flow('BTC', {
|
|
1465
|
+
* start: Date.now() - 86400000,
|
|
1466
|
+
* end: Date.now(),
|
|
1467
|
+
* interval: '1h'
|
|
1468
|
+
* });
|
|
1469
|
+
*
|
|
1470
|
+
* // Get TP/SL orders
|
|
1471
|
+
* const tpsl = await client.hyperliquid.orders.tpsl('BTC', {
|
|
1472
|
+
* start: Date.now() - 86400000,
|
|
1473
|
+
* end: Date.now()
|
|
1474
|
+
* });
|
|
1475
|
+
* ```
|
|
1476
|
+
*/
|
|
1477
|
+
declare class OrdersResource {
|
|
1478
|
+
private http;
|
|
1479
|
+
private basePath;
|
|
1480
|
+
private coinTransform;
|
|
1481
|
+
constructor(http: HttpClient, basePath?: string, coinTransform?: (s: string) => string);
|
|
1482
|
+
/**
|
|
1483
|
+
* Get order history for a symbol with cursor-based pagination
|
|
1484
|
+
*
|
|
1485
|
+
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
1486
|
+
* @param params - Time range, cursor pagination, and filter parameters
|
|
1487
|
+
* @returns CursorResponse with order records and nextCursor for pagination
|
|
1488
|
+
*/
|
|
1489
|
+
history(symbol: string, params: OrderHistoryParams): Promise<CursorResponse<any[]>>;
|
|
1490
|
+
/**
|
|
1491
|
+
* Get order flow for a symbol
|
|
1492
|
+
*
|
|
1493
|
+
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
1494
|
+
* @param params - Time range and interval parameters
|
|
1495
|
+
* @returns CursorResponse with order flow records
|
|
1496
|
+
*/
|
|
1497
|
+
flow(symbol: string, params: OrderFlowParams): Promise<CursorResponse<any[]>>;
|
|
1498
|
+
/**
|
|
1499
|
+
* Get TP/SL orders for a symbol with cursor-based pagination
|
|
1500
|
+
*
|
|
1501
|
+
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
1502
|
+
* @param params - Time range, cursor pagination, and filter parameters
|
|
1503
|
+
* @returns CursorResponse with TP/SL order records
|
|
1504
|
+
*/
|
|
1505
|
+
tpsl(symbol: string, params: TpslParams): Promise<CursorResponse<any[]>>;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1164
1508
|
/**
|
|
1165
1509
|
* Orderbook Reconstructor for tick-level delta data.
|
|
1166
1510
|
*
|
|
@@ -1575,14 +1919,18 @@ declare class TradesResource {
|
|
|
1575
1919
|
/**
|
|
1576
1920
|
* Get most recent trades for a symbol.
|
|
1577
1921
|
*
|
|
1578
|
-
* Note: This method is available
|
|
1579
|
-
*
|
|
1580
|
-
*
|
|
1581
|
-
*
|
|
1922
|
+
* Note: This method is available on Lighter (`client.lighter.trades.recent()`),
|
|
1923
|
+
* HIP-3 (`client.hyperliquid.hip3.trades.recent()`), and HIP-4
|
|
1924
|
+
* (`client.hyperliquid.hip4.trades.recent()`) which have real-time ingestion.
|
|
1925
|
+
* Hyperliquid uses hourly S3 backfill and does NOT expose a recent endpoint —
|
|
1926
|
+
* calling `client.hyperliquid.trades.recent()` (or the legacy
|
|
1927
|
+
* `client.trades.recent()`) throws a structured `OxArchiveError` rather than
|
|
1928
|
+
* letting the request fail with an opaque JSON parse error.
|
|
1582
1929
|
*
|
|
1583
1930
|
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
1584
1931
|
* @param limit - Number of trades to return (default: 100)
|
|
1585
1932
|
* @returns Array of recent trades
|
|
1933
|
+
* @throws {OxArchiveError} When called on the bare Hyperliquid namespace.
|
|
1586
1934
|
*/
|
|
1587
1935
|
recent(symbol: string, limit?: number): Promise<Trade[]>;
|
|
1588
1936
|
}
|
|
@@ -1686,6 +2034,66 @@ declare class Hip3InstrumentsResource {
|
|
|
1686
2034
|
*/
|
|
1687
2035
|
get(coin: string): Promise<Hip3Instrument>;
|
|
1688
2036
|
}
|
|
2037
|
+
/**
|
|
2038
|
+
* HIP-4 Outcome-Market Per-Side Instruments resource.
|
|
2039
|
+
*
|
|
2040
|
+
* Returns one row per `#N` coin (each outcome has 2 sides). For per-outcome
|
|
2041
|
+
* aggregate metadata (with both sides combined), use `Hip4OutcomesResource`.
|
|
2042
|
+
*
|
|
2043
|
+
* The backend accepts both the bare numeric form (`'0'`, `'1'`) and the
|
|
2044
|
+
* `#`-prefixed form (`'#0'`, `'#1'`). The SDK URL-encodes `#` to `%23` so the
|
|
2045
|
+
* `#`-prefixed form (which is the canonical form returned by the API in
|
|
2046
|
+
* `coin` fields) survives `fetch`'s URL-fragment parsing.
|
|
2047
|
+
*
|
|
2048
|
+
* @example
|
|
2049
|
+
* ```typescript
|
|
2050
|
+
* // List all HIP-4 per-side instruments
|
|
2051
|
+
* const instruments = await client.hyperliquid.hip4.instruments.list();
|
|
2052
|
+
*
|
|
2053
|
+
* // Both forms work (SDK encodes `#` on the wire)
|
|
2054
|
+
* const yes = await client.hyperliquid.hip4.instruments.get('#0');
|
|
2055
|
+
* const yesAlt = await client.hyperliquid.hip4.instruments.get('0');
|
|
2056
|
+
* ```
|
|
2057
|
+
*/
|
|
2058
|
+
declare class Hip4InstrumentsResource {
|
|
2059
|
+
private http;
|
|
2060
|
+
private basePath;
|
|
2061
|
+
private coinTransform;
|
|
2062
|
+
constructor(http: HttpClient, basePath?: string, coinTransform?: (c: string) => string);
|
|
2063
|
+
list(): Promise<Hip4Outcome[]>;
|
|
2064
|
+
get(coin: string): Promise<Hip4Outcome>;
|
|
2065
|
+
}
|
|
2066
|
+
/**
|
|
2067
|
+
* HIP-4 Outcome aggregates resource (per-outcome view).
|
|
2068
|
+
*
|
|
2069
|
+
* No HIP-3 analog. List endpoint excludes `aggregatedOi`; detail endpoint
|
|
2070
|
+
* populates it with the latest both-sides OI snapshot.
|
|
2071
|
+
*
|
|
2072
|
+
* @example
|
|
2073
|
+
* ```typescript
|
|
2074
|
+
* // List live (unsettled) outcomes
|
|
2075
|
+
* const live = await client.hyperliquid.hip4.outcomes.list({ isSettled: false });
|
|
2076
|
+
*
|
|
2077
|
+
* // Get a single outcome with aggregated OI
|
|
2078
|
+
* const detail = await client.hyperliquid.hip4.outcomes.get(0);
|
|
2079
|
+
* console.log(detail.aggregatedOi?.outcomeDisplayOpenInterestContracts);
|
|
2080
|
+
* ```
|
|
2081
|
+
*/
|
|
2082
|
+
declare class Hip4OutcomesResource {
|
|
2083
|
+
private http;
|
|
2084
|
+
private basePath;
|
|
2085
|
+
constructor(http: HttpClient, basePath?: string);
|
|
2086
|
+
/** List per-outcome aggregates. `aggregatedOi` is omitted on list responses. */
|
|
2087
|
+
list(params?: Hip4ListOutcomesParams): Promise<CursorResponse<Hip4OutcomeAggregate[]>>;
|
|
2088
|
+
/** Get a single outcome aggregate. Response includes `aggregatedOi`. */
|
|
2089
|
+
get(outcomeId: number | string): Promise<Hip4OutcomeAggregate>;
|
|
2090
|
+
/**
|
|
2091
|
+
* Look up an outcome aggregate by its synthesized slug. Accepts the
|
|
2092
|
+
* per-outcome slug (`btc-above-78213-may-04-0600`) OR a per-side slug
|
|
2093
|
+
* (`btc-above-78213-yes-may-04-0600`). Response includes `aggregatedOi`.
|
|
2094
|
+
*/
|
|
2095
|
+
getBySlug(slug: string): Promise<Hip4OutcomeAggregate>;
|
|
2096
|
+
}
|
|
1689
2097
|
|
|
1690
2098
|
/**
|
|
1691
2099
|
* Funding rates API resource
|
|
@@ -1918,7 +2326,7 @@ declare class LiquidationsResource {
|
|
|
1918
2326
|
* const status = await client.dataQuality.status();
|
|
1919
2327
|
* console.log(`System status: ${status.status}`);
|
|
1920
2328
|
*
|
|
1921
|
-
* // Get coverage
|
|
2329
|
+
* // Get coverage across venue APIs
|
|
1922
2330
|
* const coverage = await client.dataQuality.coverage();
|
|
1923
2331
|
*
|
|
1924
2332
|
* // Get symbol-specific coverage with gap detection
|
|
@@ -1936,7 +2344,7 @@ declare class DataQualityResource {
|
|
|
1936
2344
|
/**
|
|
1937
2345
|
* Get overall system health status
|
|
1938
2346
|
*
|
|
1939
|
-
* @returns StatusResponse with overall status, per-
|
|
2347
|
+
* @returns StatusResponse with overall status, per-scope status,
|
|
1940
2348
|
* per-data-type status, and active incident count
|
|
1941
2349
|
*
|
|
1942
2350
|
* @example
|
|
@@ -1950,9 +2358,9 @@ declare class DataQualityResource {
|
|
|
1950
2358
|
*/
|
|
1951
2359
|
status(): Promise<StatusResponse>;
|
|
1952
2360
|
/**
|
|
1953
|
-
* Get data coverage summary
|
|
2361
|
+
* Get data coverage summary across venue APIs
|
|
1954
2362
|
*
|
|
1955
|
-
* @returns CoverageResponse with coverage info for
|
|
2363
|
+
* @returns CoverageResponse with coverage info for supported venue APIs and data types
|
|
1956
2364
|
*
|
|
1957
2365
|
* @example
|
|
1958
2366
|
* ```typescript
|
|
@@ -1967,10 +2375,10 @@ declare class DataQualityResource {
|
|
|
1967
2375
|
*/
|
|
1968
2376
|
coverage(): Promise<CoverageResponse>;
|
|
1969
2377
|
/**
|
|
1970
|
-
* Get data coverage for a specific
|
|
2378
|
+
* Get data coverage for a specific venue scope
|
|
1971
2379
|
*
|
|
1972
|
-
* @param exchange -
|
|
1973
|
-
* @returns ExchangeCoverage with coverage info for all data types on this
|
|
2380
|
+
* @param exchange - Venue scope ('hyperliquid', 'lighter', 'hip3', or 'hip4')
|
|
2381
|
+
* @returns ExchangeCoverage with coverage info for all data types on this venue scope
|
|
1974
2382
|
*
|
|
1975
2383
|
* @example
|
|
1976
2384
|
* ```typescript
|
|
@@ -1980,12 +2388,12 @@ declare class DataQualityResource {
|
|
|
1980
2388
|
*/
|
|
1981
2389
|
exchangeCoverage(exchange: string): Promise<ExchangeCoverage>;
|
|
1982
2390
|
/**
|
|
1983
|
-
* Get data coverage for a specific symbol on
|
|
2391
|
+
* Get data coverage for a specific symbol on a venue scope
|
|
1984
2392
|
*
|
|
1985
2393
|
* Includes gap detection, empirical data cadence, and hour-level historical coverage.
|
|
1986
2394
|
* Supports optional time bounds for gap detection (default: last 30 days).
|
|
1987
2395
|
*
|
|
1988
|
-
* @param exchange -
|
|
2396
|
+
* @param exchange - Venue scope ('hyperliquid', 'lighter', 'hip3', or 'hip4')
|
|
1989
2397
|
* @param symbol - Symbol name (e.g., 'BTC', 'ETH', or HIP3 coins like 'xyz:XYZ100')
|
|
1990
2398
|
* @param options - Optional time bounds for gap detection window
|
|
1991
2399
|
* @returns SymbolCoverageResponse with per-data-type coverage including gaps, cadence, and historical coverage
|
|
@@ -2045,7 +2453,7 @@ declare class DataQualityResource {
|
|
|
2045
2453
|
*/
|
|
2046
2454
|
getIncident(incidentId: string): Promise<Incident>;
|
|
2047
2455
|
/**
|
|
2048
|
-
* Get current latency metrics for
|
|
2456
|
+
* Get current latency metrics for supported venue APIs
|
|
2049
2457
|
*
|
|
2050
2458
|
* @returns LatencyResponse with WebSocket, REST API, and data freshness metrics
|
|
2051
2459
|
*
|
|
@@ -2156,138 +2564,6 @@ declare class Web3Resource {
|
|
|
2156
2564
|
subscribe(tier: 'build' | 'pro', paymentSignature: string): Promise<Web3SubscribeResult>;
|
|
2157
2565
|
}
|
|
2158
2566
|
|
|
2159
|
-
interface OrderHistoryParams extends CursorPaginationParams {
|
|
2160
|
-
user?: string;
|
|
2161
|
-
status?: string;
|
|
2162
|
-
order_type?: string;
|
|
2163
|
-
}
|
|
2164
|
-
interface OrderFlowParams {
|
|
2165
|
-
start: number | string;
|
|
2166
|
-
end: number | string;
|
|
2167
|
-
interval?: string;
|
|
2168
|
-
limit?: number;
|
|
2169
|
-
}
|
|
2170
|
-
interface TpslParams extends CursorPaginationParams {
|
|
2171
|
-
user?: string;
|
|
2172
|
-
triggered?: boolean;
|
|
2173
|
-
}
|
|
2174
|
-
/**
|
|
2175
|
-
* Orders API resource
|
|
2176
|
-
*
|
|
2177
|
-
* @example
|
|
2178
|
-
* ```typescript
|
|
2179
|
-
* // Get order history
|
|
2180
|
-
* const result = await client.hyperliquid.orders.history('BTC', {
|
|
2181
|
-
* start: Date.now() - 86400000,
|
|
2182
|
-
* end: Date.now(),
|
|
2183
|
-
* limit: 1000
|
|
2184
|
-
* });
|
|
2185
|
-
*
|
|
2186
|
-
* // Get order flow
|
|
2187
|
-
* const flow = await client.hyperliquid.orders.flow('BTC', {
|
|
2188
|
-
* start: Date.now() - 86400000,
|
|
2189
|
-
* end: Date.now(),
|
|
2190
|
-
* interval: '1h'
|
|
2191
|
-
* });
|
|
2192
|
-
*
|
|
2193
|
-
* // Get TP/SL orders
|
|
2194
|
-
* const tpsl = await client.hyperliquid.orders.tpsl('BTC', {
|
|
2195
|
-
* start: Date.now() - 86400000,
|
|
2196
|
-
* end: Date.now()
|
|
2197
|
-
* });
|
|
2198
|
-
* ```
|
|
2199
|
-
*/
|
|
2200
|
-
declare class OrdersResource {
|
|
2201
|
-
private http;
|
|
2202
|
-
private basePath;
|
|
2203
|
-
private coinTransform;
|
|
2204
|
-
constructor(http: HttpClient, basePath?: string, coinTransform?: (s: string) => string);
|
|
2205
|
-
/**
|
|
2206
|
-
* Get order history for a symbol with cursor-based pagination
|
|
2207
|
-
*
|
|
2208
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2209
|
-
* @param params - Time range, cursor pagination, and filter parameters
|
|
2210
|
-
* @returns CursorResponse with order records and nextCursor for pagination
|
|
2211
|
-
*/
|
|
2212
|
-
history(symbol: string, params: OrderHistoryParams): Promise<CursorResponse<any[]>>;
|
|
2213
|
-
/**
|
|
2214
|
-
* Get order flow for a symbol
|
|
2215
|
-
*
|
|
2216
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2217
|
-
* @param params - Time range and interval parameters
|
|
2218
|
-
* @returns CursorResponse with order flow records
|
|
2219
|
-
*/
|
|
2220
|
-
flow(symbol: string, params: OrderFlowParams): Promise<CursorResponse<any[]>>;
|
|
2221
|
-
/**
|
|
2222
|
-
* Get TP/SL orders for a symbol with cursor-based pagination
|
|
2223
|
-
*
|
|
2224
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2225
|
-
* @param params - Time range, cursor pagination, and filter parameters
|
|
2226
|
-
* @returns CursorResponse with TP/SL order records
|
|
2227
|
-
*/
|
|
2228
|
-
tpsl(symbol: string, params: TpslParams): Promise<CursorResponse<any[]>>;
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
interface L4OrderBookParams {
|
|
2232
|
-
timestamp?: number | string;
|
|
2233
|
-
depth?: number;
|
|
2234
|
-
}
|
|
2235
|
-
/**
|
|
2236
|
-
* L4 Order Book API resource
|
|
2237
|
-
*
|
|
2238
|
-
* Access L4 orderbook snapshots, diffs, and history.
|
|
2239
|
-
*
|
|
2240
|
-
* @example
|
|
2241
|
-
* ```typescript
|
|
2242
|
-
* // Get current L4 orderbook
|
|
2243
|
-
* const orderbook = await client.hyperliquid.l4Orderbook.get('BTC');
|
|
2244
|
-
*
|
|
2245
|
-
* // Get L4 orderbook diffs
|
|
2246
|
-
* const diffs = await client.hyperliquid.l4Orderbook.diffs('BTC', {
|
|
2247
|
-
* start: Date.now() - 86400000,
|
|
2248
|
-
* end: Date.now(),
|
|
2249
|
-
* limit: 1000
|
|
2250
|
-
* });
|
|
2251
|
-
*
|
|
2252
|
-
* // Get L4 orderbook history
|
|
2253
|
-
* const history = await client.hyperliquid.l4Orderbook.history('BTC', {
|
|
2254
|
-
* start: Date.now() - 86400000,
|
|
2255
|
-
* end: Date.now(),
|
|
2256
|
-
* limit: 1000
|
|
2257
|
-
* });
|
|
2258
|
-
* ```
|
|
2259
|
-
*/
|
|
2260
|
-
declare class L4OrderBookResource {
|
|
2261
|
-
private http;
|
|
2262
|
-
private basePath;
|
|
2263
|
-
private coinTransform;
|
|
2264
|
-
constructor(http: HttpClient, basePath?: string, coinTransform?: (s: string) => string);
|
|
2265
|
-
/**
|
|
2266
|
-
* Get L4 order book snapshot for a symbol
|
|
2267
|
-
*
|
|
2268
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2269
|
-
* @param params - Optional parameters (timestamp, depth)
|
|
2270
|
-
* @returns L4 order book snapshot
|
|
2271
|
-
*/
|
|
2272
|
-
get(symbol: string, params?: L4OrderBookParams): Promise<any>;
|
|
2273
|
-
/**
|
|
2274
|
-
* Get L4 order book diffs with cursor-based pagination
|
|
2275
|
-
*
|
|
2276
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2277
|
-
* @param params - Time range and cursor pagination parameters
|
|
2278
|
-
* @returns CursorResponse with L4 orderbook diffs and nextCursor for pagination
|
|
2279
|
-
*/
|
|
2280
|
-
diffs(symbol: string, params: CursorPaginationParams): Promise<CursorResponse<any[]>>;
|
|
2281
|
-
/**
|
|
2282
|
-
* Get L4 order book history with cursor-based pagination
|
|
2283
|
-
*
|
|
2284
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2285
|
-
* @param params - Time range and cursor pagination parameters
|
|
2286
|
-
* @returns CursorResponse with L4 orderbook snapshots and nextCursor for pagination
|
|
2287
|
-
*/
|
|
2288
|
-
history(symbol: string, params: CursorPaginationParams): Promise<CursorResponse<any[]>>;
|
|
2289
|
-
}
|
|
2290
|
-
|
|
2291
2567
|
interface L2OrderBookParams {
|
|
2292
2568
|
timestamp?: number | string;
|
|
2293
2569
|
depth?: number;
|
|
@@ -2433,6 +2709,10 @@ declare class HyperliquidClient {
|
|
|
2433
2709
|
* HIP-3 builder-deployed perpetuals (February 2026+)
|
|
2434
2710
|
*/
|
|
2435
2711
|
readonly hip3: Hip3Client;
|
|
2712
|
+
/**
|
|
2713
|
+
* HIP-4 outcome markets (binary YES/NO; May 2026+)
|
|
2714
|
+
*/
|
|
2715
|
+
readonly hip4: Hip4Client;
|
|
2436
2716
|
private http;
|
|
2437
2717
|
constructor(http: HttpClient);
|
|
2438
2718
|
/**
|
|
@@ -2537,6 +2817,165 @@ declare class Hip3Client {
|
|
|
2537
2817
|
*/
|
|
2538
2818
|
priceHistory(symbol: string, params: PriceHistoryParams): Promise<CursorResponse<PriceSnapshot[]>>;
|
|
2539
2819
|
}
|
|
2820
|
+
/**
|
|
2821
|
+
* HIP-4 outcome-market client
|
|
2822
|
+
*
|
|
2823
|
+
* Access Hyperliquid HIP-4 binary outcome markets through the 0xarchive API.
|
|
2824
|
+
*
|
|
2825
|
+
* Coin format: `#<10*outcome_id + side>` (e.g. `#0` is outcome 0 / Yes, `#1` is outcome 0 / No).
|
|
2826
|
+
* The backend accepts both the bare numeric form (`0`, `1`) and the on-chain
|
|
2827
|
+
* `#`-prefixed form (`#0`, `#1`). The SDK URL-encodes coins on the wire so that
|
|
2828
|
+
* the `#`-prefixed form survives transit (`#` is the URL-fragment delimiter and
|
|
2829
|
+
* would otherwise be stripped by `fetch`). Either form works; pass whichever is
|
|
2830
|
+
* convenient.
|
|
2831
|
+
*
|
|
2832
|
+
* `mark_price` (and `midPrice`) for HIP-4 is an implied probability in [0, 1],
|
|
2833
|
+
* not a USD price. HIP-4 markets are fully collateralized so there are no
|
|
2834
|
+
* funding rates, no liquidations, and no candles by design.
|
|
2835
|
+
*
|
|
2836
|
+
* Tier gating mirrors HIP-3: Pro+ for L4 / full orderbook / orders, Build+ for everything else.
|
|
2837
|
+
*
|
|
2838
|
+
* @example
|
|
2839
|
+
* ```typescript
|
|
2840
|
+
* const client = new OxArchive({ apiKey: '...' });
|
|
2841
|
+
*
|
|
2842
|
+
* // Both forms work — the SDK encodes `#` to `%23` on the wire so the
|
|
2843
|
+
* // path makes it through `fetch` intact.
|
|
2844
|
+
* const orderbook = await client.hyperliquid.hip4.getOrderbook('#0');
|
|
2845
|
+
* const orderbookAlt = await client.hyperliquid.hip4.getOrderbook('0');
|
|
2846
|
+
*
|
|
2847
|
+
* // Filter outcomes by slug
|
|
2848
|
+
* const outcomes = await client.hyperliquid.hip4.listOutcomes({ isSettled: false });
|
|
2849
|
+
* const bySlug = await client.hyperliquid.hip4.getOutcomeBySlug('btc-above-78213-may-04-0600');
|
|
2850
|
+
* ```
|
|
2851
|
+
*/
|
|
2852
|
+
declare class Hip4Client {
|
|
2853
|
+
/**
|
|
2854
|
+
* HIP-4 per-side instruments (one row per `#N`).
|
|
2855
|
+
*/
|
|
2856
|
+
readonly instruments: Hip4InstrumentsResource;
|
|
2857
|
+
/**
|
|
2858
|
+
* HIP-4 per-outcome aggregates (one row per outcome). HIP-4-specific, no HIP-3 analog.
|
|
2859
|
+
*/
|
|
2860
|
+
readonly outcomes: Hip4OutcomesResource;
|
|
2861
|
+
/**
|
|
2862
|
+
* L2 orderbook snapshots (Pro+).
|
|
2863
|
+
*/
|
|
2864
|
+
readonly orderbook: OrderBookResource;
|
|
2865
|
+
/**
|
|
2866
|
+
* Trade/fill history.
|
|
2867
|
+
*/
|
|
2868
|
+
readonly trades: TradesResource;
|
|
2869
|
+
/**
|
|
2870
|
+
* Open interest (per side).
|
|
2871
|
+
*/
|
|
2872
|
+
readonly openInterest: OpenInterestResource;
|
|
2873
|
+
/**
|
|
2874
|
+
* Order history, flow, and TP/SL (Pro+).
|
|
2875
|
+
*/
|
|
2876
|
+
readonly orders: OrdersResource;
|
|
2877
|
+
/**
|
|
2878
|
+
* L4 orderbook (snapshots, diffs, history).
|
|
2879
|
+
*/
|
|
2880
|
+
readonly l4Orderbook: L4OrderBookResource;
|
|
2881
|
+
/**
|
|
2882
|
+
* L2 full-depth orderbook (derived from L4).
|
|
2883
|
+
*/
|
|
2884
|
+
readonly l2Orderbook: L2OrderBookResource;
|
|
2885
|
+
private http;
|
|
2886
|
+
constructor(http: HttpClient);
|
|
2887
|
+
/** @internal Encode a HIP-4 coin for use in URL paths. */
|
|
2888
|
+
private encodeCoin;
|
|
2889
|
+
/**
|
|
2890
|
+
* List per-outcome aggregates. `aggregatedOi` is omitted on list responses.
|
|
2891
|
+
*/
|
|
2892
|
+
listOutcomes(params?: Hip4ListOutcomesParams): Promise<CursorResponse<Hip4OutcomeAggregate[]>>;
|
|
2893
|
+
/**
|
|
2894
|
+
* Get a single outcome aggregate (includes `aggregatedOi`).
|
|
2895
|
+
*/
|
|
2896
|
+
getOutcome(outcomeId: number | string): Promise<Hip4OutcomeAggregate>;
|
|
2897
|
+
/**
|
|
2898
|
+
* Look up an outcome aggregate by slug. Accepts the per-outcome slug
|
|
2899
|
+
* (e.g. `btc-above-78213-may-04-0600`) OR a per-side slug
|
|
2900
|
+
* (e.g. `btc-above-78213-yes-may-04-0600`). Includes `aggregatedOi`.
|
|
2901
|
+
*/
|
|
2902
|
+
getOutcomeBySlug(slug: string): Promise<Hip4OutcomeAggregate>;
|
|
2903
|
+
/**
|
|
2904
|
+
* List all per-side instruments (one row per `#N`).
|
|
2905
|
+
*/
|
|
2906
|
+
getInstruments(): Promise<Hip4Outcome[]>;
|
|
2907
|
+
/**
|
|
2908
|
+
* Get a single per-side instrument by coin (e.g. `#0`).
|
|
2909
|
+
*/
|
|
2910
|
+
getInstrument(coin: string): Promise<Hip4Outcome>;
|
|
2911
|
+
/**
|
|
2912
|
+
* Get current L2 orderbook snapshot for a HIP-4 coin (Pro+).
|
|
2913
|
+
* @param coin Coin string with leading `#` (e.g. `#0`).
|
|
2914
|
+
*/
|
|
2915
|
+
getOrderbook(coin: string, params?: GetOrderBookParams): Promise<OrderBook>;
|
|
2916
|
+
/**
|
|
2917
|
+
* Get historical L2 orderbook snapshots for a HIP-4 coin (Pro+).
|
|
2918
|
+
*/
|
|
2919
|
+
getOrderbookHistory(coin: string, params: OrderBookHistoryParams): Promise<CursorResponse<OrderBook[]>>;
|
|
2920
|
+
/**
|
|
2921
|
+
* Get historical fills for a HIP-4 coin.
|
|
2922
|
+
*/
|
|
2923
|
+
getTrades(coin: string, params: GetTradesCursorParams): Promise<CursorResponse<Trade[]>>;
|
|
2924
|
+
/**
|
|
2925
|
+
* Get most recent N fills for a HIP-4 coin (latest first).
|
|
2926
|
+
*/
|
|
2927
|
+
getTradesRecent(coin: string, limit?: number): Promise<Trade[]>;
|
|
2928
|
+
/**
|
|
2929
|
+
* Get per-side open interest history for a HIP-4 coin.
|
|
2930
|
+
* Note: `markPrice` on the response is an implied probability (0..1), not USD.
|
|
2931
|
+
*/
|
|
2932
|
+
getOpenInterest(coin: string, params: OpenInterestHistoryParams): Promise<CursorResponse<OpenInterest[]>>;
|
|
2933
|
+
/**
|
|
2934
|
+
* Get current per-side open interest for a HIP-4 coin.
|
|
2935
|
+
* Note: `markPrice` on the response is an implied probability (0..1), not USD.
|
|
2936
|
+
*/
|
|
2937
|
+
getOpenInterestCurrent(coin: string): Promise<OpenInterest>;
|
|
2938
|
+
/**
|
|
2939
|
+
* Get combined market summary for a HIP-4 coin.
|
|
2940
|
+
* @param coin Either bare numeric form (`'0'`) or `#`-prefixed form (`'#0'`). The SDK URL-encodes `#` so both work.
|
|
2941
|
+
*/
|
|
2942
|
+
getSummary(coin: string): Promise<CoinSummary>;
|
|
2943
|
+
/**
|
|
2944
|
+
* Get per-symbol data freshness across all HIP-4 data types.
|
|
2945
|
+
* @param coin Either bare numeric form (`'0'`) or `#`-prefixed form (`'#0'`). The SDK URL-encodes `#` so both work.
|
|
2946
|
+
*/
|
|
2947
|
+
getFreshness(coin: string): Promise<CoinFreshness>;
|
|
2948
|
+
/**
|
|
2949
|
+
* Get mid-price history for a HIP-4 coin.
|
|
2950
|
+
* Note: returned `markPrice`/`midPrice` are probabilities (0..1), not USD.
|
|
2951
|
+
* @param coin Either bare numeric form (`'0'`) or `#`-prefixed form (`'#0'`). The SDK URL-encodes `#` so both work.
|
|
2952
|
+
*/
|
|
2953
|
+
getPrices(coin: string, params: PriceHistoryParams): Promise<CursorResponse<PriceSnapshot[]>>;
|
|
2954
|
+
/**
|
|
2955
|
+
* Get order lifecycle events for a HIP-4 coin (Pro+).
|
|
2956
|
+
*/
|
|
2957
|
+
getOrderHistory(coin: string, params: OrderHistoryParams): Promise<CursorResponse<any[]>>;
|
|
2958
|
+
/**
|
|
2959
|
+
* Get time-bucketed order-flow aggregates for a HIP-4 coin (Pro+).
|
|
2960
|
+
*/
|
|
2961
|
+
getOrderFlow(coin: string, params: OrderFlowParams): Promise<CursorResponse<any[]>>;
|
|
2962
|
+
/**
|
|
2963
|
+
* Get TP/SL orders for a HIP-4 coin (Pro+).
|
|
2964
|
+
*/
|
|
2965
|
+
getTpsl(coin: string, params: TpslParams): Promise<CursorResponse<any[]>>;
|
|
2966
|
+
/**
|
|
2967
|
+
* Get full L4 reconstruction (current) for a HIP-4 coin (Pro+).
|
|
2968
|
+
*/
|
|
2969
|
+
getL4Orderbook(coin: string, params?: L4OrderBookParams): Promise<any>;
|
|
2970
|
+
/**
|
|
2971
|
+
* Get L4 diffs (event stream) for a HIP-4 coin (Pro+).
|
|
2972
|
+
*/
|
|
2973
|
+
getL4Diffs(coin: string, params: CursorPaginationParams): Promise<CursorResponse<any[]>>;
|
|
2974
|
+
/**
|
|
2975
|
+
* Get L4 checkpoint history for a HIP-4 coin (Build+; hard cap limit=10).
|
|
2976
|
+
*/
|
|
2977
|
+
getL4History(coin: string, params: CursorPaginationParams): Promise<CursorResponse<any[]>>;
|
|
2978
|
+
}
|
|
2540
2979
|
/**
|
|
2541
2980
|
* Lighter.xyz exchange client
|
|
2542
2981
|
*
|
|
@@ -2609,8 +3048,9 @@ declare class LighterClient {
|
|
|
2609
3048
|
/**
|
|
2610
3049
|
* 0xarchive API client
|
|
2611
3050
|
*
|
|
2612
|
-
* Supports
|
|
3051
|
+
* Supports two top-level venue APIs:
|
|
2613
3052
|
* - `client.hyperliquid` - Hyperliquid perpetuals (April 2023+)
|
|
3053
|
+
* - `client.hyperliquid.hip3` - Hyperliquid HIP-3 builder perps under the Hyperliquid namespace
|
|
2614
3054
|
* - `client.lighter` - Lighter.xyz perpetuals
|
|
2615
3055
|
*
|
|
2616
3056
|
* @example
|
|
@@ -2626,6 +3066,9 @@ declare class LighterClient {
|
|
|
2626
3066
|
* // Lighter.xyz data
|
|
2627
3067
|
* const lighterOrderbook = await client.lighter.orderbook.get('BTC');
|
|
2628
3068
|
*
|
|
3069
|
+
* // Hyperliquid HIP-3 data
|
|
3070
|
+
* const hip3Orderbook = await client.hyperliquid.hip3.orderbook.get('km:US500');
|
|
3071
|
+
*
|
|
2629
3072
|
* // Get historical data
|
|
2630
3073
|
* const history = await client.hyperliquid.orderbook.history('ETH', {
|
|
2631
3074
|
* start: Date.now() - 86400000,
|
|
@@ -2761,7 +3204,9 @@ declare class OxArchiveWs {
|
|
|
2761
3204
|
private streamCompleteHandlers;
|
|
2762
3205
|
private orderbookHandlers;
|
|
2763
3206
|
private tradesHandlers;
|
|
3207
|
+
private liquidationsHandlers;
|
|
2764
3208
|
private gapHandlers;
|
|
3209
|
+
private outcomeSettledHandlers;
|
|
2765
3210
|
constructor(options: WsOptions);
|
|
2766
3211
|
/**
|
|
2767
3212
|
* Connect to the WebSocket server
|
|
@@ -2818,6 +3263,35 @@ declare class OxArchiveWs {
|
|
|
2818
3263
|
* Unsubscribe from all tickers
|
|
2819
3264
|
*/
|
|
2820
3265
|
unsubscribeAllTickers(): void;
|
|
3266
|
+
/**
|
|
3267
|
+
* Subscribe to live liquidation events for a coin (Hyperliquid).
|
|
3268
|
+
*
|
|
3269
|
+
* Each message is a fill row with `is_liquidation: true`. Same wire shape as
|
|
3270
|
+
* trades. Live as of v1.6.0 (Hyperliquid + HIP-3 nodes); historical replay
|
|
3271
|
+
* also supported via `replay('liquidations', ...)`.
|
|
3272
|
+
*/
|
|
3273
|
+
subscribeLiquidations(coin: string): void;
|
|
3274
|
+
/** Unsubscribe from live liquidation events (Hyperliquid). */
|
|
3275
|
+
unsubscribeLiquidations(coin: string): void;
|
|
3276
|
+
/**
|
|
3277
|
+
* Subscribe to live HIP-3 liquidation events for a coin.
|
|
3278
|
+
* Each message is a fill row with `is_liquidation: true`.
|
|
3279
|
+
*/
|
|
3280
|
+
subscribeHip3Liquidations(coin: string): void;
|
|
3281
|
+
/** Unsubscribe from live HIP-3 liquidation events. */
|
|
3282
|
+
unsubscribeHip3Liquidations(coin: string): void;
|
|
3283
|
+
/**
|
|
3284
|
+
* Subscribe to a HIP-4 channel for a given outcome coin.
|
|
3285
|
+
*
|
|
3286
|
+
* @param channel One of `hip4_orderbook`, `hip4_trades`, `hip4_open_interest`,
|
|
3287
|
+
* `hip4_l4_diffs`, `hip4_l4_orders`.
|
|
3288
|
+
* @param coin HIP-4 coin (e.g. `'#0'` or `'0'`). The bare numeric form is
|
|
3289
|
+
* recommended; both are accepted by the backend.
|
|
3290
|
+
*/
|
|
3291
|
+
subscribeHip4(channel: 'orderbook' | 'trades' | 'open_interest' | 'l4_diffs' | 'l4_orders' | 'hip4_orderbook' | 'hip4_trades' | 'hip4_open_interest' | 'hip4_l4_diffs' | 'hip4_l4_orders', coin: string): void;
|
|
3292
|
+
/** Unsubscribe from a HIP-4 channel for a given outcome coin. Accepts the
|
|
3293
|
+
* short channel form (`'orderbook'`) or the full form (`'hip4_orderbook'`). */
|
|
3294
|
+
unsubscribeHip4(channel: 'orderbook' | 'trades' | 'open_interest' | 'l4_diffs' | 'l4_orders' | 'hip4_orderbook' | 'hip4_trades' | 'hip4_open_interest' | 'hip4_l4_diffs' | 'hip4_l4_orders', coin: string): void;
|
|
2821
3295
|
/**
|
|
2822
3296
|
* Start historical replay with timing preserved
|
|
2823
3297
|
*
|
|
@@ -3043,6 +3517,40 @@ declare class OxArchiveWs {
|
|
|
3043
3517
|
* Helper to handle typed trade data
|
|
3044
3518
|
*/
|
|
3045
3519
|
onTrades(handler: (coin: string, data: Trade[]) => void): void;
|
|
3520
|
+
/**
|
|
3521
|
+
* Helper to handle live liquidation events for both `liquidations` and
|
|
3522
|
+
* `hip3_liquidations` channels. Each item is a fill row with
|
|
3523
|
+
* `is_liquidation: true`, surfaced as a `Trade` (the wire shape matches
|
|
3524
|
+
* trades exactly).
|
|
3525
|
+
*
|
|
3526
|
+
* @param handler Called with the channel, coin, and parsed Trade array.
|
|
3527
|
+
*
|
|
3528
|
+
* @example
|
|
3529
|
+
* ```typescript
|
|
3530
|
+
* ws.onLiquidations((channel, coin, fills) => {
|
|
3531
|
+
* for (const f of fills) {
|
|
3532
|
+
* console.log(`${channel} ${coin} liq: ${f.side} ${f.size}@${f.price}`);
|
|
3533
|
+
* }
|
|
3534
|
+
* });
|
|
3535
|
+
* ws.subscribeLiquidations('BTC');
|
|
3536
|
+
* ws.subscribeHip3Liquidations('hyna:BTC');
|
|
3537
|
+
* ```
|
|
3538
|
+
*/
|
|
3539
|
+
onLiquidations(handler: (channel: WsChannel, coin: string, data: Trade[]) => void): void;
|
|
3540
|
+
/**
|
|
3541
|
+
* Handle HIP-4 outcome settlement events. Pushed once per `(outcome_id, side)`
|
|
3542
|
+
* when the outcome flips to settled. After this event the server proactively
|
|
3543
|
+
* unsubscribes the client from every hip4_* subscription on the settled coin —
|
|
3544
|
+
* treat the event as a terminal signal for that coin.
|
|
3545
|
+
*
|
|
3546
|
+
* @example
|
|
3547
|
+
* ```typescript
|
|
3548
|
+
* ws.onOutcomeSettled((coin, outcomeId, side, value, at) => {
|
|
3549
|
+
* console.log(`${coin} (outcome ${outcomeId} side ${side}) settled to ${value} at ${at}`);
|
|
3550
|
+
* });
|
|
3551
|
+
* ```
|
|
3552
|
+
*/
|
|
3553
|
+
onOutcomeSettled(handler: (coin: string, outcomeId: number, side: number, settlementValue?: number, settlementAt?: string) => void): void;
|
|
3046
3554
|
private send;
|
|
3047
3555
|
private setState;
|
|
3048
3556
|
private startPing;
|
|
@@ -3334,6 +3842,12 @@ declare const TradeSchema: z.ZodObject<{
|
|
|
3334
3842
|
userAddress: z.ZodOptional<z.ZodString>;
|
|
3335
3843
|
makerAddress: z.ZodOptional<z.ZodString>;
|
|
3336
3844
|
takerAddress: z.ZodOptional<z.ZodString>;
|
|
3845
|
+
builderAddress: z.ZodOptional<z.ZodString>;
|
|
3846
|
+
builderFee: z.ZodOptional<z.ZodString>;
|
|
3847
|
+
deployerFee: z.ZodOptional<z.ZodString>;
|
|
3848
|
+
priorityGas: z.ZodOptional<z.ZodNumber>;
|
|
3849
|
+
cloid: z.ZodOptional<z.ZodString>;
|
|
3850
|
+
twapId: z.ZodOptional<z.ZodNumber>;
|
|
3337
3851
|
}, "strip", z.ZodTypeAny, {
|
|
3338
3852
|
coin: string;
|
|
3339
3853
|
timestamp: string;
|
|
@@ -3352,6 +3866,12 @@ declare const TradeSchema: z.ZodObject<{
|
|
|
3352
3866
|
userAddress?: string | undefined;
|
|
3353
3867
|
makerAddress?: string | undefined;
|
|
3354
3868
|
takerAddress?: string | undefined;
|
|
3869
|
+
builderAddress?: string | undefined;
|
|
3870
|
+
builderFee?: string | undefined;
|
|
3871
|
+
deployerFee?: string | undefined;
|
|
3872
|
+
priorityGas?: number | undefined;
|
|
3873
|
+
cloid?: string | undefined;
|
|
3874
|
+
twapId?: number | undefined;
|
|
3355
3875
|
}, {
|
|
3356
3876
|
coin: string;
|
|
3357
3877
|
timestamp: string;
|
|
@@ -3370,6 +3890,12 @@ declare const TradeSchema: z.ZodObject<{
|
|
|
3370
3890
|
userAddress?: string | undefined;
|
|
3371
3891
|
makerAddress?: string | undefined;
|
|
3372
3892
|
takerAddress?: string | undefined;
|
|
3893
|
+
builderAddress?: string | undefined;
|
|
3894
|
+
builderFee?: string | undefined;
|
|
3895
|
+
deployerFee?: string | undefined;
|
|
3896
|
+
priorityGas?: number | undefined;
|
|
3897
|
+
cloid?: string | undefined;
|
|
3898
|
+
twapId?: number | undefined;
|
|
3373
3899
|
}>;
|
|
3374
3900
|
declare const InstrumentTypeSchema: z.ZodEnum<["perp", "spot"]>;
|
|
3375
3901
|
declare const InstrumentSchema: z.ZodObject<{
|
|
@@ -3514,32 +4040,32 @@ declare const CandleSchema: z.ZodObject<{
|
|
|
3514
4040
|
quoteVolume?: number | undefined;
|
|
3515
4041
|
tradeCount?: number | undefined;
|
|
3516
4042
|
}>;
|
|
3517
|
-
declare const WsChannelSchema: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4043
|
+
declare const WsChannelSchema: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3518
4044
|
declare const WsConnectionStateSchema: z.ZodEnum<["connecting", "connected", "disconnected", "reconnecting"]>;
|
|
3519
4045
|
declare const WsSubscribedSchema: z.ZodObject<{
|
|
3520
4046
|
type: z.ZodLiteral<"subscribed">;
|
|
3521
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4047
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3522
4048
|
coin: z.ZodOptional<z.ZodString>;
|
|
3523
4049
|
}, "strip", z.ZodTypeAny, {
|
|
3524
4050
|
type: "subscribed";
|
|
3525
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4051
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3526
4052
|
coin?: string | undefined;
|
|
3527
4053
|
}, {
|
|
3528
4054
|
type: "subscribed";
|
|
3529
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4055
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3530
4056
|
coin?: string | undefined;
|
|
3531
4057
|
}>;
|
|
3532
4058
|
declare const WsUnsubscribedSchema: z.ZodObject<{
|
|
3533
4059
|
type: z.ZodLiteral<"unsubscribed">;
|
|
3534
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4060
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3535
4061
|
coin: z.ZodOptional<z.ZodString>;
|
|
3536
4062
|
}, "strip", z.ZodTypeAny, {
|
|
3537
4063
|
type: "unsubscribed";
|
|
3538
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4064
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3539
4065
|
coin?: string | undefined;
|
|
3540
4066
|
}, {
|
|
3541
4067
|
type: "unsubscribed";
|
|
3542
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4068
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3543
4069
|
coin?: string | undefined;
|
|
3544
4070
|
}>;
|
|
3545
4071
|
declare const WsPongSchema: z.ZodObject<{
|
|
@@ -3561,23 +4087,23 @@ declare const WsErrorSchema: z.ZodObject<{
|
|
|
3561
4087
|
}>;
|
|
3562
4088
|
declare const WsDataSchema: z.ZodObject<{
|
|
3563
4089
|
type: z.ZodLiteral<"data">;
|
|
3564
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4090
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3565
4091
|
coin: z.ZodString;
|
|
3566
4092
|
data: z.ZodUnknown;
|
|
3567
4093
|
}, "strip", z.ZodTypeAny, {
|
|
3568
4094
|
type: "data";
|
|
3569
4095
|
coin: string;
|
|
3570
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4096
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3571
4097
|
data?: unknown;
|
|
3572
4098
|
}, {
|
|
3573
4099
|
type: "data";
|
|
3574
4100
|
coin: string;
|
|
3575
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4101
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3576
4102
|
data?: unknown;
|
|
3577
4103
|
}>;
|
|
3578
4104
|
declare const WsReplayStartedSchema: z.ZodObject<{
|
|
3579
4105
|
type: z.ZodLiteral<"replay_started">;
|
|
3580
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4106
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3581
4107
|
coin: z.ZodString;
|
|
3582
4108
|
start: z.ZodNumber;
|
|
3583
4109
|
end: z.ZodNumber;
|
|
@@ -3585,14 +4111,14 @@ declare const WsReplayStartedSchema: z.ZodObject<{
|
|
|
3585
4111
|
}, "strip", z.ZodTypeAny, {
|
|
3586
4112
|
type: "replay_started";
|
|
3587
4113
|
coin: string;
|
|
3588
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4114
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3589
4115
|
start: number;
|
|
3590
4116
|
end: number;
|
|
3591
4117
|
speed: number;
|
|
3592
4118
|
}, {
|
|
3593
4119
|
type: "replay_started";
|
|
3594
4120
|
coin: string;
|
|
3595
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4121
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3596
4122
|
start: number;
|
|
3597
4123
|
end: number;
|
|
3598
4124
|
speed: number;
|
|
@@ -3619,18 +4145,18 @@ declare const WsReplayResumedSchema: z.ZodObject<{
|
|
|
3619
4145
|
}>;
|
|
3620
4146
|
declare const WsReplayCompletedSchema: z.ZodObject<{
|
|
3621
4147
|
type: z.ZodLiteral<"replay_completed">;
|
|
3622
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4148
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3623
4149
|
coin: z.ZodString;
|
|
3624
4150
|
snapshots_sent: z.ZodNumber;
|
|
3625
4151
|
}, "strip", z.ZodTypeAny, {
|
|
3626
4152
|
type: "replay_completed";
|
|
3627
4153
|
coin: string;
|
|
3628
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4154
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3629
4155
|
snapshots_sent: number;
|
|
3630
4156
|
}, {
|
|
3631
4157
|
type: "replay_completed";
|
|
3632
4158
|
coin: string;
|
|
3633
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4159
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3634
4160
|
snapshots_sent: number;
|
|
3635
4161
|
}>;
|
|
3636
4162
|
declare const WsReplayStoppedSchema: z.ZodObject<{
|
|
@@ -3642,7 +4168,7 @@ declare const WsReplayStoppedSchema: z.ZodObject<{
|
|
|
3642
4168
|
}>;
|
|
3643
4169
|
declare const WsHistoricalDataSchema: z.ZodObject<{
|
|
3644
4170
|
type: z.ZodLiteral<"historical_data">;
|
|
3645
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4171
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3646
4172
|
coin: z.ZodString;
|
|
3647
4173
|
timestamp: z.ZodNumber;
|
|
3648
4174
|
data: z.ZodUnknown;
|
|
@@ -3650,18 +4176,18 @@ declare const WsHistoricalDataSchema: z.ZodObject<{
|
|
|
3650
4176
|
type: "historical_data";
|
|
3651
4177
|
coin: string;
|
|
3652
4178
|
timestamp: number;
|
|
3653
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4179
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3654
4180
|
data?: unknown;
|
|
3655
4181
|
}, {
|
|
3656
4182
|
type: "historical_data";
|
|
3657
4183
|
coin: string;
|
|
3658
4184
|
timestamp: number;
|
|
3659
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4185
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3660
4186
|
data?: unknown;
|
|
3661
4187
|
}>;
|
|
3662
4188
|
declare const WsReplaySnapshotSchema: z.ZodObject<{
|
|
3663
4189
|
type: z.ZodLiteral<"replay_snapshot">;
|
|
3664
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4190
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3665
4191
|
coin: z.ZodString;
|
|
3666
4192
|
timestamp: z.ZodNumber;
|
|
3667
4193
|
data: z.ZodUnknown;
|
|
@@ -3669,31 +4195,31 @@ declare const WsReplaySnapshotSchema: z.ZodObject<{
|
|
|
3669
4195
|
type: "replay_snapshot";
|
|
3670
4196
|
coin: string;
|
|
3671
4197
|
timestamp: number;
|
|
3672
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4198
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3673
4199
|
data?: unknown;
|
|
3674
4200
|
}, {
|
|
3675
4201
|
type: "replay_snapshot";
|
|
3676
4202
|
coin: string;
|
|
3677
4203
|
timestamp: number;
|
|
3678
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4204
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3679
4205
|
data?: unknown;
|
|
3680
4206
|
}>;
|
|
3681
4207
|
declare const WsStreamStartedSchema: z.ZodObject<{
|
|
3682
4208
|
type: z.ZodLiteral<"stream_started">;
|
|
3683
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4209
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3684
4210
|
coin: z.ZodString;
|
|
3685
4211
|
start: z.ZodNumber;
|
|
3686
4212
|
end: z.ZodNumber;
|
|
3687
4213
|
}, "strip", z.ZodTypeAny, {
|
|
3688
4214
|
type: "stream_started";
|
|
3689
4215
|
coin: string;
|
|
3690
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4216
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3691
4217
|
start: number;
|
|
3692
4218
|
end: number;
|
|
3693
4219
|
}, {
|
|
3694
4220
|
type: "stream_started";
|
|
3695
4221
|
coin: string;
|
|
3696
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4222
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3697
4223
|
start: number;
|
|
3698
4224
|
end: number;
|
|
3699
4225
|
}>;
|
|
@@ -3719,7 +4245,7 @@ declare const TimestampedRecordSchema: z.ZodObject<{
|
|
|
3719
4245
|
}>;
|
|
3720
4246
|
declare const WsHistoricalBatchSchema: z.ZodObject<{
|
|
3721
4247
|
type: z.ZodLiteral<"historical_batch">;
|
|
3722
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4248
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3723
4249
|
coin: z.ZodString;
|
|
3724
4250
|
data: z.ZodArray<z.ZodObject<{
|
|
3725
4251
|
timestamp: z.ZodNumber;
|
|
@@ -3738,7 +4264,7 @@ declare const WsHistoricalBatchSchema: z.ZodObject<{
|
|
|
3738
4264
|
}[];
|
|
3739
4265
|
type: "historical_batch";
|
|
3740
4266
|
coin: string;
|
|
3741
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4267
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3742
4268
|
}, {
|
|
3743
4269
|
data: {
|
|
3744
4270
|
timestamp: number;
|
|
@@ -3746,22 +4272,22 @@ declare const WsHistoricalBatchSchema: z.ZodObject<{
|
|
|
3746
4272
|
}[];
|
|
3747
4273
|
type: "historical_batch";
|
|
3748
4274
|
coin: string;
|
|
3749
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4275
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3750
4276
|
}>;
|
|
3751
4277
|
declare const WsStreamCompletedSchema: z.ZodObject<{
|
|
3752
4278
|
type: z.ZodLiteral<"stream_completed">;
|
|
3753
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4279
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3754
4280
|
coin: z.ZodString;
|
|
3755
4281
|
snapshots_sent: z.ZodNumber;
|
|
3756
4282
|
}, "strip", z.ZodTypeAny, {
|
|
3757
4283
|
type: "stream_completed";
|
|
3758
4284
|
coin: string;
|
|
3759
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4285
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3760
4286
|
snapshots_sent: number;
|
|
3761
4287
|
}, {
|
|
3762
4288
|
type: "stream_completed";
|
|
3763
4289
|
coin: string;
|
|
3764
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4290
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3765
4291
|
snapshots_sent: number;
|
|
3766
4292
|
}>;
|
|
3767
4293
|
declare const WsStreamStoppedSchema: z.ZodObject<{
|
|
@@ -3774,29 +4300,56 @@ declare const WsStreamStoppedSchema: z.ZodObject<{
|
|
|
3774
4300
|
type: "stream_stopped";
|
|
3775
4301
|
snapshots_sent: number;
|
|
3776
4302
|
}>;
|
|
4303
|
+
/**
|
|
4304
|
+
* HIP-4 outcome settlement event. Fired once per `(outcome_id, side)` when the
|
|
4305
|
+
* outcome flips to settled. After delivery the server unsubscribes the client
|
|
4306
|
+
* from every hip4_* subscription on this coin — treat as a terminal signal.
|
|
4307
|
+
*/
|
|
4308
|
+
declare const WsOutcomeSettledSchema: z.ZodObject<{
|
|
4309
|
+
type: z.ZodLiteral<"outcome_settled">;
|
|
4310
|
+
coin: z.ZodString;
|
|
4311
|
+
outcome_id: z.ZodNumber;
|
|
4312
|
+
side: z.ZodNumber;
|
|
4313
|
+
settlement_value: z.ZodOptional<z.ZodNumber>;
|
|
4314
|
+
settlement_at: z.ZodOptional<z.ZodString>;
|
|
4315
|
+
}, "strip", z.ZodTypeAny, {
|
|
4316
|
+
type: "outcome_settled";
|
|
4317
|
+
coin: string;
|
|
4318
|
+
side: number;
|
|
4319
|
+
outcome_id: number;
|
|
4320
|
+
settlement_value?: number | undefined;
|
|
4321
|
+
settlement_at?: string | undefined;
|
|
4322
|
+
}, {
|
|
4323
|
+
type: "outcome_settled";
|
|
4324
|
+
coin: string;
|
|
4325
|
+
side: number;
|
|
4326
|
+
outcome_id: number;
|
|
4327
|
+
settlement_value?: number | undefined;
|
|
4328
|
+
settlement_at?: string | undefined;
|
|
4329
|
+
}>;
|
|
3777
4330
|
declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3778
4331
|
type: z.ZodLiteral<"subscribed">;
|
|
3779
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4332
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3780
4333
|
coin: z.ZodOptional<z.ZodString>;
|
|
3781
4334
|
}, "strip", z.ZodTypeAny, {
|
|
3782
4335
|
type: "subscribed";
|
|
3783
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4336
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3784
4337
|
coin?: string | undefined;
|
|
3785
4338
|
}, {
|
|
3786
4339
|
type: "subscribed";
|
|
3787
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4340
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3788
4341
|
coin?: string | undefined;
|
|
3789
4342
|
}>, z.ZodObject<{
|
|
3790
4343
|
type: z.ZodLiteral<"unsubscribed">;
|
|
3791
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4344
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3792
4345
|
coin: z.ZodOptional<z.ZodString>;
|
|
3793
4346
|
}, "strip", z.ZodTypeAny, {
|
|
3794
4347
|
type: "unsubscribed";
|
|
3795
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4348
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3796
4349
|
coin?: string | undefined;
|
|
3797
4350
|
}, {
|
|
3798
4351
|
type: "unsubscribed";
|
|
3799
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4352
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3800
4353
|
coin?: string | undefined;
|
|
3801
4354
|
}>, z.ZodObject<{
|
|
3802
4355
|
type: z.ZodLiteral<"pong">;
|
|
@@ -3815,22 +4368,22 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3815
4368
|
type: "error";
|
|
3816
4369
|
}>, z.ZodObject<{
|
|
3817
4370
|
type: z.ZodLiteral<"data">;
|
|
3818
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4371
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3819
4372
|
coin: z.ZodString;
|
|
3820
4373
|
data: z.ZodUnknown;
|
|
3821
4374
|
}, "strip", z.ZodTypeAny, {
|
|
3822
4375
|
type: "data";
|
|
3823
4376
|
coin: string;
|
|
3824
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4377
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3825
4378
|
data?: unknown;
|
|
3826
4379
|
}, {
|
|
3827
4380
|
type: "data";
|
|
3828
4381
|
coin: string;
|
|
3829
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4382
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3830
4383
|
data?: unknown;
|
|
3831
4384
|
}>, z.ZodObject<{
|
|
3832
4385
|
type: z.ZodLiteral<"replay_started">;
|
|
3833
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4386
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3834
4387
|
coin: z.ZodString;
|
|
3835
4388
|
start: z.ZodNumber;
|
|
3836
4389
|
end: z.ZodNumber;
|
|
@@ -3838,14 +4391,14 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3838
4391
|
}, "strip", z.ZodTypeAny, {
|
|
3839
4392
|
type: "replay_started";
|
|
3840
4393
|
coin: string;
|
|
3841
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4394
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3842
4395
|
start: number;
|
|
3843
4396
|
end: number;
|
|
3844
4397
|
speed: number;
|
|
3845
4398
|
}, {
|
|
3846
4399
|
type: "replay_started";
|
|
3847
4400
|
coin: string;
|
|
3848
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4401
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3849
4402
|
start: number;
|
|
3850
4403
|
end: number;
|
|
3851
4404
|
speed: number;
|
|
@@ -3869,18 +4422,18 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3869
4422
|
current_timestamp: number;
|
|
3870
4423
|
}>, z.ZodObject<{
|
|
3871
4424
|
type: z.ZodLiteral<"replay_completed">;
|
|
3872
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4425
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3873
4426
|
coin: z.ZodString;
|
|
3874
4427
|
snapshots_sent: z.ZodNumber;
|
|
3875
4428
|
}, "strip", z.ZodTypeAny, {
|
|
3876
4429
|
type: "replay_completed";
|
|
3877
4430
|
coin: string;
|
|
3878
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4431
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3879
4432
|
snapshots_sent: number;
|
|
3880
4433
|
}, {
|
|
3881
4434
|
type: "replay_completed";
|
|
3882
4435
|
coin: string;
|
|
3883
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4436
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3884
4437
|
snapshots_sent: number;
|
|
3885
4438
|
}>, z.ZodObject<{
|
|
3886
4439
|
type: z.ZodLiteral<"replay_stopped">;
|
|
@@ -3890,7 +4443,7 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3890
4443
|
type: "replay_stopped";
|
|
3891
4444
|
}>, z.ZodObject<{
|
|
3892
4445
|
type: z.ZodLiteral<"replay_snapshot">;
|
|
3893
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4446
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3894
4447
|
coin: z.ZodString;
|
|
3895
4448
|
timestamp: z.ZodNumber;
|
|
3896
4449
|
data: z.ZodUnknown;
|
|
@@ -3898,17 +4451,17 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3898
4451
|
type: "replay_snapshot";
|
|
3899
4452
|
coin: string;
|
|
3900
4453
|
timestamp: number;
|
|
3901
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4454
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3902
4455
|
data?: unknown;
|
|
3903
4456
|
}, {
|
|
3904
4457
|
type: "replay_snapshot";
|
|
3905
4458
|
coin: string;
|
|
3906
4459
|
timestamp: number;
|
|
3907
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4460
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3908
4461
|
data?: unknown;
|
|
3909
4462
|
}>, z.ZodObject<{
|
|
3910
4463
|
type: z.ZodLiteral<"historical_data">;
|
|
3911
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4464
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3912
4465
|
coin: z.ZodString;
|
|
3913
4466
|
timestamp: z.ZodNumber;
|
|
3914
4467
|
data: z.ZodUnknown;
|
|
@@ -3916,30 +4469,30 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3916
4469
|
type: "historical_data";
|
|
3917
4470
|
coin: string;
|
|
3918
4471
|
timestamp: number;
|
|
3919
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4472
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3920
4473
|
data?: unknown;
|
|
3921
4474
|
}, {
|
|
3922
4475
|
type: "historical_data";
|
|
3923
4476
|
coin: string;
|
|
3924
4477
|
timestamp: number;
|
|
3925
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4478
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3926
4479
|
data?: unknown;
|
|
3927
4480
|
}>, z.ZodObject<{
|
|
3928
4481
|
type: z.ZodLiteral<"stream_started">;
|
|
3929
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4482
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3930
4483
|
coin: z.ZodString;
|
|
3931
4484
|
start: z.ZodNumber;
|
|
3932
4485
|
end: z.ZodNumber;
|
|
3933
4486
|
}, "strip", z.ZodTypeAny, {
|
|
3934
4487
|
type: "stream_started";
|
|
3935
4488
|
coin: string;
|
|
3936
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4489
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3937
4490
|
start: number;
|
|
3938
4491
|
end: number;
|
|
3939
4492
|
}, {
|
|
3940
4493
|
type: "stream_started";
|
|
3941
4494
|
coin: string;
|
|
3942
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4495
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3943
4496
|
start: number;
|
|
3944
4497
|
end: number;
|
|
3945
4498
|
}>, z.ZodObject<{
|
|
@@ -3953,7 +4506,7 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3953
4506
|
snapshots_sent: number;
|
|
3954
4507
|
}>, z.ZodObject<{
|
|
3955
4508
|
type: z.ZodLiteral<"historical_batch">;
|
|
3956
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4509
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3957
4510
|
coin: z.ZodString;
|
|
3958
4511
|
data: z.ZodArray<z.ZodObject<{
|
|
3959
4512
|
timestamp: z.ZodNumber;
|
|
@@ -3972,7 +4525,7 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3972
4525
|
}[];
|
|
3973
4526
|
type: "historical_batch";
|
|
3974
4527
|
coin: string;
|
|
3975
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4528
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3976
4529
|
}, {
|
|
3977
4530
|
data: {
|
|
3978
4531
|
timestamp: number;
|
|
@@ -3980,21 +4533,21 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3980
4533
|
}[];
|
|
3981
4534
|
type: "historical_batch";
|
|
3982
4535
|
coin: string;
|
|
3983
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4536
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3984
4537
|
}>, z.ZodObject<{
|
|
3985
4538
|
type: z.ZodLiteral<"stream_completed">;
|
|
3986
|
-
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding"]>;
|
|
4539
|
+
channel: z.ZodEnum<["orderbook", "trades", "candles", "liquidations", "ticker", "all_tickers", "open_interest", "funding", "lighter_orderbook", "lighter_trades", "lighter_candles", "lighter_open_interest", "lighter_funding", "lighter_l3_orderbook", "hip3_orderbook", "hip3_trades", "hip3_candles", "hip3_open_interest", "hip3_funding", "hip3_liquidations", "hip4_orderbook", "hip4_trades", "hip4_open_interest", "l4_diffs", "l4_orders", "hip3_l4_diffs", "hip3_l4_orders", "hip4_l4_diffs", "hip4_l4_orders"]>;
|
|
3987
4540
|
coin: z.ZodString;
|
|
3988
4541
|
snapshots_sent: z.ZodNumber;
|
|
3989
4542
|
}, "strip", z.ZodTypeAny, {
|
|
3990
4543
|
type: "stream_completed";
|
|
3991
4544
|
coin: string;
|
|
3992
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4545
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3993
4546
|
snapshots_sent: number;
|
|
3994
4547
|
}, {
|
|
3995
4548
|
type: "stream_completed";
|
|
3996
4549
|
coin: string;
|
|
3997
|
-
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding";
|
|
4550
|
+
channel: "orderbook" | "trades" | "candles" | "liquidations" | "ticker" | "all_tickers" | "open_interest" | "funding" | "lighter_orderbook" | "lighter_trades" | "lighter_candles" | "lighter_open_interest" | "lighter_funding" | "lighter_l3_orderbook" | "hip3_orderbook" | "hip3_trades" | "hip3_candles" | "hip3_open_interest" | "hip3_funding" | "hip3_liquidations" | "hip4_orderbook" | "hip4_trades" | "hip4_open_interest" | "l4_diffs" | "l4_orders" | "hip3_l4_diffs" | "hip3_l4_orders" | "hip4_l4_diffs" | "hip4_l4_orders";
|
|
3998
4551
|
snapshots_sent: number;
|
|
3999
4552
|
}>, z.ZodObject<{
|
|
4000
4553
|
type: z.ZodLiteral<"stream_stopped">;
|
|
@@ -4005,6 +4558,27 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
4005
4558
|
}, {
|
|
4006
4559
|
type: "stream_stopped";
|
|
4007
4560
|
snapshots_sent: number;
|
|
4561
|
+
}>, z.ZodObject<{
|
|
4562
|
+
type: z.ZodLiteral<"outcome_settled">;
|
|
4563
|
+
coin: z.ZodString;
|
|
4564
|
+
outcome_id: z.ZodNumber;
|
|
4565
|
+
side: z.ZodNumber;
|
|
4566
|
+
settlement_value: z.ZodOptional<z.ZodNumber>;
|
|
4567
|
+
settlement_at: z.ZodOptional<z.ZodString>;
|
|
4568
|
+
}, "strip", z.ZodTypeAny, {
|
|
4569
|
+
type: "outcome_settled";
|
|
4570
|
+
coin: string;
|
|
4571
|
+
side: number;
|
|
4572
|
+
outcome_id: number;
|
|
4573
|
+
settlement_value?: number | undefined;
|
|
4574
|
+
settlement_at?: string | undefined;
|
|
4575
|
+
}, {
|
|
4576
|
+
type: "outcome_settled";
|
|
4577
|
+
coin: string;
|
|
4578
|
+
side: number;
|
|
4579
|
+
outcome_id: number;
|
|
4580
|
+
settlement_value?: number | undefined;
|
|
4581
|
+
settlement_at?: string | undefined;
|
|
4008
4582
|
}>]>;
|
|
4009
4583
|
declare const OrderBookResponseSchema: z.ZodObject<{
|
|
4010
4584
|
success: z.ZodBoolean;
|
|
@@ -4284,6 +4858,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
|
|
|
4284
4858
|
userAddress: z.ZodOptional<z.ZodString>;
|
|
4285
4859
|
makerAddress: z.ZodOptional<z.ZodString>;
|
|
4286
4860
|
takerAddress: z.ZodOptional<z.ZodString>;
|
|
4861
|
+
builderAddress: z.ZodOptional<z.ZodString>;
|
|
4862
|
+
builderFee: z.ZodOptional<z.ZodString>;
|
|
4863
|
+
deployerFee: z.ZodOptional<z.ZodString>;
|
|
4864
|
+
priorityGas: z.ZodOptional<z.ZodNumber>;
|
|
4865
|
+
cloid: z.ZodOptional<z.ZodString>;
|
|
4866
|
+
twapId: z.ZodOptional<z.ZodNumber>;
|
|
4287
4867
|
}, "strip", z.ZodTypeAny, {
|
|
4288
4868
|
coin: string;
|
|
4289
4869
|
timestamp: string;
|
|
@@ -4302,6 +4882,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
|
|
|
4302
4882
|
userAddress?: string | undefined;
|
|
4303
4883
|
makerAddress?: string | undefined;
|
|
4304
4884
|
takerAddress?: string | undefined;
|
|
4885
|
+
builderAddress?: string | undefined;
|
|
4886
|
+
builderFee?: string | undefined;
|
|
4887
|
+
deployerFee?: string | undefined;
|
|
4888
|
+
priorityGas?: number | undefined;
|
|
4889
|
+
cloid?: string | undefined;
|
|
4890
|
+
twapId?: number | undefined;
|
|
4305
4891
|
}, {
|
|
4306
4892
|
coin: string;
|
|
4307
4893
|
timestamp: string;
|
|
@@ -4320,6 +4906,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
|
|
|
4320
4906
|
userAddress?: string | undefined;
|
|
4321
4907
|
makerAddress?: string | undefined;
|
|
4322
4908
|
takerAddress?: string | undefined;
|
|
4909
|
+
builderAddress?: string | undefined;
|
|
4910
|
+
builderFee?: string | undefined;
|
|
4911
|
+
deployerFee?: string | undefined;
|
|
4912
|
+
priorityGas?: number | undefined;
|
|
4913
|
+
cloid?: string | undefined;
|
|
4914
|
+
twapId?: number | undefined;
|
|
4323
4915
|
}>, "many">;
|
|
4324
4916
|
meta: z.ZodObject<{
|
|
4325
4917
|
count: z.ZodNumber;
|
|
@@ -4353,6 +4945,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
|
|
|
4353
4945
|
userAddress?: string | undefined;
|
|
4354
4946
|
makerAddress?: string | undefined;
|
|
4355
4947
|
takerAddress?: string | undefined;
|
|
4948
|
+
builderAddress?: string | undefined;
|
|
4949
|
+
builderFee?: string | undefined;
|
|
4950
|
+
deployerFee?: string | undefined;
|
|
4951
|
+
priorityGas?: number | undefined;
|
|
4952
|
+
cloid?: string | undefined;
|
|
4953
|
+
twapId?: number | undefined;
|
|
4356
4954
|
}[];
|
|
4357
4955
|
success: boolean;
|
|
4358
4956
|
meta: {
|
|
@@ -4379,6 +4977,12 @@ declare const TradeArrayResponseSchema: z.ZodObject<{
|
|
|
4379
4977
|
userAddress?: string | undefined;
|
|
4380
4978
|
makerAddress?: string | undefined;
|
|
4381
4979
|
takerAddress?: string | undefined;
|
|
4980
|
+
builderAddress?: string | undefined;
|
|
4981
|
+
builderFee?: string | undefined;
|
|
4982
|
+
deployerFee?: string | undefined;
|
|
4983
|
+
priorityGas?: number | undefined;
|
|
4984
|
+
cloid?: string | undefined;
|
|
4985
|
+
twapId?: number | undefined;
|
|
4382
4986
|
}[];
|
|
4383
4987
|
success: boolean;
|
|
4384
4988
|
meta: {
|
|
@@ -5616,4 +6220,4 @@ type ValidatedCandle = z.infer<typeof CandleSchema>;
|
|
|
5616
6220
|
type ValidatedLiquidation = z.infer<typeof LiquidationSchema>;
|
|
5617
6221
|
type ValidatedWsServerMessage = z.infer<typeof WsServerMessageSchema>;
|
|
5618
6222
|
|
|
5619
|
-
export { type ApiError, type ApiMeta, ApiMetaSchema, type ApiResponse, ApiResponseSchema, type Candle, CandleArrayResponseSchema, type CandleHistoryParams, type CandleInterval, CandleIntervalSchema, CandleSchema, type ClientOptions, type CoinFreshness, CoinFreshnessResponseSchema, CoinFreshnessSchema, type CoinSummary, CoinSummaryResponseSchema, CoinSummarySchema, type CompletenessMetrics, type CoverageGap, type CoverageResponse, type CursorResponse, type DataCadence, type DataFreshness, type DataTypeCoverage, type DataTypeFreshnessInfo, DataTypeFreshnessInfoSchema, type DataTypeStatus, type ExchangeCoverage, type ExchangeLatency, type ExchangeStatus, type FundingHistoryParams, type FundingRate, FundingRateArrayResponseSchema, FundingRateResponseSchema, FundingRateSchema, type GetOrderBookParams, type GetTradesCursorParams, Hip3Client, type Hip3Instrument, HyperliquidClient, type Incident, type IncidentSeverityValue, type IncidentStatusValue, type IncidentsResponse, type Instrument, InstrumentArrayResponseSchema, InstrumentResponseSchema, InstrumentSchema, type InstrumentType, InstrumentTypeSchema, type L2Level, type L2OrderBookParams, L2OrderBookResource, type L4Checkpoint, type L4Diff, type L4Order, L4OrderBookReconstructor, type LatencyResponse, LighterClient, type LighterGranularity, type LighterInstrument, type Liquidation, LiquidationArrayResponseSchema, type LiquidationHistoryParams, LiquidationSchema, LiquidationSideSchema, type LiquidationVolume, LiquidationVolumeArrayResponseSchema, type LiquidationVolumeParams, LiquidationVolumeSchema, type LiquidationsByUserParams, type ListIncidentsParams, type OiFundingInterval, type OpenInterest, OpenInterestArrayResponseSchema, type OpenInterestHistoryParams, OpenInterestResponseSchema, OpenInterestSchema, type OrderBook, OrderBookArrayResponseSchema, type OrderBookHistoryParams, OrderBookReconstructor, OrderBookResponseSchema, OrderBookSchema, type OrderbookDelta, OxArchive, OxArchiveError, OxArchiveWs, type Pagination, type PriceHistoryParams, type PriceLevel, PriceLevelSchema, type PriceSnapshot, PriceSnapshotArrayResponseSchema, PriceSnapshotSchema, type ReconstructOptions, type ReconstructedOrderBook, type RestApiLatency, type SiweChallenge, 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 Web3ApiKey, type Web3KeysList, type Web3PaymentRequired, type Web3RevokeResult, type Web3SignupResult, type Web3SubscribeResult, type WebSocketLatency, type WsChannel, WsChannelSchema, type WsClientMessage, type WsConnectionState, WsConnectionStateSchema, type WsData, WsDataSchema, type WsError, WsErrorSchema, type WsEventHandlers, type WsGapDetected, type WsHistoricalBatch, WsHistoricalBatchSchema, type WsHistoricalData, WsHistoricalDataSchema, type WsHistoricalTickData, type WsL4Batch, type WsL4Snapshot, 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 WsReplaySnapshot, WsReplaySnapshotSchema, 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 };
|
|
6223
|
+
export { type ApiError, type ApiMeta, ApiMetaSchema, type ApiResponse, ApiResponseSchema, type Candle, CandleArrayResponseSchema, type CandleHistoryParams, type CandleInterval, CandleIntervalSchema, CandleSchema, type ClientOptions, type CoinFreshness, CoinFreshnessResponseSchema, CoinFreshnessSchema, type CoinSummary, CoinSummaryResponseSchema, CoinSummarySchema, type CompletenessMetrics, type CoverageGap, type CoverageResponse, type CursorResponse, type DataCadence, type DataFreshness, type DataTypeCoverage, type DataTypeFreshnessInfo, DataTypeFreshnessInfoSchema, type DataTypeStatus, type ExchangeCoverage, type ExchangeLatency, type ExchangeStatus, type FundingHistoryParams, type FundingRate, FundingRateArrayResponseSchema, FundingRateResponseSchema, FundingRateSchema, type GetOrderBookParams, type GetTradesCursorParams, Hip3Client, type Hip3Instrument, type Hip4AggregatedOi, Hip4Client, type Hip4ListOutcomesParams, type Hip4Outcome, type Hip4OutcomeAggregate, type Hip4OutcomeSideSpec, HyperliquidClient, type Incident, type IncidentSeverityValue, type IncidentStatusValue, type IncidentsResponse, type Instrument, InstrumentArrayResponseSchema, InstrumentResponseSchema, InstrumentSchema, type InstrumentType, InstrumentTypeSchema, type L2Level, type L2OrderBookParams, L2OrderBookResource, type L4Checkpoint, type L4Diff, type L4Order, L4OrderBookReconstructor, type LatencyResponse, LighterClient, type LighterGranularity, type LighterInstrument, type Liquidation, LiquidationArrayResponseSchema, type LiquidationHistoryParams, LiquidationSchema, LiquidationSideSchema, type LiquidationVolume, LiquidationVolumeArrayResponseSchema, type LiquidationVolumeParams, LiquidationVolumeSchema, type LiquidationsByUserParams, type ListIncidentsParams, type OiFundingInterval, type OpenInterest, OpenInterestArrayResponseSchema, type OpenInterestHistoryParams, OpenInterestResponseSchema, OpenInterestSchema, type OrderBook, OrderBookArrayResponseSchema, type OrderBookHistoryParams, OrderBookReconstructor, OrderBookResponseSchema, OrderBookSchema, type OrderbookDelta, OxArchive, OxArchiveError, OxArchiveWs, type Pagination, type PriceHistoryParams, type PriceLevel, PriceLevelSchema, type PriceSnapshot, PriceSnapshotArrayResponseSchema, PriceSnapshotSchema, type ReconstructOptions, type ReconstructedOrderBook, type RestApiLatency, type SiweChallenge, 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 Web3ApiKey, type Web3KeysList, type Web3PaymentRequired, type Web3RevokeResult, type Web3SignupResult, type Web3SubscribeResult, type WebSocketLatency, type WsChannel, WsChannelSchema, type WsClientMessage, type WsConnectionState, WsConnectionStateSchema, type WsData, WsDataSchema, type WsError, WsErrorSchema, type WsEventHandlers, type WsGapDetected, type WsHistoricalBatch, WsHistoricalBatchSchema, type WsHistoricalData, WsHistoricalDataSchema, type WsHistoricalTickData, type WsL4Batch, type WsL4Snapshot, type WsOptions, type WsOutcomeSettled, WsOutcomeSettledSchema, type WsPing, type WsPong, WsPongSchema, type WsReplay, type WsReplayCompleted, WsReplayCompletedSchema, type WsReplayPause, type WsReplayPaused, WsReplayPausedSchema, type WsReplayResume, type WsReplayResumed, WsReplayResumedSchema, type WsReplaySeek, type WsReplaySnapshot, WsReplaySnapshotSchema, 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 };
|