@rabby-wallet/hyperliquid-sdk 1.0.0-beta.14 → 1.0.0-beta.16
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.
|
@@ -28,7 +28,7 @@ export declare class InfoClient {
|
|
|
28
28
|
/**
|
|
29
29
|
* Get user's fill history
|
|
30
30
|
*/
|
|
31
|
-
getUserFills(address?: string): Promise<UserFills>;
|
|
31
|
+
getUserFills(address?: string, aggregateByTime?: boolean): Promise<UserFills>;
|
|
32
32
|
/**
|
|
33
33
|
* Get candlestick data snapshot
|
|
34
34
|
* Supported intervals: "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "8h", "12h", "1d", "3d", "1w", "1M"
|
|
@@ -100,11 +100,12 @@ class InfoClient {
|
|
|
100
100
|
/**
|
|
101
101
|
* Get user's fill history
|
|
102
102
|
*/
|
|
103
|
-
getUserFills(address) {
|
|
103
|
+
getUserFills(address, aggregateByTime) {
|
|
104
104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
105
105
|
return this.httpClient.info({
|
|
106
106
|
type: constants_1.InfoType.USER_FILLS,
|
|
107
107
|
user: address || this.masterAddress,
|
|
108
|
+
aggregateByTime: aggregateByTime || true,
|
|
108
109
|
});
|
|
109
110
|
});
|
|
110
111
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AllMids, L2Book, Candle,
|
|
1
|
+
import type { AllMids, L2Book, Candle, WsOrder, WebData2, WsActiveAssetCtx, WsUserFills } from '../types';
|
|
2
2
|
export interface WebSocketClientConfig {
|
|
3
3
|
masterAddress: string;
|
|
4
4
|
isTestnet?: boolean;
|
|
@@ -57,7 +57,7 @@ export declare class WebSocketClient {
|
|
|
57
57
|
/**
|
|
58
58
|
* Subscribe to user fills
|
|
59
59
|
*/
|
|
60
|
-
subscribeToUserFills(callback: SubscriptionCallback<
|
|
60
|
+
subscribeToUserFills(callback: SubscriptionCallback<WsUserFills>): Subscription;
|
|
61
61
|
/**
|
|
62
62
|
* Subscribe to user order updates
|
|
63
63
|
*/
|
|
@@ -184,7 +184,7 @@ class WebSocketClient {
|
|
|
184
184
|
*/
|
|
185
185
|
subscribeToUserFills(callback) {
|
|
186
186
|
return this.subscribe({
|
|
187
|
-
subscription: { type: 'userFills', user: this.config.masterAddress },
|
|
187
|
+
subscription: { type: 'userFills', user: this.config.masterAddress, aggregateByTime: true },
|
|
188
188
|
}, callback);
|
|
189
189
|
}
|
|
190
190
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -210,6 +210,11 @@ export interface WsOrder {
|
|
|
210
210
|
children?: WsOrder[];
|
|
211
211
|
user: string;
|
|
212
212
|
}
|
|
213
|
+
export interface WsUserFills {
|
|
214
|
+
isSnapshot?: boolean;
|
|
215
|
+
user: string;
|
|
216
|
+
fills: WsFill[];
|
|
217
|
+
}
|
|
213
218
|
export interface WsFill {
|
|
214
219
|
coin: string;
|
|
215
220
|
px: string;
|
package/package.json
CHANGED