binance 3.0.0-beta.3 → 3.0.0-beta.4
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/index.js +1 -1
- package/lib/coinm-client.d.ts +46 -16
- package/lib/coinm-client.js +4 -4
- package/lib/coinm-client.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/main-client.d.ts +64 -15
- package/lib/main-client.js +41 -13
- package/lib/main-client.js.map +1 -1
- package/lib/portfolio-client.js.map +1 -1
- package/lib/types/coin.d.ts +1 -0
- package/lib/types/futures.d.ts +5 -4
- package/lib/types/futures.js.map +1 -1
- package/lib/types/shared.d.ts +6 -12
- package/lib/types/spot.d.ts +126 -8
- package/lib/types/spot.js.map +1 -1
- package/lib/types/websockets/ws-api-requests.d.ts +429 -2
- package/lib/types/websockets/ws-api-responses.d.ts +564 -0
- package/lib/types/websockets/ws-api.d.ts +149 -55
- package/lib/types/websockets/ws-api.js +46 -3
- package/lib/types/websockets/ws-api.js.map +1 -1
- package/lib/types/websockets/ws-events-formatted.d.ts +2 -2
- package/lib/types/websockets/ws-events-raw.d.ts +2 -2
- package/lib/types/websockets/ws-general.d.ts +4 -19
- package/lib/usdm-client.d.ts +41 -18
- package/lib/usdm-client.js +5 -8
- package/lib/usdm-client.js.map +1 -1
- package/lib/util/BaseWSClient.d.ts +2 -2
- package/lib/util/BaseWSClient.js +19 -23
- package/lib/util/BaseWSClient.js.map +1 -1
- package/lib/util/beautifier-maps.d.ts +11 -0
- package/lib/util/beautifier-maps.js +20 -0
- package/lib/util/beautifier-maps.js.map +1 -1
- package/lib/util/beautifier.js +1 -1
- package/lib/util/beautifier.js.map +1 -1
- package/lib/util/browser-support.d.ts +1 -1
- package/lib/util/browser-support.js +1 -0
- package/lib/util/browser-support.js.map +1 -1
- package/lib/util/requestUtils.d.ts +2 -2
- package/lib/util/requestUtils.js +22 -22
- package/lib/util/requestUtils.js.map +1 -1
- package/lib/util/rounding.d.ts +8 -0
- package/lib/util/rounding.js +41 -0
- package/lib/util/rounding.js.map +1 -0
- package/lib/util/typeGuards.d.ts +4 -2
- package/lib/util/typeGuards.js +33 -0
- package/lib/util/typeGuards.js.map +1 -1
- package/lib/util/webCryptoAPI.js +1 -0
- package/lib/util/webCryptoAPI.js.map +1 -1
- package/lib/util/websockets/WsStore.js +1 -1
- package/lib/util/websockets/WsStore.js.map +1 -1
- package/lib/util/websockets/rest-client-cache.d.ts +2 -2
- package/lib/util/websockets/rest-client-cache.js +6 -6
- package/lib/util/websockets/rest-client-cache.js.map +1 -1
- package/lib/util/websockets/user-data-stream-manager.js +4 -4
- package/lib/util/websockets/user-data-stream-manager.js.map +1 -1
- package/lib/util/websockets/websocket-util.d.ts +10 -5
- package/lib/util/websockets/websocket-util.js +64 -40
- package/lib/util/websockets/websocket-util.js.map +1 -1
- package/lib/websocket-api-client.d.ts +324 -0
- package/lib/websocket-api-client.js +537 -0
- package/lib/websocket-api-client.js.map +1 -0
- package/lib/websocket-client-legacy.d.ts +2 -2
- package/lib/websocket-client-legacy.js +6 -6
- package/lib/websocket-client-legacy.js.map +1 -1
- package/lib/websocket-client.d.ts +2 -2
- package/lib/websocket-client.js +50 -35
- package/lib/websocket-client.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,434 @@
|
|
|
1
|
+
import { KlineInterval, numberInString } from '../shared';
|
|
1
2
|
/**
|
|
2
|
-
* Simple request params with timestamp & recv window optional
|
|
3
|
+
* Simple request params with timestamp? & recv window optional
|
|
3
4
|
*/
|
|
4
5
|
export type WSAPIRecvWindowTimestamp = {
|
|
6
|
+
recvWindow?: number;
|
|
7
|
+
timestamp: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* Authentication request types
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export interface SessionLogonWSAPIRequest {
|
|
15
|
+
timestamp: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* General request types
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export interface ExchangeInfoWSAPIRequest {
|
|
23
|
+
symbol?: string;
|
|
24
|
+
symbols?: string[];
|
|
25
|
+
permissions?: string[];
|
|
26
|
+
showPermissionSets?: boolean;
|
|
27
|
+
symbolStatus?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* Market data request types
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export interface DepthWSAPIRequest {
|
|
35
|
+
symbol: string;
|
|
36
|
+
limit?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface TradesRecentWSAPIRequest {
|
|
39
|
+
symbol: string;
|
|
40
|
+
limit?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface TradesHistoricalWSAPIRequest {
|
|
43
|
+
symbol: string;
|
|
44
|
+
fromId?: number;
|
|
45
|
+
limit?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface TradesAggregateWSAPIRequest {
|
|
48
|
+
symbol: string;
|
|
49
|
+
fromId?: number;
|
|
50
|
+
startTime?: number;
|
|
51
|
+
endTime?: number;
|
|
52
|
+
limit?: number;
|
|
53
|
+
}
|
|
54
|
+
export interface KlinesWSAPIRequest {
|
|
55
|
+
symbol: string;
|
|
56
|
+
interval: KlineInterval;
|
|
57
|
+
startTime?: number;
|
|
58
|
+
endTime?: number;
|
|
59
|
+
timeZone?: string;
|
|
60
|
+
limit?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface AvgPriceWSAPIRequest {
|
|
63
|
+
symbol: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Symbol for single symbol, or symbols for multiple symbols
|
|
67
|
+
*/
|
|
68
|
+
export interface Ticker24hrWSAPIRequest {
|
|
69
|
+
symbol?: string;
|
|
70
|
+
symbols?: string[];
|
|
71
|
+
type?: 'FULL' | 'MINI';
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Symbol for single symbol, or symbols for multiple symbols
|
|
75
|
+
*/
|
|
76
|
+
export interface TickerTradingDayWSAPIRequest {
|
|
77
|
+
symbol?: string;
|
|
78
|
+
symbols?: string[];
|
|
79
|
+
timeZone?: string;
|
|
80
|
+
type?: 'FULL' | 'MINI';
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Symbol for single symbol, or symbols for multiple symbols
|
|
84
|
+
*/
|
|
85
|
+
export interface TickerWSAPIRequest {
|
|
86
|
+
symbol?: string;
|
|
87
|
+
symbols?: string[];
|
|
88
|
+
windowSize?: string;
|
|
89
|
+
type?: 'FULL' | 'MINI';
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Symbol for single symbol, or symbols for multiple symbols
|
|
93
|
+
*/
|
|
94
|
+
export interface TickerPriceWSAPIRequest {
|
|
95
|
+
symbol?: string;
|
|
96
|
+
symbols?: string[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Symbol for single symbol, or symbols for multiple symbols
|
|
100
|
+
*/
|
|
101
|
+
export interface TickerBookWSAPIRequest {
|
|
102
|
+
symbol?: string;
|
|
103
|
+
symbols?: string[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* Account request types - Spot
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
export interface AllOrdersWSAPIRequest {
|
|
111
|
+
symbol: string;
|
|
112
|
+
orderId?: number;
|
|
113
|
+
startTime?: number;
|
|
114
|
+
endTime?: number;
|
|
115
|
+
limit?: number;
|
|
116
|
+
}
|
|
117
|
+
export interface AllOrderListsWSAPIRequest {
|
|
118
|
+
fromId?: number;
|
|
119
|
+
startTime?: number;
|
|
120
|
+
endTime?: number;
|
|
121
|
+
limit?: number;
|
|
122
|
+
}
|
|
123
|
+
export interface MyTradesWSAPIRequest {
|
|
124
|
+
symbol: string;
|
|
125
|
+
orderId?: number;
|
|
126
|
+
startTime?: number;
|
|
127
|
+
endTime?: number;
|
|
128
|
+
fromId?: number;
|
|
129
|
+
limit?: number;
|
|
130
|
+
}
|
|
131
|
+
export interface MyPreventedMatchesWSAPIRequest {
|
|
132
|
+
symbol: string;
|
|
133
|
+
preventedMatchId?: number;
|
|
134
|
+
orderId?: number;
|
|
135
|
+
fromPreventedMatchId?: number;
|
|
136
|
+
limit?: number;
|
|
137
|
+
}
|
|
138
|
+
export interface MyAllocationsWSAPIRequest {
|
|
139
|
+
symbol: string;
|
|
140
|
+
startTime?: number;
|
|
141
|
+
endTime?: number;
|
|
142
|
+
fromAllocationId?: number;
|
|
143
|
+
limit?: number;
|
|
144
|
+
orderId?: number;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Trading request types
|
|
148
|
+
*/
|
|
149
|
+
export interface OrderTestWSAPIRequest {
|
|
150
|
+
symbol: string;
|
|
151
|
+
side: 'BUY' | 'SELL';
|
|
152
|
+
type: string;
|
|
153
|
+
timeInForce?: string;
|
|
154
|
+
price?: numberInString;
|
|
155
|
+
quantity?: numberInString;
|
|
156
|
+
quoteOrderQty?: numberInString;
|
|
157
|
+
newClientOrderId?: string;
|
|
158
|
+
stopPrice?: numberInString;
|
|
159
|
+
trailingDelta?: number;
|
|
160
|
+
icebergQty?: numberInString;
|
|
161
|
+
strategyId?: number;
|
|
162
|
+
strategyType?: number;
|
|
163
|
+
selfTradePreventionMode?: string;
|
|
164
|
+
computeCommissionRates?: boolean;
|
|
165
|
+
timestamp?: number;
|
|
166
|
+
recvWindow?: number;
|
|
167
|
+
}
|
|
168
|
+
export interface OrderStatusWSAPIRequest {
|
|
169
|
+
symbol: string;
|
|
170
|
+
orderId?: number;
|
|
171
|
+
origClientOrderId?: string;
|
|
172
|
+
recvWindow?: number;
|
|
173
|
+
timestamp?: number;
|
|
174
|
+
}
|
|
175
|
+
export interface OrderCancelWSAPIRequest {
|
|
176
|
+
symbol: string;
|
|
177
|
+
orderId?: number;
|
|
178
|
+
origClientOrderId?: string;
|
|
179
|
+
newClientOrderId?: string;
|
|
180
|
+
cancelRestrictions?: 'ONLY_NEW' | 'ONLY_PARTIALLY_FILLED';
|
|
181
|
+
recvWindow?: number;
|
|
182
|
+
timestamp?: number;
|
|
183
|
+
}
|
|
184
|
+
export interface OrderCancelReplaceWSAPIRequest {
|
|
185
|
+
symbol: string;
|
|
186
|
+
cancelReplaceMode: 'STOP_ON_FAILURE' | 'ALLOW_FAILURE';
|
|
187
|
+
cancelOrderId?: number;
|
|
188
|
+
cancelOrigClientOrderId?: string;
|
|
189
|
+
cancelNewClientOrderId?: string;
|
|
190
|
+
side: 'BUY' | 'SELL';
|
|
191
|
+
type: string;
|
|
192
|
+
timeInForce?: string;
|
|
193
|
+
price?: numberInString;
|
|
194
|
+
quantity?: numberInString;
|
|
195
|
+
quoteOrderQty?: numberInString;
|
|
196
|
+
newClientOrderId?: string;
|
|
197
|
+
newOrderRespType?: 'ACK' | 'RESULT' | 'FULL';
|
|
198
|
+
stopPrice?: numberInString;
|
|
199
|
+
trailingDelta?: number;
|
|
200
|
+
icebergQty?: numberInString;
|
|
201
|
+
strategyId?: number;
|
|
202
|
+
strategyType?: number;
|
|
203
|
+
selfTradePreventionMode?: string;
|
|
204
|
+
cancelRestrictions?: 'ONLY_NEW' | 'ONLY_PARTIALLY_FILLED';
|
|
205
|
+
orderRateLimitExceededMode?: 'DO_NOTHING' | 'CANCEL_ONLY';
|
|
206
|
+
recvWindow?: number;
|
|
207
|
+
timestamp?: number;
|
|
208
|
+
}
|
|
209
|
+
export interface OpenOrdersStatusWSAPIRequest {
|
|
210
|
+
symbol?: string;
|
|
211
|
+
recvWindow?: number;
|
|
212
|
+
timestamp?: number;
|
|
213
|
+
}
|
|
214
|
+
export interface OpenOrdersCancelAllWSAPIRequest {
|
|
215
|
+
symbol: string;
|
|
5
216
|
recvWindow?: number;
|
|
6
217
|
timestamp?: number;
|
|
7
|
-
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Order list request types
|
|
221
|
+
*/
|
|
222
|
+
export interface OrderListPlaceWSAPIRequest {
|
|
223
|
+
symbol: string;
|
|
224
|
+
side: 'BUY' | 'SELL';
|
|
225
|
+
price: numberInString;
|
|
226
|
+
quantity: numberInString;
|
|
227
|
+
listClientOrderId?: string;
|
|
228
|
+
limitClientOrderId?: string;
|
|
229
|
+
limitIcebergQty?: numberInString;
|
|
230
|
+
limitStrategyId?: number;
|
|
231
|
+
limitStrategyType?: number;
|
|
232
|
+
stopPrice?: numberInString;
|
|
233
|
+
trailingDelta?: number;
|
|
234
|
+
stopClientOrderId?: string;
|
|
235
|
+
stopLimitPrice?: numberInString;
|
|
236
|
+
stopLimitTimeInForce?: string;
|
|
237
|
+
stopIcebergQty?: numberInString;
|
|
238
|
+
stopStrategyId?: number;
|
|
239
|
+
stopStrategyType?: number;
|
|
240
|
+
newOrderRespType?: 'ACK' | 'RESULT' | 'FULL';
|
|
241
|
+
selfTradePreventionMode?: string;
|
|
242
|
+
recvWindow?: number;
|
|
243
|
+
timestamp?: number;
|
|
244
|
+
}
|
|
245
|
+
export interface OrderListPlaceOCOWSAPIRequest {
|
|
246
|
+
symbol: string;
|
|
247
|
+
side: 'BUY' | 'SELL';
|
|
248
|
+
quantity: numberInString;
|
|
249
|
+
listClientOrderId?: string;
|
|
250
|
+
aboveType: 'STOP_LOSS_LIMIT' | 'STOP_LOSS' | 'LIMIT_MAKER' | 'TAKE_PROFIT' | 'TAKE_PROFIT_LIMIT';
|
|
251
|
+
aboveClientOrderId?: string;
|
|
252
|
+
aboveIcebergQty?: numberInString;
|
|
253
|
+
abovePrice?: numberInString;
|
|
254
|
+
aboveStopPrice?: numberInString;
|
|
255
|
+
aboveTrailingDelta?: number;
|
|
256
|
+
aboveTimeInForce?: string;
|
|
257
|
+
aboveStrategyId?: number;
|
|
258
|
+
aboveStrategyType?: number;
|
|
259
|
+
belowType: 'STOP_LOSS' | 'STOP_LOSS_LIMIT' | 'TAKE_PROFIT' | 'TAKE_PROFIT_LIMIT' | 'LIMIT_MAKER';
|
|
260
|
+
belowClientOrderId?: string;
|
|
261
|
+
belowIcebergQty?: numberInString;
|
|
262
|
+
belowPrice?: numberInString;
|
|
263
|
+
belowStopPrice?: numberInString;
|
|
264
|
+
belowTrailingDelta?: number;
|
|
265
|
+
belowTimeInForce?: string;
|
|
266
|
+
belowStrategyId?: number;
|
|
267
|
+
belowStrategyType?: number;
|
|
268
|
+
newOrderRespType?: 'ACK' | 'RESULT' | 'FULL';
|
|
269
|
+
selfTradePreventionMode?: string;
|
|
270
|
+
recvWindow?: number;
|
|
271
|
+
timestamp?: number;
|
|
272
|
+
}
|
|
273
|
+
export interface OrderListPlaceOTOWSAPIRequest {
|
|
274
|
+
symbol: string;
|
|
275
|
+
listClientOrderId?: string;
|
|
276
|
+
newOrderRespType?: 'ACK' | 'RESULT' | 'FULL';
|
|
277
|
+
selfTradePreventionMode?: string;
|
|
278
|
+
workingType: 'LIMIT' | 'LIMIT_MAKER';
|
|
279
|
+
workingSide: 'BUY' | 'SELL';
|
|
280
|
+
workingClientOrderId?: string;
|
|
281
|
+
workingPrice: numberInString;
|
|
282
|
+
workingQuantity: numberInString;
|
|
283
|
+
workingIcebergQty?: numberInString;
|
|
284
|
+
workingTimeInForce?: string;
|
|
285
|
+
workingStrategyId?: number;
|
|
286
|
+
workingStrategyType?: number;
|
|
287
|
+
pendingType: string;
|
|
288
|
+
pendingSide: 'BUY' | 'SELL';
|
|
289
|
+
pendingClientOrderId?: string;
|
|
290
|
+
pendingPrice?: numberInString;
|
|
291
|
+
pendingStopPrice?: numberInString;
|
|
292
|
+
pendingTrailingDelta?: numberInString;
|
|
293
|
+
pendingQuantity: numberInString;
|
|
294
|
+
pendingIcebergQty?: numberInString;
|
|
295
|
+
pendingTimeInForce?: string;
|
|
296
|
+
pendingStrategyId?: number;
|
|
297
|
+
pendingStrategyType?: number;
|
|
298
|
+
recvWindow?: number;
|
|
299
|
+
timestamp?: number;
|
|
300
|
+
}
|
|
301
|
+
export interface OrderListPlaceOTOCOWSAPIRequest {
|
|
302
|
+
symbol: string;
|
|
303
|
+
listClientOrderId?: string;
|
|
304
|
+
newOrderRespType?: 'ACK' | 'RESULT' | 'FULL';
|
|
305
|
+
selfTradePreventionMode?: string;
|
|
306
|
+
workingType: 'LIMIT' | 'LIMIT_MAKER';
|
|
307
|
+
workingSide: 'BUY' | 'SELL';
|
|
308
|
+
workingClientOrderId?: string;
|
|
309
|
+
workingPrice: numberInString;
|
|
310
|
+
workingQuantity: numberInString;
|
|
311
|
+
workingIcebergQty?: numberInString;
|
|
312
|
+
workingTimeInForce?: string;
|
|
313
|
+
workingStrategyId?: number;
|
|
314
|
+
workingStrategyType?: number;
|
|
315
|
+
pendingSide: 'BUY' | 'SELL';
|
|
316
|
+
pendingQuantity: number | string;
|
|
317
|
+
pendingAboveType: 'STOP_LOSS_LIMIT' | 'STOP_LOSS' | 'LIMIT_MAKER' | 'TAKE_PROFIT' | 'TAKE_PROFIT_LIMIT';
|
|
318
|
+
pendingAboveClientOrderId?: string;
|
|
319
|
+
pendingAbovePrice?: numberInString;
|
|
320
|
+
pendingAboveStopPrice?: numberInString;
|
|
321
|
+
pendingAboveTrailingDelta?: numberInString;
|
|
322
|
+
pendingAboveIcebergQty?: numberInString;
|
|
323
|
+
pendingAboveTimeInForce?: string;
|
|
324
|
+
pendingAboveStrategyId?: number;
|
|
325
|
+
pendingAboveStrategyType?: number;
|
|
326
|
+
pendingBelowType: 'STOP_LOSS' | 'STOP_LOSS_LIMIT' | 'TAKE_PROFIT' | 'TAKE_PROFIT_LIMIT' | 'LIMIT_MAKER';
|
|
327
|
+
pendingBelowClientOrderId?: string;
|
|
328
|
+
pendingBelowPrice?: numberInString;
|
|
329
|
+
pendingBelowStopPrice?: numberInString;
|
|
330
|
+
pendingBelowTrailingDelta?: numberInString;
|
|
331
|
+
pendingBelowIcebergQty?: numberInString;
|
|
332
|
+
pendingBelowTimeInForce?: string;
|
|
333
|
+
pendingBelowStrategyId?: number;
|
|
334
|
+
pendingBelowStrategyType?: number;
|
|
335
|
+
recvWindow?: number;
|
|
336
|
+
timestamp?: number;
|
|
337
|
+
}
|
|
338
|
+
export interface OrderListStatusWSAPIRequest {
|
|
339
|
+
origClientOrderId?: string;
|
|
340
|
+
orderListId?: number;
|
|
341
|
+
recvWindow?: number;
|
|
342
|
+
timestamp?: number;
|
|
343
|
+
}
|
|
344
|
+
export interface OrderListCancelWSAPIRequest {
|
|
345
|
+
symbol: string;
|
|
346
|
+
orderListId?: number;
|
|
347
|
+
listClientOrderId?: string;
|
|
348
|
+
newClientOrderId?: string;
|
|
349
|
+
recvWindow?: number;
|
|
350
|
+
timestamp?: number;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* SOR request types
|
|
354
|
+
*/
|
|
355
|
+
export interface SOROrderPlaceWSAPIRequest {
|
|
356
|
+
symbol: string;
|
|
357
|
+
side: 'BUY' | 'SELL';
|
|
358
|
+
type: 'LIMIT' | 'MARKET';
|
|
359
|
+
timeInForce?: string;
|
|
360
|
+
price?: numberInString;
|
|
361
|
+
quantity: numberInString;
|
|
362
|
+
newClientOrderId?: string;
|
|
363
|
+
newOrderRespType?: 'ACK' | 'RESULT' | 'FULL';
|
|
364
|
+
icebergQty?: numberInString;
|
|
365
|
+
strategyId?: number;
|
|
366
|
+
strategyType?: number;
|
|
367
|
+
selfTradePreventionMode?: string;
|
|
368
|
+
timestamp?: number;
|
|
369
|
+
recvWindow?: number;
|
|
370
|
+
}
|
|
371
|
+
export interface SOROrderTestWSAPIRequest extends SOROrderPlaceWSAPIRequest {
|
|
372
|
+
computeCommissionRates?: boolean;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Futures market data request types
|
|
376
|
+
*/
|
|
377
|
+
export interface FuturesDepthWSAPIRequest {
|
|
378
|
+
symbol: string;
|
|
379
|
+
limit?: number;
|
|
380
|
+
}
|
|
381
|
+
export interface FuturesTickerPriceWSAPIRequest {
|
|
382
|
+
symbol?: string;
|
|
383
|
+
}
|
|
384
|
+
export interface FuturesTickerBookWSAPIRequest {
|
|
385
|
+
symbol?: string;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Futures trading request types
|
|
389
|
+
*/
|
|
390
|
+
export interface FuturesOrderModifyWSAPIRequest {
|
|
391
|
+
symbol: string;
|
|
392
|
+
orderId?: number;
|
|
393
|
+
origClientOrderId?: string;
|
|
394
|
+
side: 'BUY' | 'SELL';
|
|
395
|
+
quantity: numberInString;
|
|
396
|
+
price: numberInString;
|
|
397
|
+
priceMatch?: 'NONE' | 'OPPONENT' | 'OPPONENT_5' | 'OPPONENT_10' | 'OPPONENT_20' | 'QUEUE' | 'QUEUE_5' | 'QUEUE_10' | 'QUEUE_20';
|
|
398
|
+
origType?: string;
|
|
399
|
+
positionSide?: 'BOTH' | 'LONG' | 'SHORT';
|
|
400
|
+
recvWindow?: number;
|
|
401
|
+
timestamp?: number;
|
|
402
|
+
}
|
|
403
|
+
export interface FuturesOrderCancelWSAPIRequest {
|
|
404
|
+
symbol: string;
|
|
405
|
+
orderId?: number;
|
|
406
|
+
origClientOrderId?: string;
|
|
407
|
+
recvWindow?: number;
|
|
408
|
+
timestamp?: number;
|
|
409
|
+
}
|
|
410
|
+
export interface FuturesOrderStatusWSAPIRequest {
|
|
411
|
+
symbol: string;
|
|
412
|
+
orderId?: number;
|
|
413
|
+
origClientOrderId?: string;
|
|
414
|
+
recvWindow?: number;
|
|
415
|
+
timestamp: number;
|
|
416
|
+
}
|
|
417
|
+
export interface FuturesPositionWSAPIRequest {
|
|
418
|
+
symbol?: string;
|
|
419
|
+
recvWindow?: number;
|
|
420
|
+
timestamp: number;
|
|
421
|
+
}
|
|
422
|
+
export interface FuturesPositionV2WSAPIRequest {
|
|
423
|
+
symbol?: string;
|
|
424
|
+
recvWindow?: number;
|
|
425
|
+
timestamp: number;
|
|
426
|
+
}
|
|
427
|
+
export interface AccountStatusWSAPIRequest {
|
|
428
|
+
omitZeroBalances?: boolean;
|
|
429
|
+
recvWindow?: number;
|
|
430
|
+
timestamp: number;
|
|
431
|
+
}
|
|
432
|
+
export interface AccountCommissionWSAPIRequest {
|
|
433
|
+
symbol: string;
|
|
434
|
+
}
|