@hyperix/hooks 0.1.6 → 0.1.8
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/config/hl.d.ts +6 -0
- package/dist/config/hl.js +4 -0
- package/dist/index.d.ts +5 -35
- package/dist/index.js +5 -2302
- package/dist/lib/symbol-converter.d.ts +96 -0
- package/dist/lib/symbol-converter.js +190 -0
- package/dist/use-l2-book.d.ts +23 -0
- package/dist/use-l2-book.js +69 -0
- package/dist/use-symbol-converter.d.ts +3 -0
- package/dist/use-symbol-converter.js +19 -0
- package/dist/use-trade-history.d.ts +20 -0
- package/dist/use-trade-history.js +54 -0
- package/dist/use-trades.d.ts +9 -0
- package/dist/use-trades.js +26 -0
- package/dist/use-user-fills.d.ts +13 -0
- package/dist/use-user-fills.js +40 -0
- package/dist/use-user-fundings.d.ts +12 -0
- package/dist/use-user-fundings.js +43 -0
- package/package.json +3 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HttpTransport, SubscriptionClient, WebSocketTransport } from "@nktkas/hyperliquid";
|
|
2
|
+
export declare const transport: HttpTransport;
|
|
3
|
+
export declare const wsTransport: WebSocketTransport;
|
|
4
|
+
export declare const wsClient: SubscriptionClient<{
|
|
5
|
+
transport: WebSocketTransport;
|
|
6
|
+
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,35 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
bids: L2BookLevel[];
|
|
7
|
-
asks: L2BookLevel[];
|
|
8
|
-
maxCumulativeSize: number;
|
|
9
|
-
levels: {
|
|
10
|
-
nSigFigs: number;
|
|
11
|
-
tick: string;
|
|
12
|
-
}[];
|
|
13
|
-
spread: number;
|
|
14
|
-
spreadPercent: number;
|
|
15
|
-
};
|
|
16
|
-
type UseL2BookOptions = {
|
|
17
|
-
depth?: number;
|
|
18
|
-
nSigFigs?: number;
|
|
19
|
-
};
|
|
20
|
-
declare const EMPTY_L2_BOOK: L2Book;
|
|
21
|
-
declare function calcOrderbookLevels(price: number): {
|
|
22
|
-
nSigFigs: number;
|
|
23
|
-
tick: string;
|
|
24
|
-
}[];
|
|
25
|
-
declare const useL2Book: (coin: string, options?: UseL2BookOptions) => UseSubscribeState<L2Book>;
|
|
26
|
-
|
|
27
|
-
type Trade = TradesEvent[number];
|
|
28
|
-
type UseTradesOptions = {
|
|
29
|
-
limit?: number;
|
|
30
|
-
enabled?: boolean;
|
|
31
|
-
};
|
|
32
|
-
declare const EMPTY_TRADES: Trade[];
|
|
33
|
-
declare function useTrades(coin: string, options?: UseTradesOptions): UseSubscribeState<Trade[]>;
|
|
34
|
-
|
|
35
|
-
export { EMPTY_L2_BOOK, EMPTY_TRADES, type L2Book, type L2BookLevel, type Trade, type UseL2BookOptions, type UseTradesOptions, calcOrderbookLevels, useL2Book, useTrades };
|
|
1
|
+
export * from "./use-l2-book.js";
|
|
2
|
+
export * from "./use-trade-history.js";
|
|
3
|
+
export * from "./use-trades.js";
|
|
4
|
+
export * from "./use-user-fundings.js";
|
|
5
|
+
export * from "./use-user-fills.js";
|