@rabby-wallet/hyperliquid-sdk 1.0.0-beta.17 → 1.0.0-beta.18
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meta, AssetCtx, ClearinghouseState, UserFills, CandleSnapshot, AllMids, ExtraAgent, OpenOrder, FeeResponse, UserNonFundingLedgerUpdates } from '../types';
|
|
1
|
+
import type { Meta, AssetCtx, ClearinghouseState, UserFills, CandleSnapshot, AllMids, ExtraAgent, OpenOrder, FeeResponse, UserNonFundingLedgerUpdates, UserHistoricalOrders } from '../types';
|
|
2
2
|
export interface InfoClientConfig {
|
|
3
3
|
isTestnet?: boolean;
|
|
4
4
|
timeout?: number;
|
|
@@ -29,6 +29,10 @@ export declare class InfoClient {
|
|
|
29
29
|
* Get user's fill history
|
|
30
30
|
*/
|
|
31
31
|
getUserFills(address?: string, aggregateByTime?: boolean): Promise<UserFills>;
|
|
32
|
+
/**
|
|
33
|
+
* Get user's fill and cancel and other all orders history
|
|
34
|
+
*/
|
|
35
|
+
getUserHistoricalOrders(address?: string, startTime?: number, endTime?: number): Promise<UserHistoricalOrders[]>;
|
|
32
36
|
/**
|
|
33
37
|
* Get candlestick data snapshot
|
|
34
38
|
* Supported intervals: "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "8h", "12h", "1d", "3d", "1w", "1M"
|
|
@@ -109,6 +109,19 @@ class InfoClient {
|
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Get user's fill and cancel and other all orders history
|
|
114
|
+
*/
|
|
115
|
+
getUserHistoricalOrders(address, startTime, endTime) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return this.httpClient.info({
|
|
118
|
+
type: constants_1.InfoType.USER_HISTORICAL_ORDERS,
|
|
119
|
+
user: address || this.masterAddress,
|
|
120
|
+
startTime: startTime || 0,
|
|
121
|
+
endTime,
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
}
|
|
112
125
|
/**
|
|
113
126
|
* Get candlestick data snapshot
|
|
114
127
|
* Supported intervals: "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "8h", "12h", "1d", "3d", "1w", "1M"
|
|
@@ -28,6 +28,7 @@ export declare enum ExchangeType {
|
|
|
28
28
|
export declare enum InfoType {
|
|
29
29
|
ALL_MIDS = "allMids",
|
|
30
30
|
USER_NON_FUNDING_LEDGER_UPDATES = "userNonFundingLedgerUpdates",
|
|
31
|
+
USER_HISTORICAL_ORDERS = "historicalOrders",
|
|
31
32
|
USER_OPEN_ORDERS = "openOrders",
|
|
32
33
|
USER_FILLS = "userFills",
|
|
33
34
|
USER_FILLS_BY_TIME = "userFillsByTime",
|
package/dist/types/constants.js
CHANGED
|
@@ -36,6 +36,7 @@ var InfoType;
|
|
|
36
36
|
(function (InfoType) {
|
|
37
37
|
InfoType["ALL_MIDS"] = "allMids";
|
|
38
38
|
InfoType["USER_NON_FUNDING_LEDGER_UPDATES"] = "userNonFundingLedgerUpdates";
|
|
39
|
+
InfoType["USER_HISTORICAL_ORDERS"] = "historicalOrders";
|
|
39
40
|
InfoType["USER_OPEN_ORDERS"] = "openOrders";
|
|
40
41
|
InfoType["USER_FILLS"] = "userFills";
|
|
41
42
|
InfoType["USER_FILLS_BY_TIME"] = "userFillsByTime";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,6 +9,28 @@ export interface MarketOverview {
|
|
|
9
9
|
assetContexts: AssetCtx[];
|
|
10
10
|
marginTables: [number, MarginTable][];
|
|
11
11
|
}
|
|
12
|
+
export interface UserHistoricalOrders {
|
|
13
|
+
order: {
|
|
14
|
+
coin: string;
|
|
15
|
+
side: Side;
|
|
16
|
+
limitPx: string;
|
|
17
|
+
sz: string;
|
|
18
|
+
oid: number;
|
|
19
|
+
timestamp: number;
|
|
20
|
+
triggerCondition: string;
|
|
21
|
+
isTrigger: boolean;
|
|
22
|
+
triggerPx: string;
|
|
23
|
+
children: any;
|
|
24
|
+
isPositionTpsl: boolean;
|
|
25
|
+
reduceOnly: boolean;
|
|
26
|
+
orderType: string;
|
|
27
|
+
origSz: string;
|
|
28
|
+
tif: string;
|
|
29
|
+
cloid: string | null;
|
|
30
|
+
};
|
|
31
|
+
status: string;
|
|
32
|
+
statusTimestamp: number;
|
|
33
|
+
}
|
|
12
34
|
export interface OpenOrder {
|
|
13
35
|
coin: string;
|
|
14
36
|
side: Side;
|
|
@@ -229,6 +251,11 @@ export interface WsFill {
|
|
|
229
251
|
crossed: boolean;
|
|
230
252
|
fee: string;
|
|
231
253
|
tid: number;
|
|
254
|
+
liquidation?: {
|
|
255
|
+
liquidatedUser: string;
|
|
256
|
+
markPx: string;
|
|
257
|
+
method: string;
|
|
258
|
+
};
|
|
232
259
|
}
|
|
233
260
|
export interface AssetCtx {
|
|
234
261
|
dayBaseVlm: string;
|
package/package.json
CHANGED