@riocrypto/common-server 1.0.2792 → 1.0.2795
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.
|
@@ -19,6 +19,10 @@ export interface BinanceOrderResponse {
|
|
|
19
19
|
orderListId: number;
|
|
20
20
|
clientOrderId: string;
|
|
21
21
|
transactTime?: number;
|
|
22
|
+
time?: number;
|
|
23
|
+
updateTime?: number;
|
|
24
|
+
workingTime?: number;
|
|
25
|
+
origQuoteOrderQty?: string;
|
|
22
26
|
price: string;
|
|
23
27
|
origQty: string;
|
|
24
28
|
executedQty: string;
|
|
@@ -34,6 +38,21 @@ export interface BinanceOrderResponse {
|
|
|
34
38
|
commissionAsset: string;
|
|
35
39
|
}>;
|
|
36
40
|
}
|
|
41
|
+
export interface BinanceMyTrade {
|
|
42
|
+
symbol: string;
|
|
43
|
+
id: number;
|
|
44
|
+
orderId: number;
|
|
45
|
+
orderListId: number;
|
|
46
|
+
price: string;
|
|
47
|
+
qty: string;
|
|
48
|
+
quoteQty: string;
|
|
49
|
+
commission: string;
|
|
50
|
+
commissionAsset: string;
|
|
51
|
+
time: number;
|
|
52
|
+
isBuyer: boolean;
|
|
53
|
+
isMaker: boolean;
|
|
54
|
+
isBestMatch: boolean;
|
|
55
|
+
}
|
|
37
56
|
export interface BinanceWithdrawHistoryItem {
|
|
38
57
|
id: string;
|
|
39
58
|
amount: string;
|
|
@@ -142,8 +161,19 @@ declare class BinanceClient {
|
|
|
142
161
|
getOrder(symbol: string, orderId: number): Promise<BinanceOrderResponse>;
|
|
143
162
|
cancelOrder(symbol: string, orderId: number): Promise<any>;
|
|
144
163
|
getOpenOrders(symbol: string): Promise<BinanceOrderResponse[]>;
|
|
145
|
-
getAllOrders(symbol: string
|
|
146
|
-
|
|
164
|
+
getAllOrders(symbol: string, options?: {
|
|
165
|
+
orderId?: number;
|
|
166
|
+
startTime?: number;
|
|
167
|
+
endTime?: number;
|
|
168
|
+
limit?: number;
|
|
169
|
+
}): Promise<BinanceOrderResponse[]>;
|
|
170
|
+
getMyTrades(symbol: string, options?: {
|
|
171
|
+
orderId?: number;
|
|
172
|
+
startTime?: number;
|
|
173
|
+
endTime?: number;
|
|
174
|
+
fromId?: number;
|
|
175
|
+
limit?: number;
|
|
176
|
+
}): Promise<BinanceMyTrade[]>;
|
|
147
177
|
getRecentTrades(symbol: string, limit?: number): Promise<BinanceTradeItem[]>;
|
|
148
178
|
getExchangeInfo(): Promise<BinanceExchangeInfo>;
|
|
149
179
|
getOrderBook(symbol: string, limit?: number): Promise<BinanceOrderBook>;
|
|
@@ -165,14 +165,14 @@ class BinanceClient {
|
|
|
165
165
|
return this.signedGet("/api/v3/openOrders", { symbol });
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
|
-
getAllOrders(symbol) {
|
|
168
|
+
getAllOrders(symbol, options) {
|
|
169
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
return this.signedGet("/api/v3/allOrders", { symbol });
|
|
170
|
+
return this.signedGet("/api/v3/allOrders", Object.assign({ symbol }, options));
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
getMyTrades(symbol,
|
|
173
|
+
getMyTrades(symbol, options) {
|
|
174
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
-
return this.signedGet("/api/v3/myTrades", { symbol,
|
|
175
|
+
return this.signedGet("/api/v3/myTrades", Object.assign({ symbol }, options));
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
// Market data
|