@0xarchive/sdk 1.4.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 +758 -214
- package/dist/index.d.ts +758 -214
- package/dist/index.js +414 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +412 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -6
package/dist/index.d.ts
CHANGED
|
@@ -248,6 +248,168 @@ interface Hip3Instrument {
|
|
|
248
248
|
/** Timestamp of latest data point */
|
|
249
249
|
latestTimestamp?: string;
|
|
250
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
|
+
}
|
|
251
413
|
/**
|
|
252
414
|
* Funding rate record
|
|
253
415
|
*/
|
|
@@ -475,22 +637,35 @@ interface PriceHistoryParams extends CursorPaginationParams {
|
|
|
475
637
|
* WebSocket channel types.
|
|
476
638
|
*
|
|
477
639
|
* - ticker/all_tickers: real-time only
|
|
478
|
-
* - liquidations:
|
|
479
|
-
* - 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)
|
|
480
642
|
* - open_interest, funding, lighter_open_interest, lighter_funding,
|
|
481
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`.
|
|
482
651
|
*/
|
|
483
|
-
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';
|
|
484
653
|
/** Subscribe message from client */
|
|
485
654
|
interface WsSubscribe {
|
|
486
655
|
op: 'subscribe';
|
|
487
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. */
|
|
488
661
|
coin?: string;
|
|
489
662
|
}
|
|
490
663
|
/** Unsubscribe message from client */
|
|
491
664
|
interface WsUnsubscribe {
|
|
492
665
|
op: 'unsubscribe';
|
|
493
666
|
channel: WsChannel;
|
|
667
|
+
symbol?: string;
|
|
668
|
+
/** @deprecated Use `symbol`. */
|
|
494
669
|
coin?: string;
|
|
495
670
|
}
|
|
496
671
|
/** Ping message from client */
|
|
@@ -504,6 +679,8 @@ interface WsReplay {
|
|
|
504
679
|
channel?: WsChannel;
|
|
505
680
|
/** Multiple channels for multi-channel replay. Mutually exclusive with `channel`. */
|
|
506
681
|
channels?: WsChannel[];
|
|
682
|
+
symbol?: string;
|
|
683
|
+
/** @deprecated Use `symbol`. */
|
|
507
684
|
coin?: string;
|
|
508
685
|
/** Start timestamp (Unix ms) */
|
|
509
686
|
start: number;
|
|
@@ -537,6 +714,8 @@ interface WsStream {
|
|
|
537
714
|
channel?: WsChannel;
|
|
538
715
|
/** Multiple channels for multi-channel streaming. Mutually exclusive with `channel`. */
|
|
539
716
|
channels?: WsChannel[];
|
|
717
|
+
symbol?: string;
|
|
718
|
+
/** @deprecated Use `symbol`. */
|
|
540
719
|
coin?: string;
|
|
541
720
|
/** Start timestamp (Unix ms) */
|
|
542
721
|
start: number;
|
|
@@ -732,8 +911,29 @@ interface WsL4Batch {
|
|
|
732
911
|
coin: string;
|
|
733
912
|
data: any[];
|
|
734
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
|
+
}
|
|
735
935
|
/** Server message union type */
|
|
736
|
-
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;
|
|
737
937
|
/**
|
|
738
938
|
* WebSocket connection options.
|
|
739
939
|
*
|
|
@@ -910,7 +1110,7 @@ interface ExchangeCoverage {
|
|
|
910
1110
|
}
|
|
911
1111
|
/** Overall coverage response */
|
|
912
1112
|
interface CoverageResponse {
|
|
913
|
-
/** Coverage for
|
|
1113
|
+
/** Coverage for supported venue APIs */
|
|
914
1114
|
exchanges: ExchangeCoverage[];
|
|
915
1115
|
}
|
|
916
1116
|
/** Gap information for per-symbol coverage */
|
|
@@ -1173,6 +1373,138 @@ declare class HttpClient {
|
|
|
1173
1373
|
post<T>(path: string, body?: Record<string, unknown>, schema?: z.ZodType<T>): Promise<T>;
|
|
1174
1374
|
}
|
|
1175
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
|
+
|
|
1176
1508
|
/**
|
|
1177
1509
|
* Orderbook Reconstructor for tick-level delta data.
|
|
1178
1510
|
*
|
|
@@ -1587,14 +1919,18 @@ declare class TradesResource {
|
|
|
1587
1919
|
/**
|
|
1588
1920
|
* Get most recent trades for a symbol.
|
|
1589
1921
|
*
|
|
1590
|
-
* Note: This method is available
|
|
1591
|
-
*
|
|
1592
|
-
*
|
|
1593
|
-
*
|
|
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.
|
|
1594
1929
|
*
|
|
1595
1930
|
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
1596
1931
|
* @param limit - Number of trades to return (default: 100)
|
|
1597
1932
|
* @returns Array of recent trades
|
|
1933
|
+
* @throws {OxArchiveError} When called on the bare Hyperliquid namespace.
|
|
1598
1934
|
*/
|
|
1599
1935
|
recent(symbol: string, limit?: number): Promise<Trade[]>;
|
|
1600
1936
|
}
|
|
@@ -1698,6 +2034,66 @@ declare class Hip3InstrumentsResource {
|
|
|
1698
2034
|
*/
|
|
1699
2035
|
get(coin: string): Promise<Hip3Instrument>;
|
|
1700
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
|
+
}
|
|
1701
2097
|
|
|
1702
2098
|
/**
|
|
1703
2099
|
* Funding rates API resource
|
|
@@ -1930,7 +2326,7 @@ declare class LiquidationsResource {
|
|
|
1930
2326
|
* const status = await client.dataQuality.status();
|
|
1931
2327
|
* console.log(`System status: ${status.status}`);
|
|
1932
2328
|
*
|
|
1933
|
-
* // Get coverage
|
|
2329
|
+
* // Get coverage across venue APIs
|
|
1934
2330
|
* const coverage = await client.dataQuality.coverage();
|
|
1935
2331
|
*
|
|
1936
2332
|
* // Get symbol-specific coverage with gap detection
|
|
@@ -1948,7 +2344,7 @@ declare class DataQualityResource {
|
|
|
1948
2344
|
/**
|
|
1949
2345
|
* Get overall system health status
|
|
1950
2346
|
*
|
|
1951
|
-
* @returns StatusResponse with overall status, per-
|
|
2347
|
+
* @returns StatusResponse with overall status, per-scope status,
|
|
1952
2348
|
* per-data-type status, and active incident count
|
|
1953
2349
|
*
|
|
1954
2350
|
* @example
|
|
@@ -1962,9 +2358,9 @@ declare class DataQualityResource {
|
|
|
1962
2358
|
*/
|
|
1963
2359
|
status(): Promise<StatusResponse>;
|
|
1964
2360
|
/**
|
|
1965
|
-
* Get data coverage summary
|
|
2361
|
+
* Get data coverage summary across venue APIs
|
|
1966
2362
|
*
|
|
1967
|
-
* @returns CoverageResponse with coverage info for
|
|
2363
|
+
* @returns CoverageResponse with coverage info for supported venue APIs and data types
|
|
1968
2364
|
*
|
|
1969
2365
|
* @example
|
|
1970
2366
|
* ```typescript
|
|
@@ -1979,10 +2375,10 @@ declare class DataQualityResource {
|
|
|
1979
2375
|
*/
|
|
1980
2376
|
coverage(): Promise<CoverageResponse>;
|
|
1981
2377
|
/**
|
|
1982
|
-
* Get data coverage for a specific
|
|
2378
|
+
* Get data coverage for a specific venue scope
|
|
1983
2379
|
*
|
|
1984
|
-
* @param exchange -
|
|
1985
|
-
* @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
|
|
1986
2382
|
*
|
|
1987
2383
|
* @example
|
|
1988
2384
|
* ```typescript
|
|
@@ -1992,12 +2388,12 @@ declare class DataQualityResource {
|
|
|
1992
2388
|
*/
|
|
1993
2389
|
exchangeCoverage(exchange: string): Promise<ExchangeCoverage>;
|
|
1994
2390
|
/**
|
|
1995
|
-
* Get data coverage for a specific symbol on
|
|
2391
|
+
* Get data coverage for a specific symbol on a venue scope
|
|
1996
2392
|
*
|
|
1997
2393
|
* Includes gap detection, empirical data cadence, and hour-level historical coverage.
|
|
1998
2394
|
* Supports optional time bounds for gap detection (default: last 30 days).
|
|
1999
2395
|
*
|
|
2000
|
-
* @param exchange -
|
|
2396
|
+
* @param exchange - Venue scope ('hyperliquid', 'lighter', 'hip3', or 'hip4')
|
|
2001
2397
|
* @param symbol - Symbol name (e.g., 'BTC', 'ETH', or HIP3 coins like 'xyz:XYZ100')
|
|
2002
2398
|
* @param options - Optional time bounds for gap detection window
|
|
2003
2399
|
* @returns SymbolCoverageResponse with per-data-type coverage including gaps, cadence, and historical coverage
|
|
@@ -2057,7 +2453,7 @@ declare class DataQualityResource {
|
|
|
2057
2453
|
*/
|
|
2058
2454
|
getIncident(incidentId: string): Promise<Incident>;
|
|
2059
2455
|
/**
|
|
2060
|
-
* Get current latency metrics for
|
|
2456
|
+
* Get current latency metrics for supported venue APIs
|
|
2061
2457
|
*
|
|
2062
2458
|
* @returns LatencyResponse with WebSocket, REST API, and data freshness metrics
|
|
2063
2459
|
*
|
|
@@ -2168,138 +2564,6 @@ declare class Web3Resource {
|
|
|
2168
2564
|
subscribe(tier: 'build' | 'pro', paymentSignature: string): Promise<Web3SubscribeResult>;
|
|
2169
2565
|
}
|
|
2170
2566
|
|
|
2171
|
-
interface OrderHistoryParams extends CursorPaginationParams {
|
|
2172
|
-
user?: string;
|
|
2173
|
-
status?: string;
|
|
2174
|
-
order_type?: string;
|
|
2175
|
-
}
|
|
2176
|
-
interface OrderFlowParams {
|
|
2177
|
-
start: number | string;
|
|
2178
|
-
end: number | string;
|
|
2179
|
-
interval?: string;
|
|
2180
|
-
limit?: number;
|
|
2181
|
-
}
|
|
2182
|
-
interface TpslParams extends CursorPaginationParams {
|
|
2183
|
-
user?: string;
|
|
2184
|
-
triggered?: boolean;
|
|
2185
|
-
}
|
|
2186
|
-
/**
|
|
2187
|
-
* Orders API resource
|
|
2188
|
-
*
|
|
2189
|
-
* @example
|
|
2190
|
-
* ```typescript
|
|
2191
|
-
* // Get order history
|
|
2192
|
-
* const result = await client.hyperliquid.orders.history('BTC', {
|
|
2193
|
-
* start: Date.now() - 86400000,
|
|
2194
|
-
* end: Date.now(),
|
|
2195
|
-
* limit: 1000
|
|
2196
|
-
* });
|
|
2197
|
-
*
|
|
2198
|
-
* // Get order flow
|
|
2199
|
-
* const flow = await client.hyperliquid.orders.flow('BTC', {
|
|
2200
|
-
* start: Date.now() - 86400000,
|
|
2201
|
-
* end: Date.now(),
|
|
2202
|
-
* interval: '1h'
|
|
2203
|
-
* });
|
|
2204
|
-
*
|
|
2205
|
-
* // Get TP/SL orders
|
|
2206
|
-
* const tpsl = await client.hyperliquid.orders.tpsl('BTC', {
|
|
2207
|
-
* start: Date.now() - 86400000,
|
|
2208
|
-
* end: Date.now()
|
|
2209
|
-
* });
|
|
2210
|
-
* ```
|
|
2211
|
-
*/
|
|
2212
|
-
declare class OrdersResource {
|
|
2213
|
-
private http;
|
|
2214
|
-
private basePath;
|
|
2215
|
-
private coinTransform;
|
|
2216
|
-
constructor(http: HttpClient, basePath?: string, coinTransform?: (s: string) => string);
|
|
2217
|
-
/**
|
|
2218
|
-
* Get order history for a symbol with cursor-based pagination
|
|
2219
|
-
*
|
|
2220
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2221
|
-
* @param params - Time range, cursor pagination, and filter parameters
|
|
2222
|
-
* @returns CursorResponse with order records and nextCursor for pagination
|
|
2223
|
-
*/
|
|
2224
|
-
history(symbol: string, params: OrderHistoryParams): Promise<CursorResponse<any[]>>;
|
|
2225
|
-
/**
|
|
2226
|
-
* Get order flow for a symbol
|
|
2227
|
-
*
|
|
2228
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2229
|
-
* @param params - Time range and interval parameters
|
|
2230
|
-
* @returns CursorResponse with order flow records
|
|
2231
|
-
*/
|
|
2232
|
-
flow(symbol: string, params: OrderFlowParams): Promise<CursorResponse<any[]>>;
|
|
2233
|
-
/**
|
|
2234
|
-
* Get TP/SL orders for a symbol with cursor-based pagination
|
|
2235
|
-
*
|
|
2236
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2237
|
-
* @param params - Time range, cursor pagination, and filter parameters
|
|
2238
|
-
* @returns CursorResponse with TP/SL order records
|
|
2239
|
-
*/
|
|
2240
|
-
tpsl(symbol: string, params: TpslParams): Promise<CursorResponse<any[]>>;
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
interface L4OrderBookParams {
|
|
2244
|
-
timestamp?: number | string;
|
|
2245
|
-
depth?: number;
|
|
2246
|
-
}
|
|
2247
|
-
/**
|
|
2248
|
-
* L4 Order Book API resource
|
|
2249
|
-
*
|
|
2250
|
-
* Access L4 orderbook snapshots, diffs, and history.
|
|
2251
|
-
*
|
|
2252
|
-
* @example
|
|
2253
|
-
* ```typescript
|
|
2254
|
-
* // Get current L4 orderbook
|
|
2255
|
-
* const orderbook = await client.hyperliquid.l4Orderbook.get('BTC');
|
|
2256
|
-
*
|
|
2257
|
-
* // Get L4 orderbook diffs
|
|
2258
|
-
* const diffs = await client.hyperliquid.l4Orderbook.diffs('BTC', {
|
|
2259
|
-
* start: Date.now() - 86400000,
|
|
2260
|
-
* end: Date.now(),
|
|
2261
|
-
* limit: 1000
|
|
2262
|
-
* });
|
|
2263
|
-
*
|
|
2264
|
-
* // Get L4 orderbook history
|
|
2265
|
-
* const history = await client.hyperliquid.l4Orderbook.history('BTC', {
|
|
2266
|
-
* start: Date.now() - 86400000,
|
|
2267
|
-
* end: Date.now(),
|
|
2268
|
-
* limit: 1000
|
|
2269
|
-
* });
|
|
2270
|
-
* ```
|
|
2271
|
-
*/
|
|
2272
|
-
declare class L4OrderBookResource {
|
|
2273
|
-
private http;
|
|
2274
|
-
private basePath;
|
|
2275
|
-
private coinTransform;
|
|
2276
|
-
constructor(http: HttpClient, basePath?: string, coinTransform?: (s: string) => string);
|
|
2277
|
-
/**
|
|
2278
|
-
* Get L4 order book snapshot for a symbol
|
|
2279
|
-
*
|
|
2280
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2281
|
-
* @param params - Optional parameters (timestamp, depth)
|
|
2282
|
-
* @returns L4 order book snapshot
|
|
2283
|
-
*/
|
|
2284
|
-
get(symbol: string, params?: L4OrderBookParams): Promise<any>;
|
|
2285
|
-
/**
|
|
2286
|
-
* Get L4 order book diffs with cursor-based pagination
|
|
2287
|
-
*
|
|
2288
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2289
|
-
* @param params - Time range and cursor pagination parameters
|
|
2290
|
-
* @returns CursorResponse with L4 orderbook diffs and nextCursor for pagination
|
|
2291
|
-
*/
|
|
2292
|
-
diffs(symbol: string, params: CursorPaginationParams): Promise<CursorResponse<any[]>>;
|
|
2293
|
-
/**
|
|
2294
|
-
* Get L4 order book history with cursor-based pagination
|
|
2295
|
-
*
|
|
2296
|
-
* @param symbol - The symbol (e.g., 'BTC', 'ETH')
|
|
2297
|
-
* @param params - Time range and cursor pagination parameters
|
|
2298
|
-
* @returns CursorResponse with L4 orderbook snapshots and nextCursor for pagination
|
|
2299
|
-
*/
|
|
2300
|
-
history(symbol: string, params: CursorPaginationParams): Promise<CursorResponse<any[]>>;
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
2567
|
interface L2OrderBookParams {
|
|
2304
2568
|
timestamp?: number | string;
|
|
2305
2569
|
depth?: number;
|
|
@@ -2445,6 +2709,10 @@ declare class HyperliquidClient {
|
|
|
2445
2709
|
* HIP-3 builder-deployed perpetuals (February 2026+)
|
|
2446
2710
|
*/
|
|
2447
2711
|
readonly hip3: Hip3Client;
|
|
2712
|
+
/**
|
|
2713
|
+
* HIP-4 outcome markets (binary YES/NO; May 2026+)
|
|
2714
|
+
*/
|
|
2715
|
+
readonly hip4: Hip4Client;
|
|
2448
2716
|
private http;
|
|
2449
2717
|
constructor(http: HttpClient);
|
|
2450
2718
|
/**
|
|
@@ -2549,6 +2817,165 @@ declare class Hip3Client {
|
|
|
2549
2817
|
*/
|
|
2550
2818
|
priceHistory(symbol: string, params: PriceHistoryParams): Promise<CursorResponse<PriceSnapshot[]>>;
|
|
2551
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
|
+
}
|
|
2552
2979
|
/**
|
|
2553
2980
|
* Lighter.xyz exchange client
|
|
2554
2981
|
*
|
|
@@ -2621,8 +3048,9 @@ declare class LighterClient {
|
|
|
2621
3048
|
/**
|
|
2622
3049
|
* 0xarchive API client
|
|
2623
3050
|
*
|
|
2624
|
-
* Supports
|
|
3051
|
+
* Supports two top-level venue APIs:
|
|
2625
3052
|
* - `client.hyperliquid` - Hyperliquid perpetuals (April 2023+)
|
|
3053
|
+
* - `client.hyperliquid.hip3` - Hyperliquid HIP-3 builder perps under the Hyperliquid namespace
|
|
2626
3054
|
* - `client.lighter` - Lighter.xyz perpetuals
|
|
2627
3055
|
*
|
|
2628
3056
|
* @example
|
|
@@ -2638,6 +3066,9 @@ declare class LighterClient {
|
|
|
2638
3066
|
* // Lighter.xyz data
|
|
2639
3067
|
* const lighterOrderbook = await client.lighter.orderbook.get('BTC');
|
|
2640
3068
|
*
|
|
3069
|
+
* // Hyperliquid HIP-3 data
|
|
3070
|
+
* const hip3Orderbook = await client.hyperliquid.hip3.orderbook.get('km:US500');
|
|
3071
|
+
*
|
|
2641
3072
|
* // Get historical data
|
|
2642
3073
|
* const history = await client.hyperliquid.orderbook.history('ETH', {
|
|
2643
3074
|
* start: Date.now() - 86400000,
|
|
@@ -2773,7 +3204,9 @@ declare class OxArchiveWs {
|
|
|
2773
3204
|
private streamCompleteHandlers;
|
|
2774
3205
|
private orderbookHandlers;
|
|
2775
3206
|
private tradesHandlers;
|
|
3207
|
+
private liquidationsHandlers;
|
|
2776
3208
|
private gapHandlers;
|
|
3209
|
+
private outcomeSettledHandlers;
|
|
2777
3210
|
constructor(options: WsOptions);
|
|
2778
3211
|
/**
|
|
2779
3212
|
* Connect to the WebSocket server
|
|
@@ -2830,6 +3263,35 @@ declare class OxArchiveWs {
|
|
|
2830
3263
|
* Unsubscribe from all tickers
|
|
2831
3264
|
*/
|
|
2832
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;
|
|
2833
3295
|
/**
|
|
2834
3296
|
* Start historical replay with timing preserved
|
|
2835
3297
|
*
|
|
@@ -3055,6 +3517,40 @@ declare class OxArchiveWs {
|
|
|
3055
3517
|
* Helper to handle typed trade data
|
|
3056
3518
|
*/
|
|
3057
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;
|
|
3058
3554
|
private send;
|
|
3059
3555
|
private setState;
|
|
3060
3556
|
private startPing;
|
|
@@ -3544,32 +4040,32 @@ declare const CandleSchema: z.ZodObject<{
|
|
|
3544
4040
|
quoteVolume?: number | undefined;
|
|
3545
4041
|
tradeCount?: number | undefined;
|
|
3546
4042
|
}>;
|
|
3547
|
-
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"]>;
|
|
3548
4044
|
declare const WsConnectionStateSchema: z.ZodEnum<["connecting", "connected", "disconnected", "reconnecting"]>;
|
|
3549
4045
|
declare const WsSubscribedSchema: z.ZodObject<{
|
|
3550
4046
|
type: z.ZodLiteral<"subscribed">;
|
|
3551
|
-
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"]>;
|
|
3552
4048
|
coin: z.ZodOptional<z.ZodString>;
|
|
3553
4049
|
}, "strip", z.ZodTypeAny, {
|
|
3554
4050
|
type: "subscribed";
|
|
3555
|
-
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";
|
|
3556
4052
|
coin?: string | undefined;
|
|
3557
4053
|
}, {
|
|
3558
4054
|
type: "subscribed";
|
|
3559
|
-
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";
|
|
3560
4056
|
coin?: string | undefined;
|
|
3561
4057
|
}>;
|
|
3562
4058
|
declare const WsUnsubscribedSchema: z.ZodObject<{
|
|
3563
4059
|
type: z.ZodLiteral<"unsubscribed">;
|
|
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"]>;
|
|
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"]>;
|
|
3565
4061
|
coin: z.ZodOptional<z.ZodString>;
|
|
3566
4062
|
}, "strip", z.ZodTypeAny, {
|
|
3567
4063
|
type: "unsubscribed";
|
|
3568
|
-
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";
|
|
3569
4065
|
coin?: string | undefined;
|
|
3570
4066
|
}, {
|
|
3571
4067
|
type: "unsubscribed";
|
|
3572
|
-
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";
|
|
3573
4069
|
coin?: string | undefined;
|
|
3574
4070
|
}>;
|
|
3575
4071
|
declare const WsPongSchema: z.ZodObject<{
|
|
@@ -3591,23 +4087,23 @@ declare const WsErrorSchema: z.ZodObject<{
|
|
|
3591
4087
|
}>;
|
|
3592
4088
|
declare const WsDataSchema: z.ZodObject<{
|
|
3593
4089
|
type: z.ZodLiteral<"data">;
|
|
3594
|
-
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"]>;
|
|
3595
4091
|
coin: z.ZodString;
|
|
3596
4092
|
data: z.ZodUnknown;
|
|
3597
4093
|
}, "strip", z.ZodTypeAny, {
|
|
3598
4094
|
type: "data";
|
|
3599
4095
|
coin: string;
|
|
3600
|
-
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";
|
|
3601
4097
|
data?: unknown;
|
|
3602
4098
|
}, {
|
|
3603
4099
|
type: "data";
|
|
3604
4100
|
coin: string;
|
|
3605
|
-
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";
|
|
3606
4102
|
data?: unknown;
|
|
3607
4103
|
}>;
|
|
3608
4104
|
declare const WsReplayStartedSchema: z.ZodObject<{
|
|
3609
4105
|
type: z.ZodLiteral<"replay_started">;
|
|
3610
|
-
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"]>;
|
|
3611
4107
|
coin: z.ZodString;
|
|
3612
4108
|
start: z.ZodNumber;
|
|
3613
4109
|
end: z.ZodNumber;
|
|
@@ -3615,14 +4111,14 @@ declare const WsReplayStartedSchema: z.ZodObject<{
|
|
|
3615
4111
|
}, "strip", z.ZodTypeAny, {
|
|
3616
4112
|
type: "replay_started";
|
|
3617
4113
|
coin: string;
|
|
3618
|
-
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";
|
|
3619
4115
|
start: number;
|
|
3620
4116
|
end: number;
|
|
3621
4117
|
speed: number;
|
|
3622
4118
|
}, {
|
|
3623
4119
|
type: "replay_started";
|
|
3624
4120
|
coin: string;
|
|
3625
|
-
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";
|
|
3626
4122
|
start: number;
|
|
3627
4123
|
end: number;
|
|
3628
4124
|
speed: number;
|
|
@@ -3649,18 +4145,18 @@ declare const WsReplayResumedSchema: z.ZodObject<{
|
|
|
3649
4145
|
}>;
|
|
3650
4146
|
declare const WsReplayCompletedSchema: z.ZodObject<{
|
|
3651
4147
|
type: z.ZodLiteral<"replay_completed">;
|
|
3652
|
-
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"]>;
|
|
3653
4149
|
coin: z.ZodString;
|
|
3654
4150
|
snapshots_sent: z.ZodNumber;
|
|
3655
4151
|
}, "strip", z.ZodTypeAny, {
|
|
3656
4152
|
type: "replay_completed";
|
|
3657
4153
|
coin: string;
|
|
3658
|
-
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";
|
|
3659
4155
|
snapshots_sent: number;
|
|
3660
4156
|
}, {
|
|
3661
4157
|
type: "replay_completed";
|
|
3662
4158
|
coin: string;
|
|
3663
|
-
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";
|
|
3664
4160
|
snapshots_sent: number;
|
|
3665
4161
|
}>;
|
|
3666
4162
|
declare const WsReplayStoppedSchema: z.ZodObject<{
|
|
@@ -3672,7 +4168,7 @@ declare const WsReplayStoppedSchema: z.ZodObject<{
|
|
|
3672
4168
|
}>;
|
|
3673
4169
|
declare const WsHistoricalDataSchema: z.ZodObject<{
|
|
3674
4170
|
type: z.ZodLiteral<"historical_data">;
|
|
3675
|
-
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"]>;
|
|
3676
4172
|
coin: z.ZodString;
|
|
3677
4173
|
timestamp: z.ZodNumber;
|
|
3678
4174
|
data: z.ZodUnknown;
|
|
@@ -3680,18 +4176,18 @@ declare const WsHistoricalDataSchema: z.ZodObject<{
|
|
|
3680
4176
|
type: "historical_data";
|
|
3681
4177
|
coin: string;
|
|
3682
4178
|
timestamp: number;
|
|
3683
|
-
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";
|
|
3684
4180
|
data?: unknown;
|
|
3685
4181
|
}, {
|
|
3686
4182
|
type: "historical_data";
|
|
3687
4183
|
coin: string;
|
|
3688
4184
|
timestamp: number;
|
|
3689
|
-
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";
|
|
3690
4186
|
data?: unknown;
|
|
3691
4187
|
}>;
|
|
3692
4188
|
declare const WsReplaySnapshotSchema: z.ZodObject<{
|
|
3693
4189
|
type: z.ZodLiteral<"replay_snapshot">;
|
|
3694
|
-
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"]>;
|
|
3695
4191
|
coin: z.ZodString;
|
|
3696
4192
|
timestamp: z.ZodNumber;
|
|
3697
4193
|
data: z.ZodUnknown;
|
|
@@ -3699,31 +4195,31 @@ declare const WsReplaySnapshotSchema: z.ZodObject<{
|
|
|
3699
4195
|
type: "replay_snapshot";
|
|
3700
4196
|
coin: string;
|
|
3701
4197
|
timestamp: number;
|
|
3702
|
-
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";
|
|
3703
4199
|
data?: unknown;
|
|
3704
4200
|
}, {
|
|
3705
4201
|
type: "replay_snapshot";
|
|
3706
4202
|
coin: string;
|
|
3707
4203
|
timestamp: number;
|
|
3708
|
-
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";
|
|
3709
4205
|
data?: unknown;
|
|
3710
4206
|
}>;
|
|
3711
4207
|
declare const WsStreamStartedSchema: z.ZodObject<{
|
|
3712
4208
|
type: z.ZodLiteral<"stream_started">;
|
|
3713
|
-
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"]>;
|
|
3714
4210
|
coin: z.ZodString;
|
|
3715
4211
|
start: z.ZodNumber;
|
|
3716
4212
|
end: z.ZodNumber;
|
|
3717
4213
|
}, "strip", z.ZodTypeAny, {
|
|
3718
4214
|
type: "stream_started";
|
|
3719
4215
|
coin: string;
|
|
3720
|
-
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";
|
|
3721
4217
|
start: number;
|
|
3722
4218
|
end: number;
|
|
3723
4219
|
}, {
|
|
3724
4220
|
type: "stream_started";
|
|
3725
4221
|
coin: string;
|
|
3726
|
-
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";
|
|
3727
4223
|
start: number;
|
|
3728
4224
|
end: number;
|
|
3729
4225
|
}>;
|
|
@@ -3749,7 +4245,7 @@ declare const TimestampedRecordSchema: z.ZodObject<{
|
|
|
3749
4245
|
}>;
|
|
3750
4246
|
declare const WsHistoricalBatchSchema: z.ZodObject<{
|
|
3751
4247
|
type: z.ZodLiteral<"historical_batch">;
|
|
3752
|
-
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"]>;
|
|
3753
4249
|
coin: z.ZodString;
|
|
3754
4250
|
data: z.ZodArray<z.ZodObject<{
|
|
3755
4251
|
timestamp: z.ZodNumber;
|
|
@@ -3768,7 +4264,7 @@ declare const WsHistoricalBatchSchema: z.ZodObject<{
|
|
|
3768
4264
|
}[];
|
|
3769
4265
|
type: "historical_batch";
|
|
3770
4266
|
coin: string;
|
|
3771
|
-
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";
|
|
3772
4268
|
}, {
|
|
3773
4269
|
data: {
|
|
3774
4270
|
timestamp: number;
|
|
@@ -3776,22 +4272,22 @@ declare const WsHistoricalBatchSchema: z.ZodObject<{
|
|
|
3776
4272
|
}[];
|
|
3777
4273
|
type: "historical_batch";
|
|
3778
4274
|
coin: string;
|
|
3779
|
-
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";
|
|
3780
4276
|
}>;
|
|
3781
4277
|
declare const WsStreamCompletedSchema: z.ZodObject<{
|
|
3782
4278
|
type: z.ZodLiteral<"stream_completed">;
|
|
3783
|
-
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"]>;
|
|
3784
4280
|
coin: z.ZodString;
|
|
3785
4281
|
snapshots_sent: z.ZodNumber;
|
|
3786
4282
|
}, "strip", z.ZodTypeAny, {
|
|
3787
4283
|
type: "stream_completed";
|
|
3788
4284
|
coin: string;
|
|
3789
|
-
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";
|
|
3790
4286
|
snapshots_sent: number;
|
|
3791
4287
|
}, {
|
|
3792
4288
|
type: "stream_completed";
|
|
3793
4289
|
coin: string;
|
|
3794
|
-
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";
|
|
3795
4291
|
snapshots_sent: number;
|
|
3796
4292
|
}>;
|
|
3797
4293
|
declare const WsStreamStoppedSchema: z.ZodObject<{
|
|
@@ -3804,29 +4300,56 @@ declare const WsStreamStoppedSchema: z.ZodObject<{
|
|
|
3804
4300
|
type: "stream_stopped";
|
|
3805
4301
|
snapshots_sent: number;
|
|
3806
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
|
+
}>;
|
|
3807
4330
|
declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3808
4331
|
type: z.ZodLiteral<"subscribed">;
|
|
3809
|
-
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"]>;
|
|
3810
4333
|
coin: z.ZodOptional<z.ZodString>;
|
|
3811
4334
|
}, "strip", z.ZodTypeAny, {
|
|
3812
4335
|
type: "subscribed";
|
|
3813
|
-
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";
|
|
3814
4337
|
coin?: string | undefined;
|
|
3815
4338
|
}, {
|
|
3816
4339
|
type: "subscribed";
|
|
3817
|
-
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";
|
|
3818
4341
|
coin?: string | undefined;
|
|
3819
4342
|
}>, z.ZodObject<{
|
|
3820
4343
|
type: z.ZodLiteral<"unsubscribed">;
|
|
3821
|
-
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"]>;
|
|
3822
4345
|
coin: z.ZodOptional<z.ZodString>;
|
|
3823
4346
|
}, "strip", z.ZodTypeAny, {
|
|
3824
4347
|
type: "unsubscribed";
|
|
3825
|
-
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";
|
|
3826
4349
|
coin?: string | undefined;
|
|
3827
4350
|
}, {
|
|
3828
4351
|
type: "unsubscribed";
|
|
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";
|
|
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";
|
|
3830
4353
|
coin?: string | undefined;
|
|
3831
4354
|
}>, z.ZodObject<{
|
|
3832
4355
|
type: z.ZodLiteral<"pong">;
|
|
@@ -3845,22 +4368,22 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3845
4368
|
type: "error";
|
|
3846
4369
|
}>, z.ZodObject<{
|
|
3847
4370
|
type: z.ZodLiteral<"data">;
|
|
3848
|
-
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"]>;
|
|
3849
4372
|
coin: z.ZodString;
|
|
3850
4373
|
data: z.ZodUnknown;
|
|
3851
4374
|
}, "strip", z.ZodTypeAny, {
|
|
3852
4375
|
type: "data";
|
|
3853
4376
|
coin: string;
|
|
3854
|
-
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";
|
|
3855
4378
|
data?: unknown;
|
|
3856
4379
|
}, {
|
|
3857
4380
|
type: "data";
|
|
3858
4381
|
coin: string;
|
|
3859
|
-
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";
|
|
3860
4383
|
data?: unknown;
|
|
3861
4384
|
}>, z.ZodObject<{
|
|
3862
4385
|
type: z.ZodLiteral<"replay_started">;
|
|
3863
|
-
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"]>;
|
|
3864
4387
|
coin: z.ZodString;
|
|
3865
4388
|
start: z.ZodNumber;
|
|
3866
4389
|
end: z.ZodNumber;
|
|
@@ -3868,14 +4391,14 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3868
4391
|
}, "strip", z.ZodTypeAny, {
|
|
3869
4392
|
type: "replay_started";
|
|
3870
4393
|
coin: string;
|
|
3871
|
-
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";
|
|
3872
4395
|
start: number;
|
|
3873
4396
|
end: number;
|
|
3874
4397
|
speed: number;
|
|
3875
4398
|
}, {
|
|
3876
4399
|
type: "replay_started";
|
|
3877
4400
|
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";
|
|
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";
|
|
3879
4402
|
start: number;
|
|
3880
4403
|
end: number;
|
|
3881
4404
|
speed: number;
|
|
@@ -3899,18 +4422,18 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3899
4422
|
current_timestamp: number;
|
|
3900
4423
|
}>, z.ZodObject<{
|
|
3901
4424
|
type: z.ZodLiteral<"replay_completed">;
|
|
3902
|
-
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"]>;
|
|
3903
4426
|
coin: z.ZodString;
|
|
3904
4427
|
snapshots_sent: z.ZodNumber;
|
|
3905
4428
|
}, "strip", z.ZodTypeAny, {
|
|
3906
4429
|
type: "replay_completed";
|
|
3907
4430
|
coin: string;
|
|
3908
|
-
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";
|
|
3909
4432
|
snapshots_sent: number;
|
|
3910
4433
|
}, {
|
|
3911
4434
|
type: "replay_completed";
|
|
3912
4435
|
coin: string;
|
|
3913
|
-
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";
|
|
3914
4437
|
snapshots_sent: number;
|
|
3915
4438
|
}>, z.ZodObject<{
|
|
3916
4439
|
type: z.ZodLiteral<"replay_stopped">;
|
|
@@ -3920,7 +4443,7 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3920
4443
|
type: "replay_stopped";
|
|
3921
4444
|
}>, z.ZodObject<{
|
|
3922
4445
|
type: z.ZodLiteral<"replay_snapshot">;
|
|
3923
|
-
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"]>;
|
|
3924
4447
|
coin: z.ZodString;
|
|
3925
4448
|
timestamp: z.ZodNumber;
|
|
3926
4449
|
data: z.ZodUnknown;
|
|
@@ -3928,17 +4451,17 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3928
4451
|
type: "replay_snapshot";
|
|
3929
4452
|
coin: string;
|
|
3930
4453
|
timestamp: number;
|
|
3931
|
-
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";
|
|
3932
4455
|
data?: unknown;
|
|
3933
4456
|
}, {
|
|
3934
4457
|
type: "replay_snapshot";
|
|
3935
4458
|
coin: string;
|
|
3936
4459
|
timestamp: number;
|
|
3937
|
-
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";
|
|
3938
4461
|
data?: unknown;
|
|
3939
4462
|
}>, z.ZodObject<{
|
|
3940
4463
|
type: z.ZodLiteral<"historical_data">;
|
|
3941
|
-
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"]>;
|
|
3942
4465
|
coin: z.ZodString;
|
|
3943
4466
|
timestamp: z.ZodNumber;
|
|
3944
4467
|
data: z.ZodUnknown;
|
|
@@ -3946,30 +4469,30 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3946
4469
|
type: "historical_data";
|
|
3947
4470
|
coin: string;
|
|
3948
4471
|
timestamp: number;
|
|
3949
|
-
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";
|
|
3950
4473
|
data?: unknown;
|
|
3951
4474
|
}, {
|
|
3952
4475
|
type: "historical_data";
|
|
3953
4476
|
coin: string;
|
|
3954
4477
|
timestamp: number;
|
|
3955
|
-
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";
|
|
3956
4479
|
data?: unknown;
|
|
3957
4480
|
}>, z.ZodObject<{
|
|
3958
4481
|
type: z.ZodLiteral<"stream_started">;
|
|
3959
|
-
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"]>;
|
|
3960
4483
|
coin: z.ZodString;
|
|
3961
4484
|
start: z.ZodNumber;
|
|
3962
4485
|
end: z.ZodNumber;
|
|
3963
4486
|
}, "strip", z.ZodTypeAny, {
|
|
3964
4487
|
type: "stream_started";
|
|
3965
4488
|
coin: string;
|
|
3966
|
-
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";
|
|
3967
4490
|
start: number;
|
|
3968
4491
|
end: number;
|
|
3969
4492
|
}, {
|
|
3970
4493
|
type: "stream_started";
|
|
3971
4494
|
coin: string;
|
|
3972
|
-
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";
|
|
3973
4496
|
start: number;
|
|
3974
4497
|
end: number;
|
|
3975
4498
|
}>, z.ZodObject<{
|
|
@@ -3983,7 +4506,7 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
3983
4506
|
snapshots_sent: number;
|
|
3984
4507
|
}>, z.ZodObject<{
|
|
3985
4508
|
type: z.ZodLiteral<"historical_batch">;
|
|
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"]>;
|
|
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"]>;
|
|
3987
4510
|
coin: z.ZodString;
|
|
3988
4511
|
data: z.ZodArray<z.ZodObject<{
|
|
3989
4512
|
timestamp: z.ZodNumber;
|
|
@@ -4002,7 +4525,7 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
4002
4525
|
}[];
|
|
4003
4526
|
type: "historical_batch";
|
|
4004
4527
|
coin: string;
|
|
4005
|
-
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";
|
|
4006
4529
|
}, {
|
|
4007
4530
|
data: {
|
|
4008
4531
|
timestamp: number;
|
|
@@ -4010,21 +4533,21 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
4010
4533
|
}[];
|
|
4011
4534
|
type: "historical_batch";
|
|
4012
4535
|
coin: string;
|
|
4013
|
-
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";
|
|
4014
4537
|
}>, z.ZodObject<{
|
|
4015
4538
|
type: z.ZodLiteral<"stream_completed">;
|
|
4016
|
-
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"]>;
|
|
4017
4540
|
coin: z.ZodString;
|
|
4018
4541
|
snapshots_sent: z.ZodNumber;
|
|
4019
4542
|
}, "strip", z.ZodTypeAny, {
|
|
4020
4543
|
type: "stream_completed";
|
|
4021
4544
|
coin: string;
|
|
4022
|
-
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";
|
|
4023
4546
|
snapshots_sent: number;
|
|
4024
4547
|
}, {
|
|
4025
4548
|
type: "stream_completed";
|
|
4026
4549
|
coin: string;
|
|
4027
|
-
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";
|
|
4028
4551
|
snapshots_sent: number;
|
|
4029
4552
|
}>, z.ZodObject<{
|
|
4030
4553
|
type: z.ZodLiteral<"stream_stopped">;
|
|
@@ -4035,6 +4558,27 @@ declare const WsServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
4035
4558
|
}, {
|
|
4036
4559
|
type: "stream_stopped";
|
|
4037
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;
|
|
4038
4582
|
}>]>;
|
|
4039
4583
|
declare const OrderBookResponseSchema: z.ZodObject<{
|
|
4040
4584
|
success: z.ZodBoolean;
|
|
@@ -5676,4 +6220,4 @@ type ValidatedCandle = z.infer<typeof CandleSchema>;
|
|
|
5676
6220
|
type ValidatedLiquidation = z.infer<typeof LiquidationSchema>;
|
|
5677
6221
|
type ValidatedWsServerMessage = z.infer<typeof WsServerMessageSchema>;
|
|
5678
6222
|
|
|
5679
|
-
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 };
|