@binance/margin-trading 10.0.1 → 10.1.0
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/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +241 -129
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +242 -124
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
|
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
16
|
var name = "@binance/margin-trading";
|
|
17
|
-
var version = "10.0
|
|
17
|
+
var version = "10.1.0";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/rest-api/modules/account-api.ts
|
|
@@ -38,19 +38,22 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
38
38
|
adjustCrossMarginMaxLeverage: async (maxLeverage) => {
|
|
39
39
|
(0, __binance_common.assertParamExists)("adjustCrossMarginMaxLeverage", "maxLeverage", maxLeverage);
|
|
40
40
|
const localVarQueryParameter = {};
|
|
41
|
+
const localVarBodyParameter = {};
|
|
41
42
|
if (maxLeverage !== void 0 && maxLeverage !== null) localVarQueryParameter["maxLeverage"] = maxLeverage;
|
|
42
43
|
let _timeUnit;
|
|
43
44
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
44
45
|
return {
|
|
45
46
|
endpoint: "/sapi/v1/margin/max-leverage",
|
|
46
47
|
method: "POST",
|
|
47
|
-
|
|
48
|
+
queryParams: localVarQueryParameter,
|
|
49
|
+
bodyParams: localVarBodyParameter,
|
|
48
50
|
timeUnit: _timeUnit
|
|
49
51
|
};
|
|
50
52
|
},
|
|
51
53
|
disableIsolatedMarginAccount: async (symbol, recvWindow) => {
|
|
52
54
|
(0, __binance_common.assertParamExists)("disableIsolatedMarginAccount", "symbol", symbol);
|
|
53
55
|
const localVarQueryParameter = {};
|
|
56
|
+
const localVarBodyParameter = {};
|
|
54
57
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
55
58
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
56
59
|
let _timeUnit;
|
|
@@ -58,13 +61,15 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
58
61
|
return {
|
|
59
62
|
endpoint: "/sapi/v1/margin/isolated/account",
|
|
60
63
|
method: "DELETE",
|
|
61
|
-
|
|
64
|
+
queryParams: localVarQueryParameter,
|
|
65
|
+
bodyParams: localVarBodyParameter,
|
|
62
66
|
timeUnit: _timeUnit
|
|
63
67
|
};
|
|
64
68
|
},
|
|
65
69
|
enableIsolatedMarginAccount: async (symbol, recvWindow) => {
|
|
66
70
|
(0, __binance_common.assertParamExists)("enableIsolatedMarginAccount", "symbol", symbol);
|
|
67
71
|
const localVarQueryParameter = {};
|
|
72
|
+
const localVarBodyParameter = {};
|
|
68
73
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
69
74
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
70
75
|
let _timeUnit;
|
|
@@ -72,36 +77,42 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
72
77
|
return {
|
|
73
78
|
endpoint: "/sapi/v1/margin/isolated/account",
|
|
74
79
|
method: "POST",
|
|
75
|
-
|
|
80
|
+
queryParams: localVarQueryParameter,
|
|
81
|
+
bodyParams: localVarBodyParameter,
|
|
76
82
|
timeUnit: _timeUnit
|
|
77
83
|
};
|
|
78
84
|
},
|
|
79
85
|
getBnbBurnStatus: async (recvWindow) => {
|
|
80
86
|
const localVarQueryParameter = {};
|
|
87
|
+
const localVarBodyParameter = {};
|
|
81
88
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
82
89
|
let _timeUnit;
|
|
83
90
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
84
91
|
return {
|
|
85
92
|
endpoint: "/sapi/v1/bnbBurn",
|
|
86
93
|
method: "GET",
|
|
87
|
-
|
|
94
|
+
queryParams: localVarQueryParameter,
|
|
95
|
+
bodyParams: localVarBodyParameter,
|
|
88
96
|
timeUnit: _timeUnit
|
|
89
97
|
};
|
|
90
98
|
},
|
|
91
99
|
getSummaryOfMarginAccount: async (recvWindow) => {
|
|
92
100
|
const localVarQueryParameter = {};
|
|
101
|
+
const localVarBodyParameter = {};
|
|
93
102
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
94
103
|
let _timeUnit;
|
|
95
104
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
96
105
|
return {
|
|
97
106
|
endpoint: "/sapi/v1/margin/tradeCoeff",
|
|
98
107
|
method: "GET",
|
|
99
|
-
|
|
108
|
+
queryParams: localVarQueryParameter,
|
|
109
|
+
bodyParams: localVarBodyParameter,
|
|
100
110
|
timeUnit: _timeUnit
|
|
101
111
|
};
|
|
102
112
|
},
|
|
103
113
|
queryCrossIsolatedMarginCapitalFlow: async (asset, symbol, type, startTime, endTime, fromId, limit, recvWindow) => {
|
|
104
114
|
const localVarQueryParameter = {};
|
|
115
|
+
const localVarBodyParameter = {};
|
|
105
116
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
106
117
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
107
118
|
if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
|
|
@@ -115,24 +126,28 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
115
126
|
return {
|
|
116
127
|
endpoint: "/sapi/v1/margin/capital-flow",
|
|
117
128
|
method: "GET",
|
|
118
|
-
|
|
129
|
+
queryParams: localVarQueryParameter,
|
|
130
|
+
bodyParams: localVarBodyParameter,
|
|
119
131
|
timeUnit: _timeUnit
|
|
120
132
|
};
|
|
121
133
|
},
|
|
122
134
|
queryCrossMarginAccountDetails: async (recvWindow) => {
|
|
123
135
|
const localVarQueryParameter = {};
|
|
136
|
+
const localVarBodyParameter = {};
|
|
124
137
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
125
138
|
let _timeUnit;
|
|
126
139
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
127
140
|
return {
|
|
128
141
|
endpoint: "/sapi/v1/margin/account",
|
|
129
142
|
method: "GET",
|
|
130
|
-
|
|
143
|
+
queryParams: localVarQueryParameter,
|
|
144
|
+
bodyParams: localVarBodyParameter,
|
|
131
145
|
timeUnit: _timeUnit
|
|
132
146
|
};
|
|
133
147
|
},
|
|
134
148
|
queryCrossMarginFeeData: async (vipLevel, coin, recvWindow) => {
|
|
135
149
|
const localVarQueryParameter = {};
|
|
150
|
+
const localVarBodyParameter = {};
|
|
136
151
|
if (vipLevel !== void 0 && vipLevel !== null) localVarQueryParameter["vipLevel"] = vipLevel;
|
|
137
152
|
if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
|
|
138
153
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -141,24 +156,28 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
141
156
|
return {
|
|
142
157
|
endpoint: "/sapi/v1/margin/crossMarginData",
|
|
143
158
|
method: "GET",
|
|
144
|
-
|
|
159
|
+
queryParams: localVarQueryParameter,
|
|
160
|
+
bodyParams: localVarBodyParameter,
|
|
145
161
|
timeUnit: _timeUnit
|
|
146
162
|
};
|
|
147
163
|
},
|
|
148
164
|
queryEnabledIsolatedMarginAccountLimit: async (recvWindow) => {
|
|
149
165
|
const localVarQueryParameter = {};
|
|
166
|
+
const localVarBodyParameter = {};
|
|
150
167
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
151
168
|
let _timeUnit;
|
|
152
169
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
153
170
|
return {
|
|
154
171
|
endpoint: "/sapi/v1/margin/isolated/accountLimit",
|
|
155
172
|
method: "GET",
|
|
156
|
-
|
|
173
|
+
queryParams: localVarQueryParameter,
|
|
174
|
+
bodyParams: localVarBodyParameter,
|
|
157
175
|
timeUnit: _timeUnit
|
|
158
176
|
};
|
|
159
177
|
},
|
|
160
178
|
queryIsolatedMarginAccountInfo: async (symbols, recvWindow) => {
|
|
161
179
|
const localVarQueryParameter = {};
|
|
180
|
+
const localVarBodyParameter = {};
|
|
162
181
|
if (symbols !== void 0 && symbols !== null) localVarQueryParameter["symbols"] = symbols;
|
|
163
182
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
164
183
|
let _timeUnit;
|
|
@@ -166,12 +185,14 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
166
185
|
return {
|
|
167
186
|
endpoint: "/sapi/v1/margin/isolated/account",
|
|
168
187
|
method: "GET",
|
|
169
|
-
|
|
188
|
+
queryParams: localVarQueryParameter,
|
|
189
|
+
bodyParams: localVarBodyParameter,
|
|
170
190
|
timeUnit: _timeUnit
|
|
171
191
|
};
|
|
172
192
|
},
|
|
173
193
|
queryIsolatedMarginFeeData: async (vipLevel, symbol, recvWindow) => {
|
|
174
194
|
const localVarQueryParameter = {};
|
|
195
|
+
const localVarBodyParameter = {};
|
|
175
196
|
if (vipLevel !== void 0 && vipLevel !== null) localVarQueryParameter["vipLevel"] = vipLevel;
|
|
176
197
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
177
198
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -180,7 +201,8 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
180
201
|
return {
|
|
181
202
|
endpoint: "/sapi/v1/margin/isolatedMarginData",
|
|
182
203
|
method: "GET",
|
|
183
|
-
|
|
204
|
+
queryParams: localVarQueryParameter,
|
|
205
|
+
bodyParams: localVarBodyParameter,
|
|
184
206
|
timeUnit: _timeUnit
|
|
185
207
|
};
|
|
186
208
|
}
|
|
@@ -211,7 +233,7 @@ var AccountApi = class {
|
|
|
211
233
|
*/
|
|
212
234
|
async adjustCrossMarginMaxLeverage(requestParameters) {
|
|
213
235
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.adjustCrossMarginMaxLeverage(requestParameters?.maxLeverage);
|
|
214
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
236
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
215
237
|
}
|
|
216
238
|
/**
|
|
217
239
|
* Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24
|
|
@@ -228,7 +250,7 @@ var AccountApi = class {
|
|
|
228
250
|
*/
|
|
229
251
|
async disableIsolatedMarginAccount(requestParameters) {
|
|
230
252
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.disableIsolatedMarginAccount(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
231
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
253
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
232
254
|
}
|
|
233
255
|
/**
|
|
234
256
|
* Enable isolated margin account for a specific symbol(Only supports activation of previously disabled accounts).
|
|
@@ -244,7 +266,7 @@ var AccountApi = class {
|
|
|
244
266
|
*/
|
|
245
267
|
async enableIsolatedMarginAccount(requestParameters) {
|
|
246
268
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.enableIsolatedMarginAccount(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
247
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
269
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
248
270
|
}
|
|
249
271
|
/**
|
|
250
272
|
* Get BNB Burn Status
|
|
@@ -260,7 +282,7 @@ var AccountApi = class {
|
|
|
260
282
|
*/
|
|
261
283
|
async getBnbBurnStatus(requestParameters = {}) {
|
|
262
284
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBnbBurnStatus(requestParameters?.recvWindow);
|
|
263
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
285
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
264
286
|
}
|
|
265
287
|
/**
|
|
266
288
|
* Get personal margin level information
|
|
@@ -276,7 +298,7 @@ var AccountApi = class {
|
|
|
276
298
|
*/
|
|
277
299
|
async getSummaryOfMarginAccount(requestParameters = {}) {
|
|
278
300
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSummaryOfMarginAccount(requestParameters?.recvWindow);
|
|
279
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
301
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
280
302
|
}
|
|
281
303
|
/**
|
|
282
304
|
* Query Cross Isolated Margin Capital Flow
|
|
@@ -292,7 +314,7 @@ var AccountApi = class {
|
|
|
292
314
|
*/
|
|
293
315
|
async queryCrossIsolatedMarginCapitalFlow(requestParameters = {}) {
|
|
294
316
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossIsolatedMarginCapitalFlow(requestParameters?.asset, requestParameters?.symbol, requestParameters?.type, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.fromId, requestParameters?.limit, requestParameters?.recvWindow);
|
|
295
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
317
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
296
318
|
}
|
|
297
319
|
/**
|
|
298
320
|
* Query Cross Margin Account Details
|
|
@@ -308,7 +330,7 @@ var AccountApi = class {
|
|
|
308
330
|
*/
|
|
309
331
|
async queryCrossMarginAccountDetails(requestParameters = {}) {
|
|
310
332
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossMarginAccountDetails(requestParameters?.recvWindow);
|
|
311
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
333
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
312
334
|
}
|
|
313
335
|
/**
|
|
314
336
|
* Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
|
|
@@ -324,7 +346,7 @@ var AccountApi = class {
|
|
|
324
346
|
*/
|
|
325
347
|
async queryCrossMarginFeeData(requestParameters = {}) {
|
|
326
348
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossMarginFeeData(requestParameters?.vipLevel, requestParameters?.coin, requestParameters?.recvWindow);
|
|
327
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
349
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
328
350
|
}
|
|
329
351
|
/**
|
|
330
352
|
* Query enabled isolated margin account limit.
|
|
@@ -340,7 +362,7 @@ var AccountApi = class {
|
|
|
340
362
|
*/
|
|
341
363
|
async queryEnabledIsolatedMarginAccountLimit(requestParameters = {}) {
|
|
342
364
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryEnabledIsolatedMarginAccountLimit(requestParameters?.recvWindow);
|
|
343
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
365
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
344
366
|
}
|
|
345
367
|
/**
|
|
346
368
|
* Query Isolated Margin Account Info
|
|
@@ -359,7 +381,7 @@ var AccountApi = class {
|
|
|
359
381
|
*/
|
|
360
382
|
async queryIsolatedMarginAccountInfo(requestParameters = {}) {
|
|
361
383
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginAccountInfo(requestParameters?.symbols, requestParameters?.recvWindow);
|
|
362
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
384
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
363
385
|
}
|
|
364
386
|
/**
|
|
365
387
|
* Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
|
|
@@ -375,7 +397,7 @@ var AccountApi = class {
|
|
|
375
397
|
*/
|
|
376
398
|
async queryIsolatedMarginFeeData(requestParameters = {}) {
|
|
377
399
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginFeeData(requestParameters?.vipLevel, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
378
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
400
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
379
401
|
}
|
|
380
402
|
};
|
|
381
403
|
|
|
@@ -402,6 +424,7 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
402
424
|
(0, __binance_common.assertParamExists)("getFutureHourlyInterestRate", "assets", assets);
|
|
403
425
|
(0, __binance_common.assertParamExists)("getFutureHourlyInterestRate", "isIsolated", isIsolated);
|
|
404
426
|
const localVarQueryParameter = {};
|
|
427
|
+
const localVarBodyParameter = {};
|
|
405
428
|
if (assets !== void 0 && assets !== null) localVarQueryParameter["assets"] = assets;
|
|
406
429
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
407
430
|
let _timeUnit;
|
|
@@ -409,12 +432,14 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
409
432
|
return {
|
|
410
433
|
endpoint: "/sapi/v1/margin/next-hourly-interest-rate",
|
|
411
434
|
method: "GET",
|
|
412
|
-
|
|
435
|
+
queryParams: localVarQueryParameter,
|
|
436
|
+
bodyParams: localVarBodyParameter,
|
|
413
437
|
timeUnit: _timeUnit
|
|
414
438
|
};
|
|
415
439
|
},
|
|
416
440
|
getInterestHistory: async (asset, isolatedSymbol, startTime, endTime, current, size, recvWindow) => {
|
|
417
441
|
const localVarQueryParameter = {};
|
|
442
|
+
const localVarBodyParameter = {};
|
|
418
443
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
419
444
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
420
445
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
@@ -427,7 +452,8 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
427
452
|
return {
|
|
428
453
|
endpoint: "/sapi/v1/margin/interestHistory",
|
|
429
454
|
method: "GET",
|
|
430
|
-
|
|
455
|
+
queryParams: localVarQueryParameter,
|
|
456
|
+
bodyParams: localVarBodyParameter,
|
|
431
457
|
timeUnit: _timeUnit
|
|
432
458
|
};
|
|
433
459
|
},
|
|
@@ -438,6 +464,7 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
438
464
|
(0, __binance_common.assertParamExists)("marginAccountBorrowRepay", "amount", amount);
|
|
439
465
|
(0, __binance_common.assertParamExists)("marginAccountBorrowRepay", "type", type);
|
|
440
466
|
const localVarQueryParameter = {};
|
|
467
|
+
const localVarBodyParameter = {};
|
|
441
468
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
442
469
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
443
470
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
@@ -449,13 +476,15 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
449
476
|
return {
|
|
450
477
|
endpoint: "/sapi/v1/margin/borrow-repay",
|
|
451
478
|
method: "POST",
|
|
452
|
-
|
|
479
|
+
queryParams: localVarQueryParameter,
|
|
480
|
+
bodyParams: localVarBodyParameter,
|
|
453
481
|
timeUnit: _timeUnit
|
|
454
482
|
};
|
|
455
483
|
},
|
|
456
484
|
queryBorrowRepayRecordsInMarginAccount: async (type, asset, isolatedSymbol, txId, startTime, endTime, current, size, recvWindow) => {
|
|
457
485
|
(0, __binance_common.assertParamExists)("queryBorrowRepayRecordsInMarginAccount", "type", type);
|
|
458
486
|
const localVarQueryParameter = {};
|
|
487
|
+
const localVarBodyParameter = {};
|
|
459
488
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
460
489
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
461
490
|
if (txId !== void 0 && txId !== null) localVarQueryParameter["txId"] = txId;
|
|
@@ -470,13 +499,15 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
470
499
|
return {
|
|
471
500
|
endpoint: "/sapi/v1/margin/borrow-repay",
|
|
472
501
|
method: "GET",
|
|
473
|
-
|
|
502
|
+
queryParams: localVarQueryParameter,
|
|
503
|
+
bodyParams: localVarBodyParameter,
|
|
474
504
|
timeUnit: _timeUnit
|
|
475
505
|
};
|
|
476
506
|
},
|
|
477
507
|
queryMarginInterestRateHistory: async (asset, vipLevel, startTime, endTime, recvWindow) => {
|
|
478
508
|
(0, __binance_common.assertParamExists)("queryMarginInterestRateHistory", "asset", asset);
|
|
479
509
|
const localVarQueryParameter = {};
|
|
510
|
+
const localVarBodyParameter = {};
|
|
480
511
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
481
512
|
if (vipLevel !== void 0 && vipLevel !== null) localVarQueryParameter["vipLevel"] = vipLevel;
|
|
482
513
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
@@ -487,13 +518,15 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
487
518
|
return {
|
|
488
519
|
endpoint: "/sapi/v1/margin/interestRateHistory",
|
|
489
520
|
method: "GET",
|
|
490
|
-
|
|
521
|
+
queryParams: localVarQueryParameter,
|
|
522
|
+
bodyParams: localVarBodyParameter,
|
|
491
523
|
timeUnit: _timeUnit
|
|
492
524
|
};
|
|
493
525
|
},
|
|
494
526
|
queryMaxBorrow: async (asset, isolatedSymbol, recvWindow) => {
|
|
495
527
|
(0, __binance_common.assertParamExists)("queryMaxBorrow", "asset", asset);
|
|
496
528
|
const localVarQueryParameter = {};
|
|
529
|
+
const localVarBodyParameter = {};
|
|
497
530
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
498
531
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
499
532
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -502,7 +535,8 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
502
535
|
return {
|
|
503
536
|
endpoint: "/sapi/v1/margin/maxBorrowable",
|
|
504
537
|
method: "GET",
|
|
505
|
-
|
|
538
|
+
queryParams: localVarQueryParameter,
|
|
539
|
+
bodyParams: localVarBodyParameter,
|
|
506
540
|
timeUnit: _timeUnit
|
|
507
541
|
};
|
|
508
542
|
}
|
|
@@ -531,7 +565,7 @@ var BorrowRepayApi = class {
|
|
|
531
565
|
*/
|
|
532
566
|
async getFutureHourlyInterestRate(requestParameters) {
|
|
533
567
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFutureHourlyInterestRate(requestParameters?.assets, requestParameters?.isIsolated);
|
|
534
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
568
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
535
569
|
}
|
|
536
570
|
/**
|
|
537
571
|
* Get Interest History
|
|
@@ -560,7 +594,7 @@ var BorrowRepayApi = class {
|
|
|
560
594
|
*/
|
|
561
595
|
async getInterestHistory(requestParameters = {}) {
|
|
562
596
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getInterestHistory(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
563
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
597
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
564
598
|
}
|
|
565
599
|
/**
|
|
566
600
|
* Margin account borrow/repay(MARGIN)
|
|
@@ -576,7 +610,7 @@ var BorrowRepayApi = class {
|
|
|
576
610
|
*/
|
|
577
611
|
async marginAccountBorrowRepay(requestParameters) {
|
|
578
612
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountBorrowRepay(requestParameters?.asset, requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.amount, requestParameters?.type, requestParameters?.recvWindow);
|
|
579
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
613
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
580
614
|
}
|
|
581
615
|
/**
|
|
582
616
|
* Query borrow/repay records in Margin account
|
|
@@ -597,7 +631,7 @@ var BorrowRepayApi = class {
|
|
|
597
631
|
*/
|
|
598
632
|
async queryBorrowRepayRecordsInMarginAccount(requestParameters) {
|
|
599
633
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryBorrowRepayRecordsInMarginAccount(requestParameters?.type, requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.txId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
600
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
634
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
601
635
|
}
|
|
602
636
|
/**
|
|
603
637
|
* Query Margin Interest Rate History
|
|
@@ -613,7 +647,7 @@ var BorrowRepayApi = class {
|
|
|
613
647
|
*/
|
|
614
648
|
async queryMarginInterestRateHistory(requestParameters) {
|
|
615
649
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginInterestRateHistory(requestParameters?.asset, requestParameters?.vipLevel, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
616
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
650
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
617
651
|
}
|
|
618
652
|
/**
|
|
619
653
|
* Query Max Borrow
|
|
@@ -632,7 +666,7 @@ var BorrowRepayApi = class {
|
|
|
632
666
|
*/
|
|
633
667
|
async queryMaxBorrow(requestParameters) {
|
|
634
668
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMaxBorrow(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
|
|
635
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
669
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
636
670
|
}
|
|
637
671
|
};
|
|
638
672
|
|
|
@@ -657,29 +691,34 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
657
691
|
return {
|
|
658
692
|
crossMarginCollateralRatio: async () => {
|
|
659
693
|
const localVarQueryParameter = {};
|
|
694
|
+
const localVarBodyParameter = {};
|
|
660
695
|
let _timeUnit;
|
|
661
696
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
662
697
|
return {
|
|
663
698
|
endpoint: "/sapi/v1/margin/crossMarginCollateralRatio",
|
|
664
699
|
method: "GET",
|
|
665
|
-
|
|
700
|
+
queryParams: localVarQueryParameter,
|
|
701
|
+
bodyParams: localVarBodyParameter,
|
|
666
702
|
timeUnit: _timeUnit
|
|
667
703
|
};
|
|
668
704
|
},
|
|
669
705
|
getAllCrossMarginPairs: async (symbol) => {
|
|
670
706
|
const localVarQueryParameter = {};
|
|
707
|
+
const localVarBodyParameter = {};
|
|
671
708
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
672
709
|
let _timeUnit;
|
|
673
710
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
674
711
|
return {
|
|
675
712
|
endpoint: "/sapi/v1/margin/allPairs",
|
|
676
713
|
method: "GET",
|
|
677
|
-
|
|
714
|
+
queryParams: localVarQueryParameter,
|
|
715
|
+
bodyParams: localVarBodyParameter,
|
|
678
716
|
timeUnit: _timeUnit
|
|
679
717
|
};
|
|
680
718
|
},
|
|
681
719
|
getAllIsolatedMarginSymbol: async (symbol, recvWindow) => {
|
|
682
720
|
const localVarQueryParameter = {};
|
|
721
|
+
const localVarBodyParameter = {};
|
|
683
722
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
684
723
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
685
724
|
let _timeUnit;
|
|
@@ -687,60 +726,70 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
687
726
|
return {
|
|
688
727
|
endpoint: "/sapi/v1/margin/isolated/allPairs",
|
|
689
728
|
method: "GET",
|
|
690
|
-
|
|
729
|
+
queryParams: localVarQueryParameter,
|
|
730
|
+
bodyParams: localVarBodyParameter,
|
|
691
731
|
timeUnit: _timeUnit
|
|
692
732
|
};
|
|
693
733
|
},
|
|
694
734
|
getAllMarginAssets: async (asset) => {
|
|
695
735
|
const localVarQueryParameter = {};
|
|
736
|
+
const localVarBodyParameter = {};
|
|
696
737
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
697
738
|
let _timeUnit;
|
|
698
739
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
699
740
|
return {
|
|
700
741
|
endpoint: "/sapi/v1/margin/allAssets",
|
|
701
742
|
method: "GET",
|
|
702
|
-
|
|
743
|
+
queryParams: localVarQueryParameter,
|
|
744
|
+
bodyParams: localVarBodyParameter,
|
|
703
745
|
timeUnit: _timeUnit
|
|
704
746
|
};
|
|
705
747
|
},
|
|
706
748
|
getDelistSchedule: async (recvWindow) => {
|
|
707
749
|
const localVarQueryParameter = {};
|
|
750
|
+
const localVarBodyParameter = {};
|
|
708
751
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
709
752
|
let _timeUnit;
|
|
710
753
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
711
754
|
return {
|
|
712
755
|
endpoint: "/sapi/v1/margin/delist-schedule",
|
|
713
756
|
method: "GET",
|
|
714
|
-
|
|
757
|
+
queryParams: localVarQueryParameter,
|
|
758
|
+
bodyParams: localVarBodyParameter,
|
|
715
759
|
timeUnit: _timeUnit
|
|
716
760
|
};
|
|
717
761
|
},
|
|
718
762
|
getLimitPricePairs: async () => {
|
|
719
763
|
const localVarQueryParameter = {};
|
|
764
|
+
const localVarBodyParameter = {};
|
|
720
765
|
let _timeUnit;
|
|
721
766
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
722
767
|
return {
|
|
723
768
|
endpoint: "/sapi/v1/margin/limit-price-pairs",
|
|
724
769
|
method: "GET",
|
|
725
|
-
|
|
770
|
+
queryParams: localVarQueryParameter,
|
|
771
|
+
bodyParams: localVarBodyParameter,
|
|
726
772
|
timeUnit: _timeUnit
|
|
727
773
|
};
|
|
728
774
|
},
|
|
729
775
|
getListSchedule: async (recvWindow) => {
|
|
730
776
|
const localVarQueryParameter = {};
|
|
777
|
+
const localVarBodyParameter = {};
|
|
731
778
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
732
779
|
let _timeUnit;
|
|
733
780
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
734
781
|
return {
|
|
735
782
|
endpoint: "/sapi/v1/margin/list-schedule",
|
|
736
783
|
method: "GET",
|
|
737
|
-
|
|
784
|
+
queryParams: localVarQueryParameter,
|
|
785
|
+
bodyParams: localVarBodyParameter,
|
|
738
786
|
timeUnit: _timeUnit
|
|
739
787
|
};
|
|
740
788
|
},
|
|
741
789
|
queryIsolatedMarginTierData: async (symbol, tier, recvWindow) => {
|
|
742
790
|
(0, __binance_common.assertParamExists)("queryIsolatedMarginTierData", "symbol", symbol);
|
|
743
791
|
const localVarQueryParameter = {};
|
|
792
|
+
const localVarBodyParameter = {};
|
|
744
793
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
745
794
|
if (tier !== void 0 && tier !== null) localVarQueryParameter["tier"] = tier;
|
|
746
795
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -749,44 +798,51 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
749
798
|
return {
|
|
750
799
|
endpoint: "/sapi/v1/margin/isolatedMarginTier",
|
|
751
800
|
method: "GET",
|
|
752
|
-
|
|
801
|
+
queryParams: localVarQueryParameter,
|
|
802
|
+
bodyParams: localVarBodyParameter,
|
|
753
803
|
timeUnit: _timeUnit
|
|
754
804
|
};
|
|
755
805
|
},
|
|
756
806
|
queryLiabilityCoinLeverageBracketInCrossMarginProMode: async () => {
|
|
757
807
|
const localVarQueryParameter = {};
|
|
808
|
+
const localVarBodyParameter = {};
|
|
758
809
|
let _timeUnit;
|
|
759
810
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
760
811
|
return {
|
|
761
812
|
endpoint: "/sapi/v1/margin/leverageBracket",
|
|
762
813
|
method: "GET",
|
|
763
|
-
|
|
814
|
+
queryParams: localVarQueryParameter,
|
|
815
|
+
bodyParams: localVarBodyParameter,
|
|
764
816
|
timeUnit: _timeUnit
|
|
765
817
|
};
|
|
766
818
|
},
|
|
767
819
|
queryMarginAvailableInventory: async (type) => {
|
|
768
820
|
(0, __binance_common.assertParamExists)("queryMarginAvailableInventory", "type", type);
|
|
769
821
|
const localVarQueryParameter = {};
|
|
822
|
+
const localVarBodyParameter = {};
|
|
770
823
|
if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
|
|
771
824
|
let _timeUnit;
|
|
772
825
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
773
826
|
return {
|
|
774
827
|
endpoint: "/sapi/v1/margin/available-inventory",
|
|
775
828
|
method: "GET",
|
|
776
|
-
|
|
829
|
+
queryParams: localVarQueryParameter,
|
|
830
|
+
bodyParams: localVarBodyParameter,
|
|
777
831
|
timeUnit: _timeUnit
|
|
778
832
|
};
|
|
779
833
|
},
|
|
780
834
|
queryMarginPriceindex: async (symbol) => {
|
|
781
835
|
(0, __binance_common.assertParamExists)("queryMarginPriceindex", "symbol", symbol);
|
|
782
836
|
const localVarQueryParameter = {};
|
|
837
|
+
const localVarBodyParameter = {};
|
|
783
838
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
784
839
|
let _timeUnit;
|
|
785
840
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
786
841
|
return {
|
|
787
842
|
endpoint: "/sapi/v1/margin/priceIndex",
|
|
788
843
|
method: "GET",
|
|
789
|
-
|
|
844
|
+
queryParams: localVarQueryParameter,
|
|
845
|
+
bodyParams: localVarBodyParameter,
|
|
790
846
|
timeUnit: _timeUnit
|
|
791
847
|
};
|
|
792
848
|
}
|
|
@@ -814,7 +870,7 @@ var MarketDataApi = class {
|
|
|
814
870
|
*/
|
|
815
871
|
async crossMarginCollateralRatio() {
|
|
816
872
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.crossMarginCollateralRatio();
|
|
817
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
873
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
818
874
|
}
|
|
819
875
|
/**
|
|
820
876
|
* Get All Cross Margin Pairs
|
|
@@ -830,7 +886,7 @@ var MarketDataApi = class {
|
|
|
830
886
|
*/
|
|
831
887
|
async getAllCrossMarginPairs(requestParameters = {}) {
|
|
832
888
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllCrossMarginPairs(requestParameters?.symbol);
|
|
833
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
889
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
834
890
|
}
|
|
835
891
|
/**
|
|
836
892
|
* Get All Isolated Margin Symbol
|
|
@@ -846,7 +902,7 @@ var MarketDataApi = class {
|
|
|
846
902
|
*/
|
|
847
903
|
async getAllIsolatedMarginSymbol(requestParameters = {}) {
|
|
848
904
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllIsolatedMarginSymbol(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
849
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
905
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
850
906
|
}
|
|
851
907
|
/**
|
|
852
908
|
* Get All Margin Assets.
|
|
@@ -862,7 +918,7 @@ var MarketDataApi = class {
|
|
|
862
918
|
*/
|
|
863
919
|
async getAllMarginAssets(requestParameters = {}) {
|
|
864
920
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllMarginAssets(requestParameters?.asset);
|
|
865
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
921
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
866
922
|
}
|
|
867
923
|
/**
|
|
868
924
|
* Get tokens or symbols delist schedule for cross margin and isolated margin
|
|
@@ -878,7 +934,7 @@ var MarketDataApi = class {
|
|
|
878
934
|
*/
|
|
879
935
|
async getDelistSchedule(requestParameters = {}) {
|
|
880
936
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDelistSchedule(requestParameters?.recvWindow);
|
|
881
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
937
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
882
938
|
}
|
|
883
939
|
/**
|
|
884
940
|
* Query trading pairs with restriction on limit price range.
|
|
@@ -898,7 +954,7 @@ var MarketDataApi = class {
|
|
|
898
954
|
*/
|
|
899
955
|
async getLimitPricePairs() {
|
|
900
956
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLimitPricePairs();
|
|
901
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
957
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
902
958
|
}
|
|
903
959
|
/**
|
|
904
960
|
* Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin.
|
|
@@ -914,7 +970,7 @@ var MarketDataApi = class {
|
|
|
914
970
|
*/
|
|
915
971
|
async getListSchedule(requestParameters = {}) {
|
|
916
972
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getListSchedule(requestParameters?.recvWindow);
|
|
917
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
973
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
918
974
|
}
|
|
919
975
|
/**
|
|
920
976
|
* Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
|
|
@@ -930,7 +986,7 @@ var MarketDataApi = class {
|
|
|
930
986
|
*/
|
|
931
987
|
async queryIsolatedMarginTierData(requestParameters) {
|
|
932
988
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginTierData(requestParameters?.symbol, requestParameters?.tier, requestParameters?.recvWindow);
|
|
933
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
989
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
934
990
|
}
|
|
935
991
|
/**
|
|
936
992
|
* Liability Coin Leverage Bracket in Cross Margin Pro Mode
|
|
@@ -945,7 +1001,7 @@ var MarketDataApi = class {
|
|
|
945
1001
|
*/
|
|
946
1002
|
async queryLiabilityCoinLeverageBracketInCrossMarginProMode() {
|
|
947
1003
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLiabilityCoinLeverageBracketInCrossMarginProMode();
|
|
948
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1004
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
949
1005
|
}
|
|
950
1006
|
/**
|
|
951
1007
|
* Margin available Inventory query
|
|
@@ -961,7 +1017,7 @@ var MarketDataApi = class {
|
|
|
961
1017
|
*/
|
|
962
1018
|
async queryMarginAvailableInventory(requestParameters) {
|
|
963
1019
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAvailableInventory(requestParameters?.type);
|
|
964
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1020
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
965
1021
|
}
|
|
966
1022
|
/**
|
|
967
1023
|
* Query Margin PriceIndex
|
|
@@ -977,7 +1033,7 @@ var MarketDataApi = class {
|
|
|
977
1033
|
*/
|
|
978
1034
|
async queryMarginPriceindex(requestParameters) {
|
|
979
1035
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginPriceindex(requestParameters?.symbol);
|
|
980
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1036
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
981
1037
|
}
|
|
982
1038
|
};
|
|
983
1039
|
|
|
@@ -1002,36 +1058,42 @@ const RiskDataStreamApiAxiosParamCreator = function(configuration) {
|
|
|
1002
1058
|
return {
|
|
1003
1059
|
closeUserDataStream: async () => {
|
|
1004
1060
|
const localVarQueryParameter = {};
|
|
1061
|
+
const localVarBodyParameter = {};
|
|
1005
1062
|
let _timeUnit;
|
|
1006
1063
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1007
1064
|
return {
|
|
1008
1065
|
endpoint: "/sapi/v1/margin/listen-key",
|
|
1009
1066
|
method: "DELETE",
|
|
1010
|
-
|
|
1067
|
+
queryParams: localVarQueryParameter,
|
|
1068
|
+
bodyParams: localVarBodyParameter,
|
|
1011
1069
|
timeUnit: _timeUnit
|
|
1012
1070
|
};
|
|
1013
1071
|
},
|
|
1014
1072
|
keepaliveUserDataStream: async (listenKey) => {
|
|
1015
1073
|
(0, __binance_common.assertParamExists)("keepaliveUserDataStream", "listenKey", listenKey);
|
|
1016
1074
|
const localVarQueryParameter = {};
|
|
1075
|
+
const localVarBodyParameter = {};
|
|
1017
1076
|
if (listenKey !== void 0 && listenKey !== null) localVarQueryParameter["listenKey"] = listenKey;
|
|
1018
1077
|
let _timeUnit;
|
|
1019
1078
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1020
1079
|
return {
|
|
1021
1080
|
endpoint: "/sapi/v1/margin/listen-key",
|
|
1022
1081
|
method: "PUT",
|
|
1023
|
-
|
|
1082
|
+
queryParams: localVarQueryParameter,
|
|
1083
|
+
bodyParams: localVarBodyParameter,
|
|
1024
1084
|
timeUnit: _timeUnit
|
|
1025
1085
|
};
|
|
1026
1086
|
},
|
|
1027
1087
|
startUserDataStream: async () => {
|
|
1028
1088
|
const localVarQueryParameter = {};
|
|
1089
|
+
const localVarBodyParameter = {};
|
|
1029
1090
|
let _timeUnit;
|
|
1030
1091
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1031
1092
|
return {
|
|
1032
1093
|
endpoint: "/sapi/v1/margin/listen-key",
|
|
1033
1094
|
method: "POST",
|
|
1034
|
-
|
|
1095
|
+
queryParams: localVarQueryParameter,
|
|
1096
|
+
bodyParams: localVarBodyParameter,
|
|
1035
1097
|
timeUnit: _timeUnit
|
|
1036
1098
|
};
|
|
1037
1099
|
}
|
|
@@ -1059,7 +1121,7 @@ var RiskDataStreamApi = class {
|
|
|
1059
1121
|
*/
|
|
1060
1122
|
async closeUserDataStream() {
|
|
1061
1123
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.closeUserDataStream();
|
|
1062
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1124
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1063
1125
|
}
|
|
1064
1126
|
/**
|
|
1065
1127
|
* Keepalive a user data stream to prevent a time out.
|
|
@@ -1075,7 +1137,7 @@ var RiskDataStreamApi = class {
|
|
|
1075
1137
|
*/
|
|
1076
1138
|
async keepaliveUserDataStream(requestParameters) {
|
|
1077
1139
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.keepaliveUserDataStream(requestParameters?.listenKey);
|
|
1078
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1140
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1079
1141
|
}
|
|
1080
1142
|
/**
|
|
1081
1143
|
* Start a new user data stream.
|
|
@@ -1090,7 +1152,7 @@ var RiskDataStreamApi = class {
|
|
|
1090
1152
|
*/
|
|
1091
1153
|
async startUserDataStream() {
|
|
1092
1154
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.startUserDataStream();
|
|
1093
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1155
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1094
1156
|
}
|
|
1095
1157
|
};
|
|
1096
1158
|
|
|
@@ -1116,6 +1178,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1116
1178
|
createSpecialKey: async (apiName, symbol, ip, publicKey, permissionMode, recvWindow) => {
|
|
1117
1179
|
(0, __binance_common.assertParamExists)("createSpecialKey", "apiName", apiName);
|
|
1118
1180
|
const localVarQueryParameter = {};
|
|
1181
|
+
const localVarBodyParameter = {};
|
|
1119
1182
|
if (apiName !== void 0 && apiName !== null) localVarQueryParameter["apiName"] = apiName;
|
|
1120
1183
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1121
1184
|
if (ip !== void 0 && ip !== null) localVarQueryParameter["ip"] = ip;
|
|
@@ -1127,12 +1190,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1127
1190
|
return {
|
|
1128
1191
|
endpoint: "/sapi/v1/margin/apiKey",
|
|
1129
1192
|
method: "POST",
|
|
1130
|
-
|
|
1193
|
+
queryParams: localVarQueryParameter,
|
|
1194
|
+
bodyParams: localVarBodyParameter,
|
|
1131
1195
|
timeUnit: _timeUnit
|
|
1132
1196
|
};
|
|
1133
1197
|
},
|
|
1134
1198
|
deleteSpecialKey: async (apiName, symbol, recvWindow) => {
|
|
1135
1199
|
const localVarQueryParameter = {};
|
|
1200
|
+
const localVarBodyParameter = {};
|
|
1136
1201
|
if (apiName !== void 0 && apiName !== null) localVarQueryParameter["apiName"] = apiName;
|
|
1137
1202
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1138
1203
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1141,13 +1206,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1141
1206
|
return {
|
|
1142
1207
|
endpoint: "/sapi/v1/margin/apiKey",
|
|
1143
1208
|
method: "DELETE",
|
|
1144
|
-
|
|
1209
|
+
queryParams: localVarQueryParameter,
|
|
1210
|
+
bodyParams: localVarBodyParameter,
|
|
1145
1211
|
timeUnit: _timeUnit
|
|
1146
1212
|
};
|
|
1147
1213
|
},
|
|
1148
1214
|
editIpForSpecialKey: async (ip, symbol, recvWindow) => {
|
|
1149
1215
|
(0, __binance_common.assertParamExists)("editIpForSpecialKey", "ip", ip);
|
|
1150
1216
|
const localVarQueryParameter = {};
|
|
1217
|
+
const localVarBodyParameter = {};
|
|
1151
1218
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1152
1219
|
if (ip !== void 0 && ip !== null) localVarQueryParameter["ip"] = ip;
|
|
1153
1220
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1156,12 +1223,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1156
1223
|
return {
|
|
1157
1224
|
endpoint: "/sapi/v1/margin/apiKey/ip",
|
|
1158
1225
|
method: "PUT",
|
|
1159
|
-
|
|
1226
|
+
queryParams: localVarQueryParameter,
|
|
1227
|
+
bodyParams: localVarBodyParameter,
|
|
1160
1228
|
timeUnit: _timeUnit
|
|
1161
1229
|
};
|
|
1162
1230
|
},
|
|
1163
1231
|
getForceLiquidationRecord: async (startTime, endTime, isolatedSymbol, current, size, recvWindow) => {
|
|
1164
1232
|
const localVarQueryParameter = {};
|
|
1233
|
+
const localVarBodyParameter = {};
|
|
1165
1234
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
1166
1235
|
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
1167
1236
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
@@ -1173,19 +1242,22 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1173
1242
|
return {
|
|
1174
1243
|
endpoint: "/sapi/v1/margin/forceLiquidationRec",
|
|
1175
1244
|
method: "GET",
|
|
1176
|
-
|
|
1245
|
+
queryParams: localVarQueryParameter,
|
|
1246
|
+
bodyParams: localVarBodyParameter,
|
|
1177
1247
|
timeUnit: _timeUnit
|
|
1178
1248
|
};
|
|
1179
1249
|
},
|
|
1180
1250
|
getSmallLiabilityExchangeCoinList: async (recvWindow) => {
|
|
1181
1251
|
const localVarQueryParameter = {};
|
|
1252
|
+
const localVarBodyParameter = {};
|
|
1182
1253
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1183
1254
|
let _timeUnit;
|
|
1184
1255
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1185
1256
|
return {
|
|
1186
1257
|
endpoint: "/sapi/v1/margin/exchange-small-liability",
|
|
1187
1258
|
method: "GET",
|
|
1188
|
-
|
|
1259
|
+
queryParams: localVarQueryParameter,
|
|
1260
|
+
bodyParams: localVarBodyParameter,
|
|
1189
1261
|
timeUnit: _timeUnit
|
|
1190
1262
|
};
|
|
1191
1263
|
},
|
|
@@ -1193,6 +1265,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1193
1265
|
(0, __binance_common.assertParamExists)("getSmallLiabilityExchangeHistory", "current", current);
|
|
1194
1266
|
(0, __binance_common.assertParamExists)("getSmallLiabilityExchangeHistory", "size", size);
|
|
1195
1267
|
const localVarQueryParameter = {};
|
|
1268
|
+
const localVarBodyParameter = {};
|
|
1196
1269
|
if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
|
|
1197
1270
|
if (size !== void 0 && size !== null) localVarQueryParameter["size"] = size;
|
|
1198
1271
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
@@ -1203,13 +1276,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1203
1276
|
return {
|
|
1204
1277
|
endpoint: "/sapi/v1/margin/exchange-small-liability-history",
|
|
1205
1278
|
method: "GET",
|
|
1206
|
-
|
|
1279
|
+
queryParams: localVarQueryParameter,
|
|
1280
|
+
bodyParams: localVarBodyParameter,
|
|
1207
1281
|
timeUnit: _timeUnit
|
|
1208
1282
|
};
|
|
1209
1283
|
},
|
|
1210
1284
|
marginAccountCancelAllOpenOrdersOnASymbol: async (symbol, isIsolated, recvWindow) => {
|
|
1211
1285
|
(0, __binance_common.assertParamExists)("marginAccountCancelAllOpenOrdersOnASymbol", "symbol", symbol);
|
|
1212
1286
|
const localVarQueryParameter = {};
|
|
1287
|
+
const localVarBodyParameter = {};
|
|
1213
1288
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1214
1289
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1215
1290
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1218,13 +1293,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1218
1293
|
return {
|
|
1219
1294
|
endpoint: "/sapi/v1/margin/openOrders",
|
|
1220
1295
|
method: "DELETE",
|
|
1221
|
-
|
|
1296
|
+
queryParams: localVarQueryParameter,
|
|
1297
|
+
bodyParams: localVarBodyParameter,
|
|
1222
1298
|
timeUnit: _timeUnit
|
|
1223
1299
|
};
|
|
1224
1300
|
},
|
|
1225
1301
|
marginAccountCancelOco: async (symbol, isIsolated, orderListId, listClientOrderId, newClientOrderId, recvWindow) => {
|
|
1226
1302
|
(0, __binance_common.assertParamExists)("marginAccountCancelOco", "symbol", symbol);
|
|
1227
1303
|
const localVarQueryParameter = {};
|
|
1304
|
+
const localVarBodyParameter = {};
|
|
1228
1305
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1229
1306
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1230
1307
|
if (orderListId !== void 0 && orderListId !== null) localVarQueryParameter["orderListId"] = orderListId;
|
|
@@ -1236,13 +1313,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1236
1313
|
return {
|
|
1237
1314
|
endpoint: "/sapi/v1/margin/orderList",
|
|
1238
1315
|
method: "DELETE",
|
|
1239
|
-
|
|
1316
|
+
queryParams: localVarQueryParameter,
|
|
1317
|
+
bodyParams: localVarBodyParameter,
|
|
1240
1318
|
timeUnit: _timeUnit
|
|
1241
1319
|
};
|
|
1242
1320
|
},
|
|
1243
1321
|
marginAccountCancelOrder: async (symbol, isIsolated, orderId, origClientOrderId, newClientOrderId, recvWindow) => {
|
|
1244
1322
|
(0, __binance_common.assertParamExists)("marginAccountCancelOrder", "symbol", symbol);
|
|
1245
1323
|
const localVarQueryParameter = {};
|
|
1324
|
+
const localVarBodyParameter = {};
|
|
1246
1325
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1247
1326
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1248
1327
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
@@ -1254,7 +1333,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1254
1333
|
return {
|
|
1255
1334
|
endpoint: "/sapi/v1/margin/order",
|
|
1256
1335
|
method: "DELETE",
|
|
1257
|
-
|
|
1336
|
+
queryParams: localVarQueryParameter,
|
|
1337
|
+
bodyParams: localVarBodyParameter,
|
|
1258
1338
|
timeUnit: _timeUnit
|
|
1259
1339
|
};
|
|
1260
1340
|
},
|
|
@@ -1265,6 +1345,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1265
1345
|
(0, __binance_common.assertParamExists)("marginAccountNewOco", "price", price);
|
|
1266
1346
|
(0, __binance_common.assertParamExists)("marginAccountNewOco", "stopPrice", stopPrice);
|
|
1267
1347
|
const localVarQueryParameter = {};
|
|
1348
|
+
const localVarBodyParameter = {};
|
|
1268
1349
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1269
1350
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1270
1351
|
if (listClientOrderId !== void 0 && listClientOrderId !== null) localVarQueryParameter["listClientOrderId"] = listClientOrderId;
|
|
@@ -1288,7 +1369,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1288
1369
|
return {
|
|
1289
1370
|
endpoint: "/sapi/v1/margin/order/oco",
|
|
1290
1371
|
method: "POST",
|
|
1291
|
-
|
|
1372
|
+
queryParams: localVarQueryParameter,
|
|
1373
|
+
bodyParams: localVarBodyParameter,
|
|
1292
1374
|
timeUnit: _timeUnit
|
|
1293
1375
|
};
|
|
1294
1376
|
},
|
|
@@ -1297,6 +1379,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1297
1379
|
(0, __binance_common.assertParamExists)("marginAccountNewOrder", "side", side);
|
|
1298
1380
|
(0, __binance_common.assertParamExists)("marginAccountNewOrder", "type", type);
|
|
1299
1381
|
const localVarQueryParameter = {};
|
|
1382
|
+
const localVarBodyParameter = {};
|
|
1300
1383
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1301
1384
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1302
1385
|
if (side !== void 0 && side !== null) localVarQueryParameter["side"] = side;
|
|
@@ -1318,7 +1401,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1318
1401
|
return {
|
|
1319
1402
|
endpoint: "/sapi/v1/margin/order",
|
|
1320
1403
|
method: "POST",
|
|
1321
|
-
|
|
1404
|
+
queryParams: localVarQueryParameter,
|
|
1405
|
+
bodyParams: localVarBodyParameter,
|
|
1322
1406
|
timeUnit: _timeUnit
|
|
1323
1407
|
};
|
|
1324
1408
|
},
|
|
@@ -1333,6 +1417,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1333
1417
|
(0, __binance_common.assertParamExists)("marginAccountNewOto", "pendingSide", pendingSide);
|
|
1334
1418
|
(0, __binance_common.assertParamExists)("marginAccountNewOto", "pendingQuantity", pendingQuantity);
|
|
1335
1419
|
const localVarQueryParameter = {};
|
|
1420
|
+
const localVarBodyParameter = {};
|
|
1336
1421
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1337
1422
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1338
1423
|
if (listClientOrderId !== void 0 && listClientOrderId !== null) localVarQueryParameter["listClientOrderId"] = listClientOrderId;
|
|
@@ -1361,7 +1446,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1361
1446
|
return {
|
|
1362
1447
|
endpoint: "/sapi/v1/margin/order/oto",
|
|
1363
1448
|
method: "POST",
|
|
1364
|
-
|
|
1449
|
+
queryParams: localVarQueryParameter,
|
|
1450
|
+
bodyParams: localVarBodyParameter,
|
|
1365
1451
|
timeUnit: _timeUnit
|
|
1366
1452
|
};
|
|
1367
1453
|
},
|
|
@@ -1375,6 +1461,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1375
1461
|
(0, __binance_common.assertParamExists)("marginAccountNewOtoco", "pendingQuantity", pendingQuantity);
|
|
1376
1462
|
(0, __binance_common.assertParamExists)("marginAccountNewOtoco", "pendingAboveType", pendingAboveType);
|
|
1377
1463
|
const localVarQueryParameter = {};
|
|
1464
|
+
const localVarBodyParameter = {};
|
|
1378
1465
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1379
1466
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1380
1467
|
if (sideEffectType !== void 0 && sideEffectType !== null) localVarQueryParameter["sideEffectType"] = sideEffectType;
|
|
@@ -1410,13 +1497,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1410
1497
|
return {
|
|
1411
1498
|
endpoint: "/sapi/v1/margin/order/otoco",
|
|
1412
1499
|
method: "POST",
|
|
1413
|
-
|
|
1500
|
+
queryParams: localVarQueryParameter,
|
|
1501
|
+
bodyParams: localVarBodyParameter,
|
|
1414
1502
|
timeUnit: _timeUnit
|
|
1415
1503
|
};
|
|
1416
1504
|
},
|
|
1417
1505
|
marginManualLiquidation: async (type, symbol, recvWindow) => {
|
|
1418
1506
|
(0, __binance_common.assertParamExists)("marginManualLiquidation", "type", type);
|
|
1419
1507
|
const localVarQueryParameter = {};
|
|
1508
|
+
const localVarBodyParameter = {};
|
|
1420
1509
|
if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
|
|
1421
1510
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1422
1511
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1425,12 +1514,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1425
1514
|
return {
|
|
1426
1515
|
endpoint: "/sapi/v1/margin/manual-liquidation",
|
|
1427
1516
|
method: "POST",
|
|
1428
|
-
|
|
1517
|
+
queryParams: localVarQueryParameter,
|
|
1518
|
+
bodyParams: localVarBodyParameter,
|
|
1429
1519
|
timeUnit: _timeUnit
|
|
1430
1520
|
};
|
|
1431
1521
|
},
|
|
1432
1522
|
queryCurrentMarginOrderCountUsage: async (isIsolated, symbol, recvWindow) => {
|
|
1433
1523
|
const localVarQueryParameter = {};
|
|
1524
|
+
const localVarBodyParameter = {};
|
|
1434
1525
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1435
1526
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1436
1527
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1439,12 +1530,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1439
1530
|
return {
|
|
1440
1531
|
endpoint: "/sapi/v1/margin/rateLimit/order",
|
|
1441
1532
|
method: "GET",
|
|
1442
|
-
|
|
1533
|
+
queryParams: localVarQueryParameter,
|
|
1534
|
+
bodyParams: localVarBodyParameter,
|
|
1443
1535
|
timeUnit: _timeUnit
|
|
1444
1536
|
};
|
|
1445
1537
|
},
|
|
1446
1538
|
queryMarginAccountsAllOco: async (isIsolated, symbol, fromId, startTime, endTime, limit, recvWindow) => {
|
|
1447
1539
|
const localVarQueryParameter = {};
|
|
1540
|
+
const localVarBodyParameter = {};
|
|
1448
1541
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1449
1542
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1450
1543
|
if (fromId !== void 0 && fromId !== null) localVarQueryParameter["fromId"] = fromId;
|
|
@@ -1457,13 +1550,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1457
1550
|
return {
|
|
1458
1551
|
endpoint: "/sapi/v1/margin/allOrderList",
|
|
1459
1552
|
method: "GET",
|
|
1460
|
-
|
|
1553
|
+
queryParams: localVarQueryParameter,
|
|
1554
|
+
bodyParams: localVarBodyParameter,
|
|
1461
1555
|
timeUnit: _timeUnit
|
|
1462
1556
|
};
|
|
1463
1557
|
},
|
|
1464
1558
|
queryMarginAccountsAllOrders: async (symbol, isIsolated, orderId, startTime, endTime, limit, recvWindow) => {
|
|
1465
1559
|
(0, __binance_common.assertParamExists)("queryMarginAccountsAllOrders", "symbol", symbol);
|
|
1466
1560
|
const localVarQueryParameter = {};
|
|
1561
|
+
const localVarBodyParameter = {};
|
|
1467
1562
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1468
1563
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1469
1564
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
@@ -1476,12 +1571,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1476
1571
|
return {
|
|
1477
1572
|
endpoint: "/sapi/v1/margin/allOrders",
|
|
1478
1573
|
method: "GET",
|
|
1479
|
-
|
|
1574
|
+
queryParams: localVarQueryParameter,
|
|
1575
|
+
bodyParams: localVarBodyParameter,
|
|
1480
1576
|
timeUnit: _timeUnit
|
|
1481
1577
|
};
|
|
1482
1578
|
},
|
|
1483
1579
|
queryMarginAccountsOco: async (isIsolated, symbol, orderListId, origClientOrderId, recvWindow) => {
|
|
1484
1580
|
const localVarQueryParameter = {};
|
|
1581
|
+
const localVarBodyParameter = {};
|
|
1485
1582
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1486
1583
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1487
1584
|
if (orderListId !== void 0 && orderListId !== null) localVarQueryParameter["orderListId"] = orderListId;
|
|
@@ -1492,12 +1589,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1492
1589
|
return {
|
|
1493
1590
|
endpoint: "/sapi/v1/margin/orderList",
|
|
1494
1591
|
method: "GET",
|
|
1495
|
-
|
|
1592
|
+
queryParams: localVarQueryParameter,
|
|
1593
|
+
bodyParams: localVarBodyParameter,
|
|
1496
1594
|
timeUnit: _timeUnit
|
|
1497
1595
|
};
|
|
1498
1596
|
},
|
|
1499
1597
|
queryMarginAccountsOpenOco: async (isIsolated, symbol, recvWindow) => {
|
|
1500
1598
|
const localVarQueryParameter = {};
|
|
1599
|
+
const localVarBodyParameter = {};
|
|
1501
1600
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1502
1601
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1503
1602
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1506,12 +1605,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1506
1605
|
return {
|
|
1507
1606
|
endpoint: "/sapi/v1/margin/openOrderList",
|
|
1508
1607
|
method: "GET",
|
|
1509
|
-
|
|
1608
|
+
queryParams: localVarQueryParameter,
|
|
1609
|
+
bodyParams: localVarBodyParameter,
|
|
1510
1610
|
timeUnit: _timeUnit
|
|
1511
1611
|
};
|
|
1512
1612
|
},
|
|
1513
1613
|
queryMarginAccountsOpenOrders: async (symbol, isIsolated, recvWindow) => {
|
|
1514
1614
|
const localVarQueryParameter = {};
|
|
1615
|
+
const localVarBodyParameter = {};
|
|
1515
1616
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1516
1617
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1517
1618
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1520,13 +1621,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1520
1621
|
return {
|
|
1521
1622
|
endpoint: "/sapi/v1/margin/openOrders",
|
|
1522
1623
|
method: "GET",
|
|
1523
|
-
|
|
1624
|
+
queryParams: localVarQueryParameter,
|
|
1625
|
+
bodyParams: localVarBodyParameter,
|
|
1524
1626
|
timeUnit: _timeUnit
|
|
1525
1627
|
};
|
|
1526
1628
|
},
|
|
1527
1629
|
queryMarginAccountsOrder: async (symbol, isIsolated, orderId, origClientOrderId, recvWindow) => {
|
|
1528
1630
|
(0, __binance_common.assertParamExists)("queryMarginAccountsOrder", "symbol", symbol);
|
|
1529
1631
|
const localVarQueryParameter = {};
|
|
1632
|
+
const localVarBodyParameter = {};
|
|
1530
1633
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1531
1634
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1532
1635
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
@@ -1537,13 +1640,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1537
1640
|
return {
|
|
1538
1641
|
endpoint: "/sapi/v1/margin/order",
|
|
1539
1642
|
method: "GET",
|
|
1540
|
-
|
|
1643
|
+
queryParams: localVarQueryParameter,
|
|
1644
|
+
bodyParams: localVarBodyParameter,
|
|
1541
1645
|
timeUnit: _timeUnit
|
|
1542
1646
|
};
|
|
1543
1647
|
},
|
|
1544
1648
|
queryMarginAccountsTradeList: async (symbol, isIsolated, orderId, startTime, endTime, fromId, limit, recvWindow) => {
|
|
1545
1649
|
(0, __binance_common.assertParamExists)("queryMarginAccountsTradeList", "symbol", symbol);
|
|
1546
1650
|
const localVarQueryParameter = {};
|
|
1651
|
+
const localVarBodyParameter = {};
|
|
1547
1652
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1548
1653
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1549
1654
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
@@ -1557,12 +1662,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1557
1662
|
return {
|
|
1558
1663
|
endpoint: "/sapi/v1/margin/myTrades",
|
|
1559
1664
|
method: "GET",
|
|
1560
|
-
|
|
1665
|
+
queryParams: localVarQueryParameter,
|
|
1666
|
+
bodyParams: localVarBodyParameter,
|
|
1561
1667
|
timeUnit: _timeUnit
|
|
1562
1668
|
};
|
|
1563
1669
|
},
|
|
1564
1670
|
querySpecialKey: async (symbol, recvWindow) => {
|
|
1565
1671
|
const localVarQueryParameter = {};
|
|
1672
|
+
const localVarBodyParameter = {};
|
|
1566
1673
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1567
1674
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1568
1675
|
let _timeUnit;
|
|
@@ -1570,12 +1677,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1570
1677
|
return {
|
|
1571
1678
|
endpoint: "/sapi/v1/margin/apiKey",
|
|
1572
1679
|
method: "GET",
|
|
1573
|
-
|
|
1680
|
+
queryParams: localVarQueryParameter,
|
|
1681
|
+
bodyParams: localVarBodyParameter,
|
|
1574
1682
|
timeUnit: _timeUnit
|
|
1575
1683
|
};
|
|
1576
1684
|
},
|
|
1577
1685
|
querySpecialKeyList: async (symbol, recvWindow) => {
|
|
1578
1686
|
const localVarQueryParameter = {};
|
|
1687
|
+
const localVarBodyParameter = {};
|
|
1579
1688
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1580
1689
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1581
1690
|
let _timeUnit;
|
|
@@ -1583,13 +1692,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1583
1692
|
return {
|
|
1584
1693
|
endpoint: "/sapi/v1/margin/api-key-list",
|
|
1585
1694
|
method: "GET",
|
|
1586
|
-
|
|
1695
|
+
queryParams: localVarQueryParameter,
|
|
1696
|
+
bodyParams: localVarBodyParameter,
|
|
1587
1697
|
timeUnit: _timeUnit
|
|
1588
1698
|
};
|
|
1589
1699
|
},
|
|
1590
1700
|
smallLiabilityExchange: async (assetNames, recvWindow) => {
|
|
1591
1701
|
(0, __binance_common.assertParamExists)("smallLiabilityExchange", "assetNames", assetNames);
|
|
1592
1702
|
const localVarQueryParameter = {};
|
|
1703
|
+
const localVarBodyParameter = {};
|
|
1593
1704
|
if (assetNames) localVarQueryParameter["assetNames"] = assetNames;
|
|
1594
1705
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1595
1706
|
let _timeUnit;
|
|
@@ -1597,7 +1708,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1597
1708
|
return {
|
|
1598
1709
|
endpoint: "/sapi/v1/margin/exchange-small-liability",
|
|
1599
1710
|
method: "POST",
|
|
1600
|
-
|
|
1711
|
+
queryParams: localVarQueryParameter,
|
|
1712
|
+
bodyParams: localVarBodyParameter,
|
|
1601
1713
|
timeUnit: _timeUnit
|
|
1602
1714
|
};
|
|
1603
1715
|
}
|
|
@@ -1646,7 +1758,7 @@ var TradeApi = class {
|
|
|
1646
1758
|
*/
|
|
1647
1759
|
async createSpecialKey(requestParameters) {
|
|
1648
1760
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.createSpecialKey(requestParameters?.apiName, requestParameters?.symbol, requestParameters?.ip, requestParameters?.publicKey, requestParameters?.permissionMode, requestParameters?.recvWindow);
|
|
1649
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1761
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1650
1762
|
}
|
|
1651
1763
|
/**
|
|
1652
1764
|
* This only applies to Special Key for Low Latency Trading.
|
|
@@ -1666,7 +1778,7 @@ var TradeApi = class {
|
|
|
1666
1778
|
*/
|
|
1667
1779
|
async deleteSpecialKey(requestParameters = {}) {
|
|
1668
1780
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.deleteSpecialKey(requestParameters?.apiName, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1669
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1781
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1670
1782
|
}
|
|
1671
1783
|
/**
|
|
1672
1784
|
* Edit ip restriction. This only applies to Special Key for Low Latency Trading.
|
|
@@ -1684,7 +1796,7 @@ var TradeApi = class {
|
|
|
1684
1796
|
*/
|
|
1685
1797
|
async editIpForSpecialKey(requestParameters) {
|
|
1686
1798
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.editIpForSpecialKey(requestParameters?.ip, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1687
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1799
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1688
1800
|
}
|
|
1689
1801
|
/**
|
|
1690
1802
|
* Get Force Liquidation Record
|
|
@@ -1702,7 +1814,7 @@ var TradeApi = class {
|
|
|
1702
1814
|
*/
|
|
1703
1815
|
async getForceLiquidationRecord(requestParameters = {}) {
|
|
1704
1816
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getForceLiquidationRecord(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.isolatedSymbol, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
1705
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1817
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1706
1818
|
}
|
|
1707
1819
|
/**
|
|
1708
1820
|
* Query the coins which can be small liability exchange
|
|
@@ -1718,7 +1830,7 @@ var TradeApi = class {
|
|
|
1718
1830
|
*/
|
|
1719
1831
|
async getSmallLiabilityExchangeCoinList(requestParameters = {}) {
|
|
1720
1832
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSmallLiabilityExchangeCoinList(requestParameters?.recvWindow);
|
|
1721
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1833
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1722
1834
|
}
|
|
1723
1835
|
/**
|
|
1724
1836
|
* Get Small liability Exchange History
|
|
@@ -1734,7 +1846,7 @@ var TradeApi = class {
|
|
|
1734
1846
|
*/
|
|
1735
1847
|
async getSmallLiabilityExchangeHistory(requestParameters) {
|
|
1736
1848
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSmallLiabilityExchangeHistory(requestParameters?.current, requestParameters?.size, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
1737
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1849
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1738
1850
|
}
|
|
1739
1851
|
/**
|
|
1740
1852
|
* Cancels all active orders on a symbol for margin account.<br></br>
|
|
@@ -1751,7 +1863,7 @@ var TradeApi = class {
|
|
|
1751
1863
|
*/
|
|
1752
1864
|
async marginAccountCancelAllOpenOrdersOnASymbol(requestParameters) {
|
|
1753
1865
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelAllOpenOrdersOnASymbol(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.recvWindow);
|
|
1754
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1866
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1755
1867
|
}
|
|
1756
1868
|
/**
|
|
1757
1869
|
* Cancel an entire Order List for a margin account.
|
|
@@ -1769,7 +1881,7 @@ var TradeApi = class {
|
|
|
1769
1881
|
*/
|
|
1770
1882
|
async marginAccountCancelOco(requestParameters) {
|
|
1771
1883
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelOco(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderListId, requestParameters?.listClientOrderId, requestParameters?.newClientOrderId, requestParameters?.recvWindow);
|
|
1772
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1884
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1773
1885
|
}
|
|
1774
1886
|
/**
|
|
1775
1887
|
* Cancel an active order for margin account.
|
|
@@ -1787,7 +1899,7 @@ var TradeApi = class {
|
|
|
1787
1899
|
*/
|
|
1788
1900
|
async marginAccountCancelOrder(requestParameters) {
|
|
1789
1901
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelOrder(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.origClientOrderId, requestParameters?.newClientOrderId, requestParameters?.recvWindow);
|
|
1790
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1902
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1791
1903
|
}
|
|
1792
1904
|
/**
|
|
1793
1905
|
* Send in a new OCO for a margin account
|
|
@@ -1805,7 +1917,7 @@ var TradeApi = class {
|
|
|
1805
1917
|
*/
|
|
1806
1918
|
async marginAccountNewOco(requestParameters) {
|
|
1807
1919
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOco(requestParameters?.symbol, requestParameters?.side, requestParameters?.quantity, requestParameters?.price, requestParameters?.stopPrice, requestParameters?.isIsolated, requestParameters?.listClientOrderId, requestParameters?.limitClientOrderId, requestParameters?.limitIcebergQty, requestParameters?.stopClientOrderId, requestParameters?.stopLimitPrice, requestParameters?.stopIcebergQty, requestParameters?.stopLimitTimeInForce, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.selfTradePreventionMode, requestParameters?.autoRepayAtCancel, requestParameters?.recvWindow);
|
|
1808
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1920
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1809
1921
|
}
|
|
1810
1922
|
/**
|
|
1811
1923
|
* Post a new order for margin account.
|
|
@@ -1823,7 +1935,7 @@ var TradeApi = class {
|
|
|
1823
1935
|
*/
|
|
1824
1936
|
async marginAccountNewOrder(requestParameters) {
|
|
1825
1937
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOrder(requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.isIsolated, requestParameters?.quantity, requestParameters?.quoteOrderQty, requestParameters?.price, requestParameters?.stopPrice, requestParameters?.newClientOrderId, requestParameters?.icebergQty, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.timeInForce, requestParameters?.selfTradePreventionMode, requestParameters?.autoRepayAtCancel, requestParameters?.recvWindow);
|
|
1826
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1938
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1827
1939
|
}
|
|
1828
1940
|
/**
|
|
1829
1941
|
* Post a new OTO order for margin account:
|
|
@@ -1849,7 +1961,7 @@ var TradeApi = class {
|
|
|
1849
1961
|
*/
|
|
1850
1962
|
async marginAccountNewOto(requestParameters) {
|
|
1851
1963
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOto(requestParameters?.symbol, requestParameters?.workingType, requestParameters?.workingSide, requestParameters?.workingPrice, requestParameters?.workingQuantity, requestParameters?.workingIcebergQty, requestParameters?.pendingType, requestParameters?.pendingSide, requestParameters?.pendingQuantity, requestParameters?.isIsolated, requestParameters?.listClientOrderId, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.selfTradePreventionMode, requestParameters?.autoRepayAtCancel, requestParameters?.workingClientOrderId, requestParameters?.workingTimeInForce, requestParameters?.pendingClientOrderId, requestParameters?.pendingPrice, requestParameters?.pendingStopPrice, requestParameters?.pendingTrailingDelta, requestParameters?.pendingIcebergQty, requestParameters?.pendingTimeInForce);
|
|
1852
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1964
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1853
1965
|
}
|
|
1854
1966
|
/**
|
|
1855
1967
|
* Post a new OTOCO order for margin account:
|
|
@@ -1875,7 +1987,7 @@ var TradeApi = class {
|
|
|
1875
1987
|
*/
|
|
1876
1988
|
async marginAccountNewOtoco(requestParameters) {
|
|
1877
1989
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOtoco(requestParameters?.symbol, requestParameters?.workingType, requestParameters?.workingSide, requestParameters?.workingPrice, requestParameters?.workingQuantity, requestParameters?.pendingSide, requestParameters?.pendingQuantity, requestParameters?.pendingAboveType, requestParameters?.isIsolated, requestParameters?.sideEffectType, requestParameters?.autoRepayAtCancel, requestParameters?.listClientOrderId, requestParameters?.newOrderRespType, requestParameters?.selfTradePreventionMode, requestParameters?.workingClientOrderId, requestParameters?.workingIcebergQty, requestParameters?.workingTimeInForce, requestParameters?.pendingAboveClientOrderId, requestParameters?.pendingAbovePrice, requestParameters?.pendingAboveStopPrice, requestParameters?.pendingAboveTrailingDelta, requestParameters?.pendingAboveIcebergQty, requestParameters?.pendingAboveTimeInForce, requestParameters?.pendingBelowType, requestParameters?.pendingBelowClientOrderId, requestParameters?.pendingBelowPrice, requestParameters?.pendingBelowStopPrice, requestParameters?.pendingBelowTrailingDelta, requestParameters?.pendingBelowIcebergQty, requestParameters?.pendingBelowTimeInForce);
|
|
1878
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1990
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1879
1991
|
}
|
|
1880
1992
|
/**
|
|
1881
1993
|
* Margin Manual Liquidation
|
|
@@ -1894,7 +2006,7 @@ var TradeApi = class {
|
|
|
1894
2006
|
*/
|
|
1895
2007
|
async marginManualLiquidation(requestParameters) {
|
|
1896
2008
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginManualLiquidation(requestParameters?.type, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1897
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2009
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1898
2010
|
}
|
|
1899
2011
|
/**
|
|
1900
2012
|
* Displays the user's current margin order count usage for all intervals.
|
|
@@ -1910,7 +2022,7 @@ var TradeApi = class {
|
|
|
1910
2022
|
*/
|
|
1911
2023
|
async queryCurrentMarginOrderCountUsage(requestParameters = {}) {
|
|
1912
2024
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCurrentMarginOrderCountUsage(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1913
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2025
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1914
2026
|
}
|
|
1915
2027
|
/**
|
|
1916
2028
|
* Retrieves all OCO for a specific margin account based on provided optional parameters
|
|
@@ -1926,7 +2038,7 @@ var TradeApi = class {
|
|
|
1926
2038
|
*/
|
|
1927
2039
|
async queryMarginAccountsAllOco(requestParameters = {}) {
|
|
1928
2040
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsAllOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.fromId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
1929
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2041
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1930
2042
|
}
|
|
1931
2043
|
/**
|
|
1932
2044
|
* Query Margin Account's All Orders
|
|
@@ -1946,7 +2058,7 @@ var TradeApi = class {
|
|
|
1946
2058
|
*/
|
|
1947
2059
|
async queryMarginAccountsAllOrders(requestParameters) {
|
|
1948
2060
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsAllOrders(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
1949
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2061
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1950
2062
|
}
|
|
1951
2063
|
/**
|
|
1952
2064
|
* Retrieves a specific OCO based on provided optional parameters
|
|
@@ -1962,7 +2074,7 @@ var TradeApi = class {
|
|
|
1962
2074
|
*/
|
|
1963
2075
|
async queryMarginAccountsOco(requestParameters = {}) {
|
|
1964
2076
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.orderListId, requestParameters?.origClientOrderId, requestParameters?.recvWindow);
|
|
1965
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2077
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1966
2078
|
}
|
|
1967
2079
|
/**
|
|
1968
2080
|
* Query Margin Account's Open OCO
|
|
@@ -1978,7 +2090,7 @@ var TradeApi = class {
|
|
|
1978
2090
|
*/
|
|
1979
2091
|
async queryMarginAccountsOpenOco(requestParameters = {}) {
|
|
1980
2092
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOpenOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1981
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2093
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1982
2094
|
}
|
|
1983
2095
|
/**
|
|
1984
2096
|
* Query Margin Account's Open Orders
|
|
@@ -1998,7 +2110,7 @@ var TradeApi = class {
|
|
|
1998
2110
|
*/
|
|
1999
2111
|
async queryMarginAccountsOpenOrders(requestParameters = {}) {
|
|
2000
2112
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOpenOrders(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.recvWindow);
|
|
2001
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2113
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2002
2114
|
}
|
|
2003
2115
|
/**
|
|
2004
2116
|
* Query Margin Account's Order
|
|
@@ -2017,7 +2129,7 @@ var TradeApi = class {
|
|
|
2017
2129
|
*/
|
|
2018
2130
|
async queryMarginAccountsOrder(requestParameters) {
|
|
2019
2131
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOrder(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.origClientOrderId, requestParameters?.recvWindow);
|
|
2020
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2132
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2021
2133
|
}
|
|
2022
2134
|
/**
|
|
2023
2135
|
* Query Margin Account's Trade List
|
|
@@ -2036,7 +2148,7 @@ var TradeApi = class {
|
|
|
2036
2148
|
*/
|
|
2037
2149
|
async queryMarginAccountsTradeList(requestParameters) {
|
|
2038
2150
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsTradeList(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.fromId, requestParameters?.limit, requestParameters?.recvWindow);
|
|
2039
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2151
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2040
2152
|
}
|
|
2041
2153
|
/**
|
|
2042
2154
|
* Query Special Key Information.
|
|
@@ -2054,7 +2166,7 @@ var TradeApi = class {
|
|
|
2054
2166
|
*/
|
|
2055
2167
|
async querySpecialKey(requestParameters = {}) {
|
|
2056
2168
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySpecialKey(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
2057
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2169
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2058
2170
|
}
|
|
2059
2171
|
/**
|
|
2060
2172
|
* This only applies to Special Key for Low Latency Trading.
|
|
@@ -2070,7 +2182,7 @@ var TradeApi = class {
|
|
|
2070
2182
|
*/
|
|
2071
2183
|
async querySpecialKeyList(requestParameters = {}) {
|
|
2072
2184
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySpecialKeyList(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
2073
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2185
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2074
2186
|
}
|
|
2075
2187
|
/**
|
|
2076
2188
|
* Small Liability Exchange
|
|
@@ -2090,7 +2202,7 @@ var TradeApi = class {
|
|
|
2090
2202
|
*/
|
|
2091
2203
|
async smallLiabilityExchange(requestParameters) {
|
|
2092
2204
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.smallLiabilityExchange(requestParameters?.assetNames, requestParameters?.recvWindow);
|
|
2093
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2205
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2094
2206
|
}
|
|
2095
2207
|
};
|
|
2096
2208
|
let MarginAccountNewOcoSideEnum = /* @__PURE__ */ function(MarginAccountNewOcoSideEnum$1) {
|
|
@@ -2155,6 +2267,7 @@ const TransferApiAxiosParamCreator = function(configuration) {
|
|
|
2155
2267
|
return {
|
|
2156
2268
|
getCrossMarginTransferHistory: async (asset, type, startTime, endTime, current, size, isolatedSymbol, recvWindow) => {
|
|
2157
2269
|
const localVarQueryParameter = {};
|
|
2270
|
+
const localVarBodyParameter = {};
|
|
2158
2271
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
2159
2272
|
if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
|
|
2160
2273
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
@@ -2168,13 +2281,15 @@ const TransferApiAxiosParamCreator = function(configuration) {
|
|
|
2168
2281
|
return {
|
|
2169
2282
|
endpoint: "/sapi/v1/margin/transfer",
|
|
2170
2283
|
method: "GET",
|
|
2171
|
-
|
|
2284
|
+
queryParams: localVarQueryParameter,
|
|
2285
|
+
bodyParams: localVarBodyParameter,
|
|
2172
2286
|
timeUnit: _timeUnit
|
|
2173
2287
|
};
|
|
2174
2288
|
},
|
|
2175
2289
|
queryMaxTransferOutAmount: async (asset, isolatedSymbol, recvWindow) => {
|
|
2176
2290
|
(0, __binance_common.assertParamExists)("queryMaxTransferOutAmount", "asset", asset);
|
|
2177
2291
|
const localVarQueryParameter = {};
|
|
2292
|
+
const localVarBodyParameter = {};
|
|
2178
2293
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
2179
2294
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
2180
2295
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -2183,7 +2298,8 @@ const TransferApiAxiosParamCreator = function(configuration) {
|
|
|
2183
2298
|
return {
|
|
2184
2299
|
endpoint: "/sapi/v1/margin/maxTransferable",
|
|
2185
2300
|
method: "GET",
|
|
2186
|
-
|
|
2301
|
+
queryParams: localVarQueryParameter,
|
|
2302
|
+
bodyParams: localVarBodyParameter,
|
|
2187
2303
|
timeUnit: _timeUnit
|
|
2188
2304
|
};
|
|
2189
2305
|
}
|
|
@@ -2216,7 +2332,7 @@ var TransferApi = class {
|
|
|
2216
2332
|
*/
|
|
2217
2333
|
async getCrossMarginTransferHistory(requestParameters = {}) {
|
|
2218
2334
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCrossMarginTransferHistory(requestParameters?.asset, requestParameters?.type, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
|
|
2219
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2335
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2220
2336
|
}
|
|
2221
2337
|
/**
|
|
2222
2338
|
* Query Max Transfer-Out Amount
|
|
@@ -2234,7 +2350,7 @@ var TransferApi = class {
|
|
|
2234
2350
|
*/
|
|
2235
2351
|
async queryMaxTransferOutAmount(requestParameters) {
|
|
2236
2352
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMaxTransferOutAmount(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
|
|
2237
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2353
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2238
2354
|
}
|
|
2239
2355
|
};
|
|
2240
2356
|
|
|
@@ -2266,23 +2382,25 @@ var RestAPI = class {
|
|
|
2266
2382
|
* Generic function to send a request.
|
|
2267
2383
|
* @param endpoint - The API endpoint to call.
|
|
2268
2384
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
2269
|
-
* @param
|
|
2385
|
+
* @param queryParams - Query parameters for the request.
|
|
2386
|
+
* @param bodyParams - Body parameters for the request.
|
|
2270
2387
|
*
|
|
2271
2388
|
* @returns A promise resolving to the response data object.
|
|
2272
2389
|
*/
|
|
2273
|
-
sendRequest(endpoint, method,
|
|
2274
|
-
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method,
|
|
2390
|
+
sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
2391
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
|
|
2275
2392
|
}
|
|
2276
2393
|
/**
|
|
2277
2394
|
* Generic function to send a signed request.
|
|
2278
2395
|
* @param endpoint - The API endpoint to call.
|
|
2279
2396
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
2280
|
-
* @param
|
|
2397
|
+
* @param queryParams - Query parameters for the request.
|
|
2398
|
+
* @param bodyParams - Body parameters for the request.
|
|
2281
2399
|
*
|
|
2282
2400
|
* @returns A promise resolving to the response data object.
|
|
2283
2401
|
*/
|
|
2284
|
-
sendSignedRequest(endpoint, method,
|
|
2285
|
-
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method,
|
|
2402
|
+
sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
2403
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
|
|
2286
2404
|
}
|
|
2287
2405
|
/**
|
|
2288
2406
|
* Adjust cross margin max leverage
|
|
@@ -3474,12 +3592,6 @@ Object.defineProperty(exports, 'BadRequestError', {
|
|
|
3474
3592
|
return __binance_common.BadRequestError;
|
|
3475
3593
|
}
|
|
3476
3594
|
});
|
|
3477
|
-
Object.defineProperty(exports, 'ConfigurationMarginTrading', {
|
|
3478
|
-
enumerable: true,
|
|
3479
|
-
get: function () {
|
|
3480
|
-
return ConfigurationMarginTrading;
|
|
3481
|
-
}
|
|
3482
|
-
});
|
|
3483
3595
|
Object.defineProperty(exports, 'ConnectorClientError', {
|
|
3484
3596
|
enumerable: true,
|
|
3485
3597
|
get: function () {
|