@liberfi.io/ui-perpetuals 0.2.13 → 0.2.14
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/dist/index.d.mts +201 -18
- package/dist/index.d.ts +201 -18
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PropsWithChildren, ReactElement } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions } from '@tanstack/react-query';
|
|
@@ -12,7 +12,7 @@ declare global {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
declare const _default: "0.2.
|
|
15
|
+
declare const _default: "0.2.14";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Trading pair symbol format
|
|
@@ -129,6 +129,25 @@ interface OrderBook {
|
|
|
129
129
|
/** Timestamp (milliseconds) */
|
|
130
130
|
timestamp: number;
|
|
131
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Venue-agnostic order-book aggregation hint passed to
|
|
134
|
+
* {@link IPerpetualsClient.getOrderBook} and
|
|
135
|
+
* {@link IPerpetualsClient.subscribeMarketData}.
|
|
136
|
+
*
|
|
137
|
+
* Currently mirrors Hyperliquid's `l2Book` parameters because that is the
|
|
138
|
+
* only implementation with server-side aggregation today. Other venues may
|
|
139
|
+
* add new optional fields here.
|
|
140
|
+
*
|
|
141
|
+
* - `nSigFigs`: number of significant figures (2..5) to round prices to.
|
|
142
|
+
* Omitted means full native precision.
|
|
143
|
+
* - `mantissa`: only valid when `nSigFigs === 5`. Allowed values: 1, 2, 5.
|
|
144
|
+
*
|
|
145
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint
|
|
146
|
+
*/
|
|
147
|
+
interface OrderBookAggregationOptions {
|
|
148
|
+
nSigFigs?: 2 | 3 | 4 | 5;
|
|
149
|
+
mantissa?: 1 | 2 | 5;
|
|
150
|
+
}
|
|
132
151
|
/**
|
|
133
152
|
* Trade record
|
|
134
153
|
*/
|
|
@@ -439,10 +458,13 @@ interface IPerpetualsClient {
|
|
|
439
458
|
* Get order book
|
|
440
459
|
* @param symbol Trading pair symbol, e.g. "BTC-USDC"
|
|
441
460
|
* @param maxLevel Maximum depth levels, default 10
|
|
461
|
+
* @param options Optional venue-specific aggregation params (e.g.
|
|
462
|
+
* Hyperliquid `nSigFigs` / `mantissa`). Implementations that don't
|
|
463
|
+
* support server-side aggregation may safely ignore them.
|
|
442
464
|
* @returns Order book data
|
|
443
465
|
* @throws {Error} Network error or API error
|
|
444
466
|
*/
|
|
445
|
-
getOrderBook(symbol: string, maxLevel?: number): Promise<OrderBook>;
|
|
467
|
+
getOrderBook(symbol: string, maxLevel?: number, options?: OrderBookAggregationOptions): Promise<OrderBook>;
|
|
446
468
|
/**
|
|
447
469
|
* Get recent trades
|
|
448
470
|
* @param symbol Trading pair symbol, e.g. "BTC-USDC"
|
|
@@ -500,9 +522,14 @@ interface IPerpetualsClient {
|
|
|
500
522
|
* @param type Subscription type: 'ticker' (price), 'trades' (trades), 'orderBook' (order book)
|
|
501
523
|
* @param symbol Coin symbol
|
|
502
524
|
* @param callback Data callback function
|
|
525
|
+
* @param options Optional subscription options. For `orderBook`, provide
|
|
526
|
+
* `aggregation` so the server pre-aggregates levels into the desired
|
|
527
|
+
* price buckets. Implementations may ignore unknown options.
|
|
503
528
|
* @returns Subscription ID (for unsubscribing)
|
|
504
529
|
*/
|
|
505
|
-
subscribeMarketData(type: "ticker" | "trades" | "orderBook", symbol: string, callback: (data: any) => void
|
|
530
|
+
subscribeMarketData(type: "ticker" | "trades" | "orderBook", symbol: string, callback: (data: any) => void, options?: {
|
|
531
|
+
aggregation?: OrderBookAggregationOptions;
|
|
532
|
+
}): string;
|
|
506
533
|
/**
|
|
507
534
|
* Subscribe to kline data
|
|
508
535
|
* @param symbol Coin symbol
|
|
@@ -526,6 +553,26 @@ interface IPerpetualsClient {
|
|
|
526
553
|
unsubscribe(subscriptionId: string): void;
|
|
527
554
|
}
|
|
528
555
|
|
|
556
|
+
/**
|
|
557
|
+
* Hyperliquid `l2Book` aggregation parameters.
|
|
558
|
+
*
|
|
559
|
+
* Sending these on the `subscribe` payload causes Hyperliquid to pre-aggregate
|
|
560
|
+
* raw price levels into discrete buckets server-side, so a single 20-level
|
|
561
|
+
* snapshot covers a much wider price range than at native tick resolution.
|
|
562
|
+
*
|
|
563
|
+
* - `nSigFigs`: number of significant figures (2..5) to round prices to.
|
|
564
|
+
* `undefined` (or `null`) means full native precision.
|
|
565
|
+
* - `mantissa`: only valid when `nSigFigs === 5`. Allowed values: 1, 2, 5.
|
|
566
|
+
* At BTC ~$80k with `nSigFigs=5`, mantissa controls the smallest digit:
|
|
567
|
+
* 1 → step $1, 2 → step $2, 5 → step $5.
|
|
568
|
+
*
|
|
569
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint
|
|
570
|
+
*/
|
|
571
|
+
interface OrderBookAggregation {
|
|
572
|
+
nSigFigs?: 2 | 3 | 4 | 5;
|
|
573
|
+
mantissa?: 1 | 2 | 5;
|
|
574
|
+
}
|
|
575
|
+
|
|
529
576
|
/**
|
|
530
577
|
* Hyperliquid 环境类型
|
|
531
578
|
*/
|
|
@@ -630,13 +677,18 @@ declare class HyperliquidPerpetualsClient implements IPerpetualsClient {
|
|
|
630
677
|
*/
|
|
631
678
|
getKlines(symbol: string, interval: KlineInterval, limit?: number): Promise<Kline[]>;
|
|
632
679
|
/**
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
* @param
|
|
636
|
-
* @
|
|
680
|
+
* Get the order book.
|
|
681
|
+
*
|
|
682
|
+
* @param symbol Trading pair symbol (e.g. `BTC-USDC`)
|
|
683
|
+
* @param maxLevel Max number of levels to keep per side (post-slice)
|
|
684
|
+
* @param options Optional Hyperliquid `l2Book` aggregation params. When
|
|
685
|
+
* provided, Hyperliquid pre-aggregates raw levels into discrete buckets
|
|
686
|
+
* server-side, so a single 20-level snapshot covers a much wider price
|
|
687
|
+
* range than at native tick resolution. See {@link OrderBookAggregation}.
|
|
688
|
+
* @returns Order book data
|
|
637
689
|
* @throws {HyperliquidApiError} API 请求失败
|
|
638
690
|
*/
|
|
639
|
-
getOrderBook(symbol: string, maxLevel?: number): Promise<OrderBook>;
|
|
691
|
+
getOrderBook(symbol: string, maxLevel?: number, options?: OrderBookAggregation): Promise<OrderBook>;
|
|
640
692
|
/**
|
|
641
693
|
* 获取最近成交记录
|
|
642
694
|
* @param symbol 交易对符号
|
|
@@ -728,9 +780,15 @@ declare class HyperliquidPerpetualsClient implements IPerpetualsClient {
|
|
|
728
780
|
* @param type Subscription type: 'ticker' | 'trades' | 'orderBook'
|
|
729
781
|
* @param symbol Trading pair symbol (e.g., "BTC-USDC")
|
|
730
782
|
* @param callback Data callback function
|
|
783
|
+
* @param options Optional subscription options. For `orderBook`, provide
|
|
784
|
+
* `aggregation` (Hyperliquid `nSigFigs` / `mantissa`) so the server
|
|
785
|
+
* pre-aggregates levels into discrete price buckets — required to render
|
|
786
|
+
* wide-range books at coarse aggregation steps (e.g. $1000 buckets).
|
|
731
787
|
* @returns Subscription ID (for unsubscribing)
|
|
732
788
|
*/
|
|
733
|
-
subscribeMarketData(type: "ticker" | "trades" | "orderBook", symbol: string, callback: (data: any) => void
|
|
789
|
+
subscribeMarketData(type: "ticker" | "trades" | "orderBook", symbol: string, callback: (data: any) => void, options?: {
|
|
790
|
+
aggregation?: OrderBookAggregation;
|
|
791
|
+
}): string;
|
|
734
792
|
/**
|
|
735
793
|
* Subscribe to kline (candlestick) data
|
|
736
794
|
*
|
|
@@ -1094,7 +1152,10 @@ declare class LiberFiPerpetualsClient implements IPerpetualsClient {
|
|
|
1094
1152
|
getMarket(symbol: string): Promise<MarketData | null>;
|
|
1095
1153
|
getMarkets(symbols?: string[]): Promise<MarketData[]>;
|
|
1096
1154
|
getKlines(symbol: string, interval: KlineInterval, limit?: number): Promise<Kline[]>;
|
|
1097
|
-
getOrderBook(symbol: string, maxLevel?: number
|
|
1155
|
+
getOrderBook(symbol: string, maxLevel?: number, options?: {
|
|
1156
|
+
nSigFigs?: number;
|
|
1157
|
+
mantissa?: number;
|
|
1158
|
+
}): Promise<OrderBook>;
|
|
1098
1159
|
getRecentTrades(symbol: string, limit?: number): Promise<Trade[]>;
|
|
1099
1160
|
getPositions(params?: GetPositionsParams): Promise<GetPositionsResult>;
|
|
1100
1161
|
getOpenOrders(params?: GetOpenOrdersParams): Promise<GetOpenOrdersResult>;
|
|
@@ -1103,7 +1164,12 @@ declare class LiberFiPerpetualsClient implements IPerpetualsClient {
|
|
|
1103
1164
|
cancelOrder(params: CancelOrderParams): Promise<CancelOrderResult>;
|
|
1104
1165
|
connectWebSocket(): Promise<void>;
|
|
1105
1166
|
disconnectWebSocket(): void;
|
|
1106
|
-
subscribeMarketData(type: "ticker" | "trades" | "orderBook", symbol: string, callback: (data: unknown) => void
|
|
1167
|
+
subscribeMarketData(type: "ticker" | "trades" | "orderBook", symbol: string, callback: (data: unknown) => void, options?: {
|
|
1168
|
+
aggregation?: {
|
|
1169
|
+
nSigFigs?: 2 | 3 | 4 | 5;
|
|
1170
|
+
mantissa?: 1 | 2 | 5;
|
|
1171
|
+
};
|
|
1172
|
+
}): string;
|
|
1107
1173
|
subscribeCandles(symbol: string, interval: KlineInterval, callback: (candle: Kline) => void): string;
|
|
1108
1174
|
subscribeUserData(type: "orders" | "positions" | "fills", userAddress: string, callback: (data: unknown) => void): string;
|
|
1109
1175
|
unsubscribe(subscriptionId: string): void;
|
|
@@ -1491,9 +1557,15 @@ declare function useKlinesQuery(params: UseKlinesQueryParams, options?: Omit<Use
|
|
|
1491
1557
|
interface UseOrderBookQueryParams {
|
|
1492
1558
|
symbol: string;
|
|
1493
1559
|
maxLevel?: number;
|
|
1560
|
+
/**
|
|
1561
|
+
* Optional venue aggregation params (e.g. Hyperliquid `nSigFigs` /
|
|
1562
|
+
* `mantissa`). When set, the request key includes these so different
|
|
1563
|
+
* aggregations cache independently.
|
|
1564
|
+
*/
|
|
1565
|
+
aggregation?: OrderBookAggregationOptions;
|
|
1494
1566
|
}
|
|
1495
1567
|
declare function orderBookQueryKey(params: UseOrderBookQueryParams): string[];
|
|
1496
|
-
declare function fetchOrderBook(client: IPerpetualsClient, { symbol, maxLevel }: UseOrderBookQueryParams): Promise<OrderBook>;
|
|
1568
|
+
declare function fetchOrderBook(client: IPerpetualsClient, { symbol, maxLevel, aggregation }: UseOrderBookQueryParams): Promise<OrderBook>;
|
|
1497
1569
|
declare function useOrderBookQuery(params: UseOrderBookQueryParams, options?: Omit<UseQueryOptions<OrderBook, Error, OrderBook, string[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<OrderBook, Error>;
|
|
1498
1570
|
|
|
1499
1571
|
interface UseRecentTradesQueryParams {
|
|
@@ -1538,6 +1610,24 @@ interface UseMarketDataSubscriptionParams {
|
|
|
1538
1610
|
type: MarketDataType;
|
|
1539
1611
|
symbol: string;
|
|
1540
1612
|
enabled?: boolean;
|
|
1613
|
+
/**
|
|
1614
|
+
* Optional venue aggregation hint (only meaningful when
|
|
1615
|
+
* `type === "orderBook"`). Changing it tears down and re-creates the
|
|
1616
|
+
* subscription so the upstream stream is re-keyed with the new
|
|
1617
|
+
* `nSigFigs` / `mantissa`.
|
|
1618
|
+
*/
|
|
1619
|
+
aggregation?: OrderBookAggregationOptions;
|
|
1620
|
+
/**
|
|
1621
|
+
* If set, coalesce upstream pushes into a single React `setData` call no
|
|
1622
|
+
* more than once every `throttleMs` milliseconds. The latest payload
|
|
1623
|
+
* always wins; intermediate pushes are dropped. Use this for high-rate
|
|
1624
|
+
* streams (e.g. orderBook on active markets) where the human eye can't
|
|
1625
|
+
* tell the difference between 30 Hz and 10 Hz but React reconciliation
|
|
1626
|
+
* cost scales linearly.
|
|
1627
|
+
*
|
|
1628
|
+
* Leave undefined to forward every push immediately (default).
|
|
1629
|
+
*/
|
|
1630
|
+
throttleMs?: number;
|
|
1541
1631
|
}
|
|
1542
1632
|
interface UseMarketDataSubscriptionResult<T> {
|
|
1543
1633
|
data: T | null;
|
|
@@ -1914,13 +2004,35 @@ type UseSearchCoinsScriptResult = {
|
|
|
1914
2004
|
};
|
|
1915
2005
|
declare function useSearchCoinsScript({ onSelectCoin, }?: UseSearchCoinsScriptParams): UseSearchCoinsScriptResult;
|
|
1916
2006
|
|
|
2007
|
+
/**
|
|
2008
|
+
* Default tick-aggregation steps offered to the user via the spread dropdown.
|
|
2009
|
+
*
|
|
2010
|
+
* Mirrors Axiom / Hyperliquid's perpetuals UI for major USD-quoted pairs
|
|
2011
|
+
* (BTC, ETH, SOL): users can collapse the book into 1, 2, 5, 10, 100, or
|
|
2012
|
+
* 1000-USD buckets to see liquidity at coarser granularities.
|
|
2013
|
+
*/
|
|
2014
|
+
declare const DEFAULT_ORDER_BOOK_PRECISION_OPTIONS: readonly [1, 2, 5, 10, 100, 1000];
|
|
1917
2015
|
type OrderBookWidgetProps = {
|
|
1918
2016
|
symbol: string;
|
|
2017
|
+
/**
|
|
2018
|
+
* How many price levels to fetch + render per side. Defaults to `40` so
|
|
2019
|
+
* that asks and bids always have enough rows to overflow their containers
|
|
2020
|
+
* and show their independent scroll bars.
|
|
2021
|
+
*/
|
|
1919
2022
|
maxLevel?: number;
|
|
2023
|
+
/**
|
|
2024
|
+
* Steps shown in the "Spread" dropdown. Defaults to
|
|
2025
|
+
* `[1, 2, 5, 10, 100, 1000]` (Axiom's BTC perpetuals options).
|
|
2026
|
+
*/
|
|
2027
|
+
precisionOptions?: readonly number[];
|
|
2028
|
+
/**
|
|
2029
|
+
* Initial selected step. Defaults to the first entry in `precisionOptions`.
|
|
2030
|
+
*/
|
|
2031
|
+
defaultPrecision?: number;
|
|
1920
2032
|
onPriceClick?: (price: number) => void;
|
|
1921
2033
|
className?: string;
|
|
1922
2034
|
};
|
|
1923
|
-
declare function OrderBookWidget({ symbol, maxLevel, onPriceClick, className, }: OrderBookWidgetProps): react_jsx_runtime.JSX.Element;
|
|
2035
|
+
declare function OrderBookWidget({ symbol, maxLevel, precisionOptions, defaultPrecision, onPriceClick, className, }: OrderBookWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1924
2036
|
|
|
1925
2037
|
type PriceLevel = OrderBookLevel & {
|
|
1926
2038
|
total: number;
|
|
@@ -1929,12 +2041,48 @@ type PriceLevel = OrderBookLevel & {
|
|
|
1929
2041
|
type UseOrderBookScriptParams = {
|
|
1930
2042
|
symbol: string;
|
|
1931
2043
|
maxLevel?: number;
|
|
2044
|
+
/**
|
|
2045
|
+
* Initial price-bucket size. Defaults to `1` which matches major perpetual
|
|
2046
|
+
* pairs like BTC-USDC. Callers can change it dynamically via the returned
|
|
2047
|
+
* `setPrecision`.
|
|
2048
|
+
*/
|
|
1932
2049
|
precision?: number;
|
|
1933
2050
|
};
|
|
2051
|
+
/**
|
|
2052
|
+
* Map a desired bucket step (in quote currency, e.g. USD) to the closest
|
|
2053
|
+
* Hyperliquid `l2Book` aggregation params at the given reference price.
|
|
2054
|
+
*
|
|
2055
|
+
* Hyperliquid only emits 20 levels per side per snapshot. To make those 20
|
|
2056
|
+
* levels span a wide enough range (e.g. ±$20k for a $1000 step), we ask the
|
|
2057
|
+
* server to pre-aggregate via `nSigFigs` / `mantissa`. This function picks the
|
|
2058
|
+
* coarsest server step that is still ≤ the user's chosen step, so any
|
|
2059
|
+
* remaining mismatch is corrected by client-side `aggregateByPrecision`
|
|
2060
|
+
* (which is idempotent when the steps already match).
|
|
2061
|
+
*
|
|
2062
|
+
* Examples (BTC, price ≈ $80,740):
|
|
2063
|
+
* step $1 → { nSigFigs: 5 } (Hyperliquid step $1)
|
|
2064
|
+
* step $2 → { nSigFigs: 5, mantissa: 2 } (Hyperliquid step $2)
|
|
2065
|
+
* step $5 → { nSigFigs: 5, mantissa: 5 } (Hyperliquid step $5)
|
|
2066
|
+
* step $10 → { nSigFigs: 4 } (Hyperliquid step $10)
|
|
2067
|
+
* step $100 → { nSigFigs: 3 } (Hyperliquid step $100)
|
|
2068
|
+
* step $1000 → { nSigFigs: 2 } (Hyperliquid step $1000)
|
|
2069
|
+
*
|
|
2070
|
+
* Examples (ETH, price ≈ $4,000):
|
|
2071
|
+
* step $1 → { nSigFigs: 4 } (Hyperliquid step $1)
|
|
2072
|
+
* step $2 → { nSigFigs: 4 } + client agg (server $1, client → $2)
|
|
2073
|
+
* step $10 → { nSigFigs: 3 } (Hyperliquid step $10)
|
|
2074
|
+
*
|
|
2075
|
+
* @param price Reference price (mid / mark) used to compute the magnitude.
|
|
2076
|
+
* @param step Desired bucket size in the same quote currency as `price`.
|
|
2077
|
+
* @returns Aggregation hint, or empty object when inputs are invalid.
|
|
2078
|
+
*/
|
|
2079
|
+
declare function aggregationFromStep(price: number, step: number): OrderBookAggregationOptions;
|
|
1934
2080
|
type UseOrderBookScriptResult = {
|
|
1935
2081
|
bids: PriceLevel[];
|
|
1936
2082
|
asks: PriceLevel[];
|
|
2083
|
+
/** Raw `bestAsk - bestBid` after aggregation. */
|
|
1937
2084
|
spread: number;
|
|
2085
|
+
/** `spread / bestBid * 100`. */
|
|
1938
2086
|
spreadPercentage: number;
|
|
1939
2087
|
isLoading: boolean;
|
|
1940
2088
|
precision: number;
|
|
@@ -1945,11 +2093,46 @@ declare function useOrderBookScript({ symbol, maxLevel, precision: initialPrecis
|
|
|
1945
2093
|
type OrderBookUIProps = {
|
|
1946
2094
|
bids: PriceLevel[];
|
|
1947
2095
|
asks: PriceLevel[];
|
|
1948
|
-
|
|
2096
|
+
/** `(bestAsk - bestBid) / bestBid * 100`, rendered next to the precision dropdown. */
|
|
1949
2097
|
spreadPercentage: number;
|
|
2098
|
+
/** Currently selected aggregation step. */
|
|
2099
|
+
precision: number;
|
|
2100
|
+
/** Available steps shown in the dropdown. */
|
|
2101
|
+
precisionOptions: readonly number[];
|
|
2102
|
+
/** Notify parent when the user picks a new step. */
|
|
2103
|
+
onPrecisionChange: (precision: number) => void;
|
|
1950
2104
|
onPriceClick?: (price: number) => void;
|
|
1951
2105
|
};
|
|
1952
|
-
|
|
2106
|
+
/**
|
|
2107
|
+
* Order book layout (top to bottom):
|
|
2108
|
+
*
|
|
2109
|
+
* ┌─ Header (Price / Amount / Total) ────┐ fixed height
|
|
2110
|
+
* ├─ Asks scroll region ─────────────────┤ flex-1, independent scroll
|
|
2111
|
+
* │ highest ask │
|
|
2112
|
+
* │ ... │
|
|
2113
|
+
* │ best ask ◄── default visible │
|
|
2114
|
+
* ├─ Spread bar with precision dropdown ─┤ fixed height
|
|
2115
|
+
* ├─ Bids scroll region ─────────────────┤ flex-1, independent scroll
|
|
2116
|
+
* │ best bid ◄── default visible │
|
|
2117
|
+
* │ ... │
|
|
2118
|
+
* │ lowest bid │
|
|
2119
|
+
* └──────────────────────────────────────┘
|
|
2120
|
+
*
|
|
2121
|
+
* Both scroll regions consume any leftover container height equally; if the
|
|
2122
|
+
* widget is short, each side scrolls on its own without dragging the other.
|
|
2123
|
+
*
|
|
2124
|
+
* Asks come in sorted ascending (best ask = lowest price = `asks[0]`). To
|
|
2125
|
+
* pin the best ask flush against the spread bar we render asks reversed
|
|
2126
|
+
* (highest first → best last in DOM order) inside a normal column scroll
|
|
2127
|
+
* container, then default-scroll to the bottom on mount. We re-stick the
|
|
2128
|
+
* scroll position to the bottom whenever the user is already near it, so
|
|
2129
|
+
* websocket updates don't bounce the view off the best ask.
|
|
2130
|
+
*
|
|
2131
|
+
* Bids are sorted descending (`bids[0]` = best) and rendered top-down,
|
|
2132
|
+
* so the best bid sits at `scrollTop = 0` flush against the spread bar
|
|
2133
|
+
* by default.
|
|
2134
|
+
*/
|
|
2135
|
+
declare function OrderBookUI({ bids, asks, spreadPercentage, precision, precisionOptions, onPrecisionChange, onPriceClick, }: OrderBookUIProps): react_jsx_runtime.JSX.Element;
|
|
1953
2136
|
|
|
1954
2137
|
type TradesWidgetProps = {
|
|
1955
2138
|
symbol: string;
|
|
@@ -1963,7 +2146,7 @@ type TradesUIProps = {
|
|
|
1963
2146
|
trades: Trade[];
|
|
1964
2147
|
onTradeClick?: (trade: Trade) => void;
|
|
1965
2148
|
};
|
|
1966
|
-
declare function TradesUI({ trades, onTradeClick }: TradesUIProps):
|
|
2149
|
+
declare function TradesUI({ trades, onTradeClick, }: TradesUIProps): ReactElement;
|
|
1967
2150
|
|
|
1968
2151
|
type UseTradesScriptParams = {
|
|
1969
2152
|
symbol: string;
|
|
@@ -2402,4 +2585,4 @@ interface HyperliquidInitWidgetProps extends Pick<UseHyperliquidSetupOptions, "a
|
|
|
2402
2585
|
}
|
|
2403
2586
|
declare function HyperliquidInitWidget({ adapter, userAddress, steps, autoLoad, onComplete, onError, onDismiss, className, }: HyperliquidInitWidgetProps): react_jsx_runtime.JSX.Element;
|
|
2404
2587
|
|
|
2405
|
-
export { type Account, type ApproveBuilderFeeParams, type CancelOrderParams, type CancelOrderResult, type Coin, CoinInfoNotFoundUI, CoinInfoSkeletonsUI, CoinInfoUI, type CoinInfoUIProps, CoinInfoWidget, type CoinInfoWidgetProps, type DepositBreakdown, DepositConfirmUI, type DepositConfirmUIProps, type DepositErrorInfo, type DepositEvent, DepositFlowWidget, type DepositFlowWidgetProps, DepositFormUI, type DepositFormUIProps, type DepositPhase, type DepositQuoteRequest, type DepositQuoteResponse, type DepositSource, type DepositState, type DepositStatus, type DepositStatusResponse, type DepositStatusTransition, DepositStatusUI, type DepositStatusUIProps, type DepositSubmitRequest, type DepositSubmitResponse, type ExecuteDepositInput, type GetOpenOrdersParams, type GetOpenOrdersResult, type GetPositionsParams, type GetPositionsResult, type GetTradesParams, type GetTradesResult, HL_USDC_DECIMALS, type HyperliquidAccountState, HyperliquidApiError, type HyperliquidClientConfig, type HyperliquidEnvironment, HyperliquidInitUI, type HyperliquidInitUIProps, HyperliquidInitWidget, type HyperliquidInitWidgetProps, HyperliquidPerpetualsClient, type HyperliquidSetupActionResult, type IHyperliquidSetupAdapter, type IPerpDepositClient, type IPerpetualsClient, type Kline, type KlineInterval, LiberFiApiError, type LiberFiHttpMethod, type RequestOptions as LiberFiHttpRequestOptions, LiberFiHttpTransport, type LiberFiHttpTransportConfig, LiberFiPerpDepositClient, type LiberFiPerpDepositClientConfig, LiberFiPerpetualsClient, type LiberFiPerpetualsClientConfig, type MarketData, type MarketDataType, OpenOrdersEmpty, OpenOrdersSkeleton, OpenOrdersUI, type OpenOrdersUIProps, OpenOrdersWidget, type OpenOrdersWidgetProps, type Order, type OrderBook, type OrderBookLevel, OrderBookUI, type OrderBookUIProps, OrderBookWidget, type OrderBookWidgetProps, type OrderSide, type OrderStatus, type OrderType, PerpetualsContext, type PerpetualsContextValue, PerpetualsProvider, type PerpetualsProviderProps, type PlaceOrderFormData, PlaceOrderFormUI, type PlaceOrderFormUIProps, PlaceOrderFormWidget, type PlaceOrderFormWidgetProps, type PlaceOrderParams, type PlaceOrderResult, type Position, PositionsEmpty, PositionsSkeleton, PositionsUI, type PositionsUIProps, PositionsWidget, type PositionsWidgetProps, type PriceLevel, SearchCoinsUI, type SearchCoinsUIProps, SearchCoinsWidget, type SearchCoinsWidgetProps, type SetReferrerParams, type SetupAction, type SetupPhase, type SetupState, type SetupStep, type SetupStepId, type SignAndBroadcastSolanaTx, type SignTypedDataFn, type StepRecord, type StepStatus, type Symbol, TERMINAL_DEPOSIT_STATUSES, type TimeRange, type Trade, type TradeHistory, TradeHistoryEmpty, TradeHistorySkeleton, TradeHistoryUI, type TradeHistoryUIProps, TradeHistoryWidget, type TradeHistoryWidgetProps, type TradeSide, TradesUI, type TradesUIProps, TradesWidget, type TradesWidgetProps, type TradingProvider, type UpdateLeverageParams, type UseCancelOrderMutationParams, type UseCandlesSubscriptionParams, type UseCandlesSubscriptionResult, type UseCoinInfoReturnType, type UseCreateOrderMutationParams, type UseHyperliquidSetupOptions, type UseHyperliquidSetupResult, type UseKlinesQueryParams, type UseMarketDataSubscriptionParams, type UseMarketDataSubscriptionResult, type UseMarketQueryParams, type UseMarketsQueryParams, type UseOpenOrdersScriptParams, type UseOpenOrdersScriptResult, type UseOrderBookQueryParams, type UseOrderBookScriptParams, type UseOrderBookScriptResult, type UseOrdersQueryParams, type UsePerpDepositExecuteResult, type UsePerpDepositQuoteOptions, type UsePerpDepositStatusOptions, type UsePlaceOrderFormScriptParams, type UsePlaceOrderFormScriptResult, type UsePositionsQueryParams, type UsePositionsScriptParams, type UsePositionsScriptResult, type UseRecentTradesQueryParams, type UseSearchCoinsScriptParams, type UseSearchCoinsScriptResult, type UseTradeHistoryScriptParams, type UseTradeHistoryScriptResult, type UseTradesQueryParams, type UseTradesScriptParams, type UseTradesScriptResult, type UseUserDataSubscriptionParams, type UseUserDataSubscriptionResult, type UserDataType, cancelOrder, classifyStep, coinsQueryKey, createOrder, currentBreakdown as currentDepositBreakdown, currentStatus as currentDepositStatus, fetchCoins, fetchKlines, fetchMarket, fetchMarkets, fetchOrderBook, fetchOrders, fetchPerpDepositQuote, fetchPerpDepositStatus, fetchPositions, fetchRecentTrades, fetchTrades, hlUsdcRawToUsdc, initialDepositState, initialSetupState, isPolling as isDepositPolling, isTerminal as isDepositTerminal, isTerminalLifecycle as isTerminalDepositLifecycle, klinesQueryKey, lamportsToSol, marketQueryKey, marketsQueryKey, microUsdcToUsdc, nextRunnableStep, orderBookQueryKey, ordersQueryKey, perpDepositQuoteQueryKey, perpDepositStatusQueryKey, positionsQueryKey, recentTradesQueryKey, reduceDepositState, reduceSetupState, secondsUntil, shortAddress, solToLamports, tradesQueryKey, useCancelOrderMutation, useCandlesSubscription, useCoinInfo, useCoinsQuery, useCreateOrderMutation, useHyperliquidSetup, useKlinesQuery, useMarketDataSubscription, useMarketQuery, useMarketsQuery, useOpenOrdersScript, useOrderBookQuery, useOrderBookScript, useOrdersQuery, usePerpDepositClient, usePerpDepositClientMaybe, usePerpDepositExecute, usePerpDepositQuote, usePerpDepositStatus, usePerpetualsClient, usePlaceOrderFormScript, usePositionsQuery, usePositionsScript, useRecentTradesQuery, useSearchCoinsScript, useTradeHistoryScript, useTradesQuery, useTradesScript, useUserDataSubscription, _default as version };
|
|
2588
|
+
export { type Account, type ApproveBuilderFeeParams, type CancelOrderParams, type CancelOrderResult, type Coin, CoinInfoNotFoundUI, CoinInfoSkeletonsUI, CoinInfoUI, type CoinInfoUIProps, CoinInfoWidget, type CoinInfoWidgetProps, DEFAULT_ORDER_BOOK_PRECISION_OPTIONS, type DepositBreakdown, DepositConfirmUI, type DepositConfirmUIProps, type DepositErrorInfo, type DepositEvent, DepositFlowWidget, type DepositFlowWidgetProps, DepositFormUI, type DepositFormUIProps, type DepositPhase, type DepositQuoteRequest, type DepositQuoteResponse, type DepositSource, type DepositState, type DepositStatus, type DepositStatusResponse, type DepositStatusTransition, DepositStatusUI, type DepositStatusUIProps, type DepositSubmitRequest, type DepositSubmitResponse, type ExecuteDepositInput, type GetOpenOrdersParams, type GetOpenOrdersResult, type GetPositionsParams, type GetPositionsResult, type GetTradesParams, type GetTradesResult, HL_USDC_DECIMALS, type HyperliquidAccountState, HyperliquidApiError, type HyperliquidClientConfig, type HyperliquidEnvironment, HyperliquidInitUI, type HyperliquidInitUIProps, HyperliquidInitWidget, type HyperliquidInitWidgetProps, HyperliquidPerpetualsClient, type HyperliquidSetupActionResult, type IHyperliquidSetupAdapter, type IPerpDepositClient, type IPerpetualsClient, type Kline, type KlineInterval, LiberFiApiError, type LiberFiHttpMethod, type RequestOptions as LiberFiHttpRequestOptions, LiberFiHttpTransport, type LiberFiHttpTransportConfig, LiberFiPerpDepositClient, type LiberFiPerpDepositClientConfig, LiberFiPerpetualsClient, type LiberFiPerpetualsClientConfig, type MarketData, type MarketDataType, OpenOrdersEmpty, OpenOrdersSkeleton, OpenOrdersUI, type OpenOrdersUIProps, OpenOrdersWidget, type OpenOrdersWidgetProps, type Order, type OrderBook, type OrderBookAggregationOptions, type OrderBookLevel, OrderBookUI, type OrderBookUIProps, OrderBookWidget, type OrderBookWidgetProps, type OrderSide, type OrderStatus, type OrderType, PerpetualsContext, type PerpetualsContextValue, PerpetualsProvider, type PerpetualsProviderProps, type PlaceOrderFormData, PlaceOrderFormUI, type PlaceOrderFormUIProps, PlaceOrderFormWidget, type PlaceOrderFormWidgetProps, type PlaceOrderParams, type PlaceOrderResult, type Position, PositionsEmpty, PositionsSkeleton, PositionsUI, type PositionsUIProps, PositionsWidget, type PositionsWidgetProps, type PriceLevel, SearchCoinsUI, type SearchCoinsUIProps, SearchCoinsWidget, type SearchCoinsWidgetProps, type SetReferrerParams, type SetupAction, type SetupPhase, type SetupState, type SetupStep, type SetupStepId, type SignAndBroadcastSolanaTx, type SignTypedDataFn, type StepRecord, type StepStatus, type Symbol, TERMINAL_DEPOSIT_STATUSES, type TimeRange, type Trade, type TradeHistory, TradeHistoryEmpty, TradeHistorySkeleton, TradeHistoryUI, type TradeHistoryUIProps, TradeHistoryWidget, type TradeHistoryWidgetProps, type TradeSide, TradesUI, type TradesUIProps, TradesWidget, type TradesWidgetProps, type TradingProvider, type UpdateLeverageParams, type UseCancelOrderMutationParams, type UseCandlesSubscriptionParams, type UseCandlesSubscriptionResult, type UseCoinInfoReturnType, type UseCreateOrderMutationParams, type UseHyperliquidSetupOptions, type UseHyperliquidSetupResult, type UseKlinesQueryParams, type UseMarketDataSubscriptionParams, type UseMarketDataSubscriptionResult, type UseMarketQueryParams, type UseMarketsQueryParams, type UseOpenOrdersScriptParams, type UseOpenOrdersScriptResult, type UseOrderBookQueryParams, type UseOrderBookScriptParams, type UseOrderBookScriptResult, type UseOrdersQueryParams, type UsePerpDepositExecuteResult, type UsePerpDepositQuoteOptions, type UsePerpDepositStatusOptions, type UsePlaceOrderFormScriptParams, type UsePlaceOrderFormScriptResult, type UsePositionsQueryParams, type UsePositionsScriptParams, type UsePositionsScriptResult, type UseRecentTradesQueryParams, type UseSearchCoinsScriptParams, type UseSearchCoinsScriptResult, type UseTradeHistoryScriptParams, type UseTradeHistoryScriptResult, type UseTradesQueryParams, type UseTradesScriptParams, type UseTradesScriptResult, type UseUserDataSubscriptionParams, type UseUserDataSubscriptionResult, type UserDataType, aggregationFromStep, cancelOrder, classifyStep, coinsQueryKey, createOrder, currentBreakdown as currentDepositBreakdown, currentStatus as currentDepositStatus, fetchCoins, fetchKlines, fetchMarket, fetchMarkets, fetchOrderBook, fetchOrders, fetchPerpDepositQuote, fetchPerpDepositStatus, fetchPositions, fetchRecentTrades, fetchTrades, hlUsdcRawToUsdc, initialDepositState, initialSetupState, isPolling as isDepositPolling, isTerminal as isDepositTerminal, isTerminalLifecycle as isTerminalDepositLifecycle, klinesQueryKey, lamportsToSol, marketQueryKey, marketsQueryKey, microUsdcToUsdc, nextRunnableStep, orderBookQueryKey, ordersQueryKey, perpDepositQuoteQueryKey, perpDepositStatusQueryKey, positionsQueryKey, recentTradesQueryKey, reduceDepositState, reduceSetupState, secondsUntil, shortAddress, solToLamports, tradesQueryKey, useCancelOrderMutation, useCandlesSubscription, useCoinInfo, useCoinsQuery, useCreateOrderMutation, useHyperliquidSetup, useKlinesQuery, useMarketDataSubscription, useMarketQuery, useMarketsQuery, useOpenOrdersScript, useOrderBookQuery, useOrderBookScript, useOrdersQuery, usePerpDepositClient, usePerpDepositClientMaybe, usePerpDepositExecute, usePerpDepositQuote, usePerpDepositStatus, usePerpetualsClient, usePlaceOrderFormScript, usePositionsQuery, usePositionsScript, useRecentTradesQuery, useSearchCoinsScript, useTradeHistoryScript, useTradesQuery, useTradesScript, useUserDataSubscription, _default as version };
|