@binance/margin-trading 10.0.2 → 10.1.1
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 +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +241 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +241 -123
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConfigurationWebsocketStreams, C
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/margin-trading";
|
|
6
|
-
var version = "10.
|
|
6
|
+
var version = "10.1.1";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/rest-api/modules/account-api.ts
|
|
@@ -27,19 +27,22 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
27
27
|
adjustCrossMarginMaxLeverage: async (maxLeverage) => {
|
|
28
28
|
assertParamExists("adjustCrossMarginMaxLeverage", "maxLeverage", maxLeverage);
|
|
29
29
|
const localVarQueryParameter = {};
|
|
30
|
+
const localVarBodyParameter = {};
|
|
30
31
|
if (maxLeverage !== void 0 && maxLeverage !== null) localVarQueryParameter["maxLeverage"] = maxLeverage;
|
|
31
32
|
let _timeUnit;
|
|
32
33
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
33
34
|
return {
|
|
34
35
|
endpoint: "/sapi/v1/margin/max-leverage",
|
|
35
36
|
method: "POST",
|
|
36
|
-
|
|
37
|
+
queryParams: localVarQueryParameter,
|
|
38
|
+
bodyParams: localVarBodyParameter,
|
|
37
39
|
timeUnit: _timeUnit
|
|
38
40
|
};
|
|
39
41
|
},
|
|
40
42
|
disableIsolatedMarginAccount: async (symbol, recvWindow) => {
|
|
41
43
|
assertParamExists("disableIsolatedMarginAccount", "symbol", symbol);
|
|
42
44
|
const localVarQueryParameter = {};
|
|
45
|
+
const localVarBodyParameter = {};
|
|
43
46
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
44
47
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
45
48
|
let _timeUnit;
|
|
@@ -47,13 +50,15 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
47
50
|
return {
|
|
48
51
|
endpoint: "/sapi/v1/margin/isolated/account",
|
|
49
52
|
method: "DELETE",
|
|
50
|
-
|
|
53
|
+
queryParams: localVarQueryParameter,
|
|
54
|
+
bodyParams: localVarBodyParameter,
|
|
51
55
|
timeUnit: _timeUnit
|
|
52
56
|
};
|
|
53
57
|
},
|
|
54
58
|
enableIsolatedMarginAccount: async (symbol, recvWindow) => {
|
|
55
59
|
assertParamExists("enableIsolatedMarginAccount", "symbol", symbol);
|
|
56
60
|
const localVarQueryParameter = {};
|
|
61
|
+
const localVarBodyParameter = {};
|
|
57
62
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
58
63
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
59
64
|
let _timeUnit;
|
|
@@ -61,36 +66,42 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
61
66
|
return {
|
|
62
67
|
endpoint: "/sapi/v1/margin/isolated/account",
|
|
63
68
|
method: "POST",
|
|
64
|
-
|
|
69
|
+
queryParams: localVarQueryParameter,
|
|
70
|
+
bodyParams: localVarBodyParameter,
|
|
65
71
|
timeUnit: _timeUnit
|
|
66
72
|
};
|
|
67
73
|
},
|
|
68
74
|
getBnbBurnStatus: async (recvWindow) => {
|
|
69
75
|
const localVarQueryParameter = {};
|
|
76
|
+
const localVarBodyParameter = {};
|
|
70
77
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
71
78
|
let _timeUnit;
|
|
72
79
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
73
80
|
return {
|
|
74
81
|
endpoint: "/sapi/v1/bnbBurn",
|
|
75
82
|
method: "GET",
|
|
76
|
-
|
|
83
|
+
queryParams: localVarQueryParameter,
|
|
84
|
+
bodyParams: localVarBodyParameter,
|
|
77
85
|
timeUnit: _timeUnit
|
|
78
86
|
};
|
|
79
87
|
},
|
|
80
88
|
getSummaryOfMarginAccount: async (recvWindow) => {
|
|
81
89
|
const localVarQueryParameter = {};
|
|
90
|
+
const localVarBodyParameter = {};
|
|
82
91
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
83
92
|
let _timeUnit;
|
|
84
93
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
85
94
|
return {
|
|
86
95
|
endpoint: "/sapi/v1/margin/tradeCoeff",
|
|
87
96
|
method: "GET",
|
|
88
|
-
|
|
97
|
+
queryParams: localVarQueryParameter,
|
|
98
|
+
bodyParams: localVarBodyParameter,
|
|
89
99
|
timeUnit: _timeUnit
|
|
90
100
|
};
|
|
91
101
|
},
|
|
92
102
|
queryCrossIsolatedMarginCapitalFlow: async (asset, symbol, type, startTime, endTime, fromId, limit, recvWindow) => {
|
|
93
103
|
const localVarQueryParameter = {};
|
|
104
|
+
const localVarBodyParameter = {};
|
|
94
105
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
95
106
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
96
107
|
if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
|
|
@@ -104,24 +115,28 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
104
115
|
return {
|
|
105
116
|
endpoint: "/sapi/v1/margin/capital-flow",
|
|
106
117
|
method: "GET",
|
|
107
|
-
|
|
118
|
+
queryParams: localVarQueryParameter,
|
|
119
|
+
bodyParams: localVarBodyParameter,
|
|
108
120
|
timeUnit: _timeUnit
|
|
109
121
|
};
|
|
110
122
|
},
|
|
111
123
|
queryCrossMarginAccountDetails: async (recvWindow) => {
|
|
112
124
|
const localVarQueryParameter = {};
|
|
125
|
+
const localVarBodyParameter = {};
|
|
113
126
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
114
127
|
let _timeUnit;
|
|
115
128
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
116
129
|
return {
|
|
117
130
|
endpoint: "/sapi/v1/margin/account",
|
|
118
131
|
method: "GET",
|
|
119
|
-
|
|
132
|
+
queryParams: localVarQueryParameter,
|
|
133
|
+
bodyParams: localVarBodyParameter,
|
|
120
134
|
timeUnit: _timeUnit
|
|
121
135
|
};
|
|
122
136
|
},
|
|
123
137
|
queryCrossMarginFeeData: async (vipLevel, coin, recvWindow) => {
|
|
124
138
|
const localVarQueryParameter = {};
|
|
139
|
+
const localVarBodyParameter = {};
|
|
125
140
|
if (vipLevel !== void 0 && vipLevel !== null) localVarQueryParameter["vipLevel"] = vipLevel;
|
|
126
141
|
if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
|
|
127
142
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -130,24 +145,28 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
130
145
|
return {
|
|
131
146
|
endpoint: "/sapi/v1/margin/crossMarginData",
|
|
132
147
|
method: "GET",
|
|
133
|
-
|
|
148
|
+
queryParams: localVarQueryParameter,
|
|
149
|
+
bodyParams: localVarBodyParameter,
|
|
134
150
|
timeUnit: _timeUnit
|
|
135
151
|
};
|
|
136
152
|
},
|
|
137
153
|
queryEnabledIsolatedMarginAccountLimit: async (recvWindow) => {
|
|
138
154
|
const localVarQueryParameter = {};
|
|
155
|
+
const localVarBodyParameter = {};
|
|
139
156
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
140
157
|
let _timeUnit;
|
|
141
158
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
142
159
|
return {
|
|
143
160
|
endpoint: "/sapi/v1/margin/isolated/accountLimit",
|
|
144
161
|
method: "GET",
|
|
145
|
-
|
|
162
|
+
queryParams: localVarQueryParameter,
|
|
163
|
+
bodyParams: localVarBodyParameter,
|
|
146
164
|
timeUnit: _timeUnit
|
|
147
165
|
};
|
|
148
166
|
},
|
|
149
167
|
queryIsolatedMarginAccountInfo: async (symbols, recvWindow) => {
|
|
150
168
|
const localVarQueryParameter = {};
|
|
169
|
+
const localVarBodyParameter = {};
|
|
151
170
|
if (symbols !== void 0 && symbols !== null) localVarQueryParameter["symbols"] = symbols;
|
|
152
171
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
153
172
|
let _timeUnit;
|
|
@@ -155,12 +174,14 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
155
174
|
return {
|
|
156
175
|
endpoint: "/sapi/v1/margin/isolated/account",
|
|
157
176
|
method: "GET",
|
|
158
|
-
|
|
177
|
+
queryParams: localVarQueryParameter,
|
|
178
|
+
bodyParams: localVarBodyParameter,
|
|
159
179
|
timeUnit: _timeUnit
|
|
160
180
|
};
|
|
161
181
|
},
|
|
162
182
|
queryIsolatedMarginFeeData: async (vipLevel, symbol, recvWindow) => {
|
|
163
183
|
const localVarQueryParameter = {};
|
|
184
|
+
const localVarBodyParameter = {};
|
|
164
185
|
if (vipLevel !== void 0 && vipLevel !== null) localVarQueryParameter["vipLevel"] = vipLevel;
|
|
165
186
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
166
187
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -169,7 +190,8 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
169
190
|
return {
|
|
170
191
|
endpoint: "/sapi/v1/margin/isolatedMarginData",
|
|
171
192
|
method: "GET",
|
|
172
|
-
|
|
193
|
+
queryParams: localVarQueryParameter,
|
|
194
|
+
bodyParams: localVarBodyParameter,
|
|
173
195
|
timeUnit: _timeUnit
|
|
174
196
|
};
|
|
175
197
|
}
|
|
@@ -200,7 +222,7 @@ var AccountApi = class {
|
|
|
200
222
|
*/
|
|
201
223
|
async adjustCrossMarginMaxLeverage(requestParameters) {
|
|
202
224
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.adjustCrossMarginMaxLeverage(requestParameters?.maxLeverage);
|
|
203
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
225
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
204
226
|
}
|
|
205
227
|
/**
|
|
206
228
|
* Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24
|
|
@@ -217,7 +239,7 @@ var AccountApi = class {
|
|
|
217
239
|
*/
|
|
218
240
|
async disableIsolatedMarginAccount(requestParameters) {
|
|
219
241
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.disableIsolatedMarginAccount(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
220
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
242
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
221
243
|
}
|
|
222
244
|
/**
|
|
223
245
|
* Enable isolated margin account for a specific symbol(Only supports activation of previously disabled accounts).
|
|
@@ -233,7 +255,7 @@ var AccountApi = class {
|
|
|
233
255
|
*/
|
|
234
256
|
async enableIsolatedMarginAccount(requestParameters) {
|
|
235
257
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.enableIsolatedMarginAccount(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
236
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
258
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
237
259
|
}
|
|
238
260
|
/**
|
|
239
261
|
* Get BNB Burn Status
|
|
@@ -249,7 +271,7 @@ var AccountApi = class {
|
|
|
249
271
|
*/
|
|
250
272
|
async getBnbBurnStatus(requestParameters = {}) {
|
|
251
273
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBnbBurnStatus(requestParameters?.recvWindow);
|
|
252
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
274
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
253
275
|
}
|
|
254
276
|
/**
|
|
255
277
|
* Get personal margin level information
|
|
@@ -265,7 +287,7 @@ var AccountApi = class {
|
|
|
265
287
|
*/
|
|
266
288
|
async getSummaryOfMarginAccount(requestParameters = {}) {
|
|
267
289
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSummaryOfMarginAccount(requestParameters?.recvWindow);
|
|
268
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
290
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
269
291
|
}
|
|
270
292
|
/**
|
|
271
293
|
* Query Cross Isolated Margin Capital Flow
|
|
@@ -281,7 +303,7 @@ var AccountApi = class {
|
|
|
281
303
|
*/
|
|
282
304
|
async queryCrossIsolatedMarginCapitalFlow(requestParameters = {}) {
|
|
283
305
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossIsolatedMarginCapitalFlow(requestParameters?.asset, requestParameters?.symbol, requestParameters?.type, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.fromId, requestParameters?.limit, requestParameters?.recvWindow);
|
|
284
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
306
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
285
307
|
}
|
|
286
308
|
/**
|
|
287
309
|
* Query Cross Margin Account Details
|
|
@@ -297,7 +319,7 @@ var AccountApi = class {
|
|
|
297
319
|
*/
|
|
298
320
|
async queryCrossMarginAccountDetails(requestParameters = {}) {
|
|
299
321
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossMarginAccountDetails(requestParameters?.recvWindow);
|
|
300
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
322
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
301
323
|
}
|
|
302
324
|
/**
|
|
303
325
|
* Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
|
|
@@ -313,7 +335,7 @@ var AccountApi = class {
|
|
|
313
335
|
*/
|
|
314
336
|
async queryCrossMarginFeeData(requestParameters = {}) {
|
|
315
337
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossMarginFeeData(requestParameters?.vipLevel, requestParameters?.coin, requestParameters?.recvWindow);
|
|
316
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
338
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
317
339
|
}
|
|
318
340
|
/**
|
|
319
341
|
* Query enabled isolated margin account limit.
|
|
@@ -329,7 +351,7 @@ var AccountApi = class {
|
|
|
329
351
|
*/
|
|
330
352
|
async queryEnabledIsolatedMarginAccountLimit(requestParameters = {}) {
|
|
331
353
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryEnabledIsolatedMarginAccountLimit(requestParameters?.recvWindow);
|
|
332
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
354
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
333
355
|
}
|
|
334
356
|
/**
|
|
335
357
|
* Query Isolated Margin Account Info
|
|
@@ -348,7 +370,7 @@ var AccountApi = class {
|
|
|
348
370
|
*/
|
|
349
371
|
async queryIsolatedMarginAccountInfo(requestParameters = {}) {
|
|
350
372
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginAccountInfo(requestParameters?.symbols, requestParameters?.recvWindow);
|
|
351
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
373
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
352
374
|
}
|
|
353
375
|
/**
|
|
354
376
|
* Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
|
|
@@ -364,7 +386,7 @@ var AccountApi = class {
|
|
|
364
386
|
*/
|
|
365
387
|
async queryIsolatedMarginFeeData(requestParameters = {}) {
|
|
366
388
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginFeeData(requestParameters?.vipLevel, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
367
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
389
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
368
390
|
}
|
|
369
391
|
};
|
|
370
392
|
|
|
@@ -391,6 +413,7 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
391
413
|
assertParamExists("getFutureHourlyInterestRate", "assets", assets);
|
|
392
414
|
assertParamExists("getFutureHourlyInterestRate", "isIsolated", isIsolated);
|
|
393
415
|
const localVarQueryParameter = {};
|
|
416
|
+
const localVarBodyParameter = {};
|
|
394
417
|
if (assets !== void 0 && assets !== null) localVarQueryParameter["assets"] = assets;
|
|
395
418
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
396
419
|
let _timeUnit;
|
|
@@ -398,12 +421,14 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
398
421
|
return {
|
|
399
422
|
endpoint: "/sapi/v1/margin/next-hourly-interest-rate",
|
|
400
423
|
method: "GET",
|
|
401
|
-
|
|
424
|
+
queryParams: localVarQueryParameter,
|
|
425
|
+
bodyParams: localVarBodyParameter,
|
|
402
426
|
timeUnit: _timeUnit
|
|
403
427
|
};
|
|
404
428
|
},
|
|
405
429
|
getInterestHistory: async (asset, isolatedSymbol, startTime, endTime, current, size, recvWindow) => {
|
|
406
430
|
const localVarQueryParameter = {};
|
|
431
|
+
const localVarBodyParameter = {};
|
|
407
432
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
408
433
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
409
434
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
@@ -416,7 +441,8 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
416
441
|
return {
|
|
417
442
|
endpoint: "/sapi/v1/margin/interestHistory",
|
|
418
443
|
method: "GET",
|
|
419
|
-
|
|
444
|
+
queryParams: localVarQueryParameter,
|
|
445
|
+
bodyParams: localVarBodyParameter,
|
|
420
446
|
timeUnit: _timeUnit
|
|
421
447
|
};
|
|
422
448
|
},
|
|
@@ -427,6 +453,7 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
427
453
|
assertParamExists("marginAccountBorrowRepay", "amount", amount);
|
|
428
454
|
assertParamExists("marginAccountBorrowRepay", "type", type);
|
|
429
455
|
const localVarQueryParameter = {};
|
|
456
|
+
const localVarBodyParameter = {};
|
|
430
457
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
431
458
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
432
459
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
@@ -438,13 +465,15 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
438
465
|
return {
|
|
439
466
|
endpoint: "/sapi/v1/margin/borrow-repay",
|
|
440
467
|
method: "POST",
|
|
441
|
-
|
|
468
|
+
queryParams: localVarQueryParameter,
|
|
469
|
+
bodyParams: localVarBodyParameter,
|
|
442
470
|
timeUnit: _timeUnit
|
|
443
471
|
};
|
|
444
472
|
},
|
|
445
473
|
queryBorrowRepayRecordsInMarginAccount: async (type, asset, isolatedSymbol, txId, startTime, endTime, current, size, recvWindow) => {
|
|
446
474
|
assertParamExists("queryBorrowRepayRecordsInMarginAccount", "type", type);
|
|
447
475
|
const localVarQueryParameter = {};
|
|
476
|
+
const localVarBodyParameter = {};
|
|
448
477
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
449
478
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
450
479
|
if (txId !== void 0 && txId !== null) localVarQueryParameter["txId"] = txId;
|
|
@@ -459,13 +488,15 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
459
488
|
return {
|
|
460
489
|
endpoint: "/sapi/v1/margin/borrow-repay",
|
|
461
490
|
method: "GET",
|
|
462
|
-
|
|
491
|
+
queryParams: localVarQueryParameter,
|
|
492
|
+
bodyParams: localVarBodyParameter,
|
|
463
493
|
timeUnit: _timeUnit
|
|
464
494
|
};
|
|
465
495
|
},
|
|
466
496
|
queryMarginInterestRateHistory: async (asset, vipLevel, startTime, endTime, recvWindow) => {
|
|
467
497
|
assertParamExists("queryMarginInterestRateHistory", "asset", asset);
|
|
468
498
|
const localVarQueryParameter = {};
|
|
499
|
+
const localVarBodyParameter = {};
|
|
469
500
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
470
501
|
if (vipLevel !== void 0 && vipLevel !== null) localVarQueryParameter["vipLevel"] = vipLevel;
|
|
471
502
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
@@ -476,13 +507,15 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
476
507
|
return {
|
|
477
508
|
endpoint: "/sapi/v1/margin/interestRateHistory",
|
|
478
509
|
method: "GET",
|
|
479
|
-
|
|
510
|
+
queryParams: localVarQueryParameter,
|
|
511
|
+
bodyParams: localVarBodyParameter,
|
|
480
512
|
timeUnit: _timeUnit
|
|
481
513
|
};
|
|
482
514
|
},
|
|
483
515
|
queryMaxBorrow: async (asset, isolatedSymbol, recvWindow) => {
|
|
484
516
|
assertParamExists("queryMaxBorrow", "asset", asset);
|
|
485
517
|
const localVarQueryParameter = {};
|
|
518
|
+
const localVarBodyParameter = {};
|
|
486
519
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
487
520
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
488
521
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -491,7 +524,8 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
491
524
|
return {
|
|
492
525
|
endpoint: "/sapi/v1/margin/maxBorrowable",
|
|
493
526
|
method: "GET",
|
|
494
|
-
|
|
527
|
+
queryParams: localVarQueryParameter,
|
|
528
|
+
bodyParams: localVarBodyParameter,
|
|
495
529
|
timeUnit: _timeUnit
|
|
496
530
|
};
|
|
497
531
|
}
|
|
@@ -520,7 +554,7 @@ var BorrowRepayApi = class {
|
|
|
520
554
|
*/
|
|
521
555
|
async getFutureHourlyInterestRate(requestParameters) {
|
|
522
556
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFutureHourlyInterestRate(requestParameters?.assets, requestParameters?.isIsolated);
|
|
523
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
557
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
524
558
|
}
|
|
525
559
|
/**
|
|
526
560
|
* Get Interest History
|
|
@@ -549,7 +583,7 @@ var BorrowRepayApi = class {
|
|
|
549
583
|
*/
|
|
550
584
|
async getInterestHistory(requestParameters = {}) {
|
|
551
585
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getInterestHistory(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
552
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
586
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
553
587
|
}
|
|
554
588
|
/**
|
|
555
589
|
* Margin account borrow/repay(MARGIN)
|
|
@@ -565,7 +599,7 @@ var BorrowRepayApi = class {
|
|
|
565
599
|
*/
|
|
566
600
|
async marginAccountBorrowRepay(requestParameters) {
|
|
567
601
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountBorrowRepay(requestParameters?.asset, requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.amount, requestParameters?.type, requestParameters?.recvWindow);
|
|
568
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
602
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
569
603
|
}
|
|
570
604
|
/**
|
|
571
605
|
* Query borrow/repay records in Margin account
|
|
@@ -586,7 +620,7 @@ var BorrowRepayApi = class {
|
|
|
586
620
|
*/
|
|
587
621
|
async queryBorrowRepayRecordsInMarginAccount(requestParameters) {
|
|
588
622
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryBorrowRepayRecordsInMarginAccount(requestParameters?.type, requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.txId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
589
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
623
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
590
624
|
}
|
|
591
625
|
/**
|
|
592
626
|
* Query Margin Interest Rate History
|
|
@@ -602,7 +636,7 @@ var BorrowRepayApi = class {
|
|
|
602
636
|
*/
|
|
603
637
|
async queryMarginInterestRateHistory(requestParameters) {
|
|
604
638
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginInterestRateHistory(requestParameters?.asset, requestParameters?.vipLevel, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
605
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
639
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
606
640
|
}
|
|
607
641
|
/**
|
|
608
642
|
* Query Max Borrow
|
|
@@ -621,7 +655,7 @@ var BorrowRepayApi = class {
|
|
|
621
655
|
*/
|
|
622
656
|
async queryMaxBorrow(requestParameters) {
|
|
623
657
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMaxBorrow(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
|
|
624
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
658
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
625
659
|
}
|
|
626
660
|
};
|
|
627
661
|
|
|
@@ -646,29 +680,34 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
646
680
|
return {
|
|
647
681
|
crossMarginCollateralRatio: async () => {
|
|
648
682
|
const localVarQueryParameter = {};
|
|
683
|
+
const localVarBodyParameter = {};
|
|
649
684
|
let _timeUnit;
|
|
650
685
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
651
686
|
return {
|
|
652
687
|
endpoint: "/sapi/v1/margin/crossMarginCollateralRatio",
|
|
653
688
|
method: "GET",
|
|
654
|
-
|
|
689
|
+
queryParams: localVarQueryParameter,
|
|
690
|
+
bodyParams: localVarBodyParameter,
|
|
655
691
|
timeUnit: _timeUnit
|
|
656
692
|
};
|
|
657
693
|
},
|
|
658
694
|
getAllCrossMarginPairs: async (symbol) => {
|
|
659
695
|
const localVarQueryParameter = {};
|
|
696
|
+
const localVarBodyParameter = {};
|
|
660
697
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
661
698
|
let _timeUnit;
|
|
662
699
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
663
700
|
return {
|
|
664
701
|
endpoint: "/sapi/v1/margin/allPairs",
|
|
665
702
|
method: "GET",
|
|
666
|
-
|
|
703
|
+
queryParams: localVarQueryParameter,
|
|
704
|
+
bodyParams: localVarBodyParameter,
|
|
667
705
|
timeUnit: _timeUnit
|
|
668
706
|
};
|
|
669
707
|
},
|
|
670
708
|
getAllIsolatedMarginSymbol: async (symbol, recvWindow) => {
|
|
671
709
|
const localVarQueryParameter = {};
|
|
710
|
+
const localVarBodyParameter = {};
|
|
672
711
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
673
712
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
674
713
|
let _timeUnit;
|
|
@@ -676,60 +715,70 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
676
715
|
return {
|
|
677
716
|
endpoint: "/sapi/v1/margin/isolated/allPairs",
|
|
678
717
|
method: "GET",
|
|
679
|
-
|
|
718
|
+
queryParams: localVarQueryParameter,
|
|
719
|
+
bodyParams: localVarBodyParameter,
|
|
680
720
|
timeUnit: _timeUnit
|
|
681
721
|
};
|
|
682
722
|
},
|
|
683
723
|
getAllMarginAssets: async (asset) => {
|
|
684
724
|
const localVarQueryParameter = {};
|
|
725
|
+
const localVarBodyParameter = {};
|
|
685
726
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
686
727
|
let _timeUnit;
|
|
687
728
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
688
729
|
return {
|
|
689
730
|
endpoint: "/sapi/v1/margin/allAssets",
|
|
690
731
|
method: "GET",
|
|
691
|
-
|
|
732
|
+
queryParams: localVarQueryParameter,
|
|
733
|
+
bodyParams: localVarBodyParameter,
|
|
692
734
|
timeUnit: _timeUnit
|
|
693
735
|
};
|
|
694
736
|
},
|
|
695
737
|
getDelistSchedule: async (recvWindow) => {
|
|
696
738
|
const localVarQueryParameter = {};
|
|
739
|
+
const localVarBodyParameter = {};
|
|
697
740
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
698
741
|
let _timeUnit;
|
|
699
742
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
700
743
|
return {
|
|
701
744
|
endpoint: "/sapi/v1/margin/delist-schedule",
|
|
702
745
|
method: "GET",
|
|
703
|
-
|
|
746
|
+
queryParams: localVarQueryParameter,
|
|
747
|
+
bodyParams: localVarBodyParameter,
|
|
704
748
|
timeUnit: _timeUnit
|
|
705
749
|
};
|
|
706
750
|
},
|
|
707
751
|
getLimitPricePairs: async () => {
|
|
708
752
|
const localVarQueryParameter = {};
|
|
753
|
+
const localVarBodyParameter = {};
|
|
709
754
|
let _timeUnit;
|
|
710
755
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
711
756
|
return {
|
|
712
757
|
endpoint: "/sapi/v1/margin/limit-price-pairs",
|
|
713
758
|
method: "GET",
|
|
714
|
-
|
|
759
|
+
queryParams: localVarQueryParameter,
|
|
760
|
+
bodyParams: localVarBodyParameter,
|
|
715
761
|
timeUnit: _timeUnit
|
|
716
762
|
};
|
|
717
763
|
},
|
|
718
764
|
getListSchedule: async (recvWindow) => {
|
|
719
765
|
const localVarQueryParameter = {};
|
|
766
|
+
const localVarBodyParameter = {};
|
|
720
767
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
721
768
|
let _timeUnit;
|
|
722
769
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
723
770
|
return {
|
|
724
771
|
endpoint: "/sapi/v1/margin/list-schedule",
|
|
725
772
|
method: "GET",
|
|
726
|
-
|
|
773
|
+
queryParams: localVarQueryParameter,
|
|
774
|
+
bodyParams: localVarBodyParameter,
|
|
727
775
|
timeUnit: _timeUnit
|
|
728
776
|
};
|
|
729
777
|
},
|
|
730
778
|
queryIsolatedMarginTierData: async (symbol, tier, recvWindow) => {
|
|
731
779
|
assertParamExists("queryIsolatedMarginTierData", "symbol", symbol);
|
|
732
780
|
const localVarQueryParameter = {};
|
|
781
|
+
const localVarBodyParameter = {};
|
|
733
782
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
734
783
|
if (tier !== void 0 && tier !== null) localVarQueryParameter["tier"] = tier;
|
|
735
784
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -738,44 +787,51 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
738
787
|
return {
|
|
739
788
|
endpoint: "/sapi/v1/margin/isolatedMarginTier",
|
|
740
789
|
method: "GET",
|
|
741
|
-
|
|
790
|
+
queryParams: localVarQueryParameter,
|
|
791
|
+
bodyParams: localVarBodyParameter,
|
|
742
792
|
timeUnit: _timeUnit
|
|
743
793
|
};
|
|
744
794
|
},
|
|
745
795
|
queryLiabilityCoinLeverageBracketInCrossMarginProMode: async () => {
|
|
746
796
|
const localVarQueryParameter = {};
|
|
797
|
+
const localVarBodyParameter = {};
|
|
747
798
|
let _timeUnit;
|
|
748
799
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
749
800
|
return {
|
|
750
801
|
endpoint: "/sapi/v1/margin/leverageBracket",
|
|
751
802
|
method: "GET",
|
|
752
|
-
|
|
803
|
+
queryParams: localVarQueryParameter,
|
|
804
|
+
bodyParams: localVarBodyParameter,
|
|
753
805
|
timeUnit: _timeUnit
|
|
754
806
|
};
|
|
755
807
|
},
|
|
756
808
|
queryMarginAvailableInventory: async (type) => {
|
|
757
809
|
assertParamExists("queryMarginAvailableInventory", "type", type);
|
|
758
810
|
const localVarQueryParameter = {};
|
|
811
|
+
const localVarBodyParameter = {};
|
|
759
812
|
if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
|
|
760
813
|
let _timeUnit;
|
|
761
814
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
762
815
|
return {
|
|
763
816
|
endpoint: "/sapi/v1/margin/available-inventory",
|
|
764
817
|
method: "GET",
|
|
765
|
-
|
|
818
|
+
queryParams: localVarQueryParameter,
|
|
819
|
+
bodyParams: localVarBodyParameter,
|
|
766
820
|
timeUnit: _timeUnit
|
|
767
821
|
};
|
|
768
822
|
},
|
|
769
823
|
queryMarginPriceindex: async (symbol) => {
|
|
770
824
|
assertParamExists("queryMarginPriceindex", "symbol", symbol);
|
|
771
825
|
const localVarQueryParameter = {};
|
|
826
|
+
const localVarBodyParameter = {};
|
|
772
827
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
773
828
|
let _timeUnit;
|
|
774
829
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
775
830
|
return {
|
|
776
831
|
endpoint: "/sapi/v1/margin/priceIndex",
|
|
777
832
|
method: "GET",
|
|
778
|
-
|
|
833
|
+
queryParams: localVarQueryParameter,
|
|
834
|
+
bodyParams: localVarBodyParameter,
|
|
779
835
|
timeUnit: _timeUnit
|
|
780
836
|
};
|
|
781
837
|
}
|
|
@@ -803,7 +859,7 @@ var MarketDataApi = class {
|
|
|
803
859
|
*/
|
|
804
860
|
async crossMarginCollateralRatio() {
|
|
805
861
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.crossMarginCollateralRatio();
|
|
806
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
862
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
807
863
|
}
|
|
808
864
|
/**
|
|
809
865
|
* Get All Cross Margin Pairs
|
|
@@ -819,7 +875,7 @@ var MarketDataApi = class {
|
|
|
819
875
|
*/
|
|
820
876
|
async getAllCrossMarginPairs(requestParameters = {}) {
|
|
821
877
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllCrossMarginPairs(requestParameters?.symbol);
|
|
822
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
878
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
823
879
|
}
|
|
824
880
|
/**
|
|
825
881
|
* Get All Isolated Margin Symbol
|
|
@@ -835,7 +891,7 @@ var MarketDataApi = class {
|
|
|
835
891
|
*/
|
|
836
892
|
async getAllIsolatedMarginSymbol(requestParameters = {}) {
|
|
837
893
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllIsolatedMarginSymbol(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
838
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
894
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
839
895
|
}
|
|
840
896
|
/**
|
|
841
897
|
* Get All Margin Assets.
|
|
@@ -851,7 +907,7 @@ var MarketDataApi = class {
|
|
|
851
907
|
*/
|
|
852
908
|
async getAllMarginAssets(requestParameters = {}) {
|
|
853
909
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllMarginAssets(requestParameters?.asset);
|
|
854
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
910
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
855
911
|
}
|
|
856
912
|
/**
|
|
857
913
|
* Get tokens or symbols delist schedule for cross margin and isolated margin
|
|
@@ -867,7 +923,7 @@ var MarketDataApi = class {
|
|
|
867
923
|
*/
|
|
868
924
|
async getDelistSchedule(requestParameters = {}) {
|
|
869
925
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDelistSchedule(requestParameters?.recvWindow);
|
|
870
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
926
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
871
927
|
}
|
|
872
928
|
/**
|
|
873
929
|
* Query trading pairs with restriction on limit price range.
|
|
@@ -887,7 +943,7 @@ var MarketDataApi = class {
|
|
|
887
943
|
*/
|
|
888
944
|
async getLimitPricePairs() {
|
|
889
945
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLimitPricePairs();
|
|
890
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
946
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
891
947
|
}
|
|
892
948
|
/**
|
|
893
949
|
* Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin.
|
|
@@ -903,7 +959,7 @@ var MarketDataApi = class {
|
|
|
903
959
|
*/
|
|
904
960
|
async getListSchedule(requestParameters = {}) {
|
|
905
961
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getListSchedule(requestParameters?.recvWindow);
|
|
906
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
962
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
907
963
|
}
|
|
908
964
|
/**
|
|
909
965
|
* Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
|
|
@@ -919,7 +975,7 @@ var MarketDataApi = class {
|
|
|
919
975
|
*/
|
|
920
976
|
async queryIsolatedMarginTierData(requestParameters) {
|
|
921
977
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginTierData(requestParameters?.symbol, requestParameters?.tier, requestParameters?.recvWindow);
|
|
922
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
978
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
923
979
|
}
|
|
924
980
|
/**
|
|
925
981
|
* Liability Coin Leverage Bracket in Cross Margin Pro Mode
|
|
@@ -934,7 +990,7 @@ var MarketDataApi = class {
|
|
|
934
990
|
*/
|
|
935
991
|
async queryLiabilityCoinLeverageBracketInCrossMarginProMode() {
|
|
936
992
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLiabilityCoinLeverageBracketInCrossMarginProMode();
|
|
937
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
993
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
938
994
|
}
|
|
939
995
|
/**
|
|
940
996
|
* Margin available Inventory query
|
|
@@ -950,7 +1006,7 @@ var MarketDataApi = class {
|
|
|
950
1006
|
*/
|
|
951
1007
|
async queryMarginAvailableInventory(requestParameters) {
|
|
952
1008
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAvailableInventory(requestParameters?.type);
|
|
953
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1009
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
954
1010
|
}
|
|
955
1011
|
/**
|
|
956
1012
|
* Query Margin PriceIndex
|
|
@@ -966,7 +1022,7 @@ var MarketDataApi = class {
|
|
|
966
1022
|
*/
|
|
967
1023
|
async queryMarginPriceindex(requestParameters) {
|
|
968
1024
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginPriceindex(requestParameters?.symbol);
|
|
969
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1025
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
970
1026
|
}
|
|
971
1027
|
};
|
|
972
1028
|
|
|
@@ -991,36 +1047,42 @@ const RiskDataStreamApiAxiosParamCreator = function(configuration) {
|
|
|
991
1047
|
return {
|
|
992
1048
|
closeUserDataStream: async () => {
|
|
993
1049
|
const localVarQueryParameter = {};
|
|
1050
|
+
const localVarBodyParameter = {};
|
|
994
1051
|
let _timeUnit;
|
|
995
1052
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
996
1053
|
return {
|
|
997
1054
|
endpoint: "/sapi/v1/margin/listen-key",
|
|
998
1055
|
method: "DELETE",
|
|
999
|
-
|
|
1056
|
+
queryParams: localVarQueryParameter,
|
|
1057
|
+
bodyParams: localVarBodyParameter,
|
|
1000
1058
|
timeUnit: _timeUnit
|
|
1001
1059
|
};
|
|
1002
1060
|
},
|
|
1003
1061
|
keepaliveUserDataStream: async (listenKey) => {
|
|
1004
1062
|
assertParamExists("keepaliveUserDataStream", "listenKey", listenKey);
|
|
1005
1063
|
const localVarQueryParameter = {};
|
|
1064
|
+
const localVarBodyParameter = {};
|
|
1006
1065
|
if (listenKey !== void 0 && listenKey !== null) localVarQueryParameter["listenKey"] = listenKey;
|
|
1007
1066
|
let _timeUnit;
|
|
1008
1067
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1009
1068
|
return {
|
|
1010
1069
|
endpoint: "/sapi/v1/margin/listen-key",
|
|
1011
1070
|
method: "PUT",
|
|
1012
|
-
|
|
1071
|
+
queryParams: localVarQueryParameter,
|
|
1072
|
+
bodyParams: localVarBodyParameter,
|
|
1013
1073
|
timeUnit: _timeUnit
|
|
1014
1074
|
};
|
|
1015
1075
|
},
|
|
1016
1076
|
startUserDataStream: async () => {
|
|
1017
1077
|
const localVarQueryParameter = {};
|
|
1078
|
+
const localVarBodyParameter = {};
|
|
1018
1079
|
let _timeUnit;
|
|
1019
1080
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1020
1081
|
return {
|
|
1021
1082
|
endpoint: "/sapi/v1/margin/listen-key",
|
|
1022
1083
|
method: "POST",
|
|
1023
|
-
|
|
1084
|
+
queryParams: localVarQueryParameter,
|
|
1085
|
+
bodyParams: localVarBodyParameter,
|
|
1024
1086
|
timeUnit: _timeUnit
|
|
1025
1087
|
};
|
|
1026
1088
|
}
|
|
@@ -1048,7 +1110,7 @@ var RiskDataStreamApi = class {
|
|
|
1048
1110
|
*/
|
|
1049
1111
|
async closeUserDataStream() {
|
|
1050
1112
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.closeUserDataStream();
|
|
1051
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1113
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1052
1114
|
}
|
|
1053
1115
|
/**
|
|
1054
1116
|
* Keepalive a user data stream to prevent a time out.
|
|
@@ -1064,7 +1126,7 @@ var RiskDataStreamApi = class {
|
|
|
1064
1126
|
*/
|
|
1065
1127
|
async keepaliveUserDataStream(requestParameters) {
|
|
1066
1128
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.keepaliveUserDataStream(requestParameters?.listenKey);
|
|
1067
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1129
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1068
1130
|
}
|
|
1069
1131
|
/**
|
|
1070
1132
|
* Start a new user data stream.
|
|
@@ -1079,7 +1141,7 @@ var RiskDataStreamApi = class {
|
|
|
1079
1141
|
*/
|
|
1080
1142
|
async startUserDataStream() {
|
|
1081
1143
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.startUserDataStream();
|
|
1082
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1144
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
1083
1145
|
}
|
|
1084
1146
|
};
|
|
1085
1147
|
|
|
@@ -1105,6 +1167,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1105
1167
|
createSpecialKey: async (apiName, symbol, ip, publicKey, permissionMode, recvWindow) => {
|
|
1106
1168
|
assertParamExists("createSpecialKey", "apiName", apiName);
|
|
1107
1169
|
const localVarQueryParameter = {};
|
|
1170
|
+
const localVarBodyParameter = {};
|
|
1108
1171
|
if (apiName !== void 0 && apiName !== null) localVarQueryParameter["apiName"] = apiName;
|
|
1109
1172
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1110
1173
|
if (ip !== void 0 && ip !== null) localVarQueryParameter["ip"] = ip;
|
|
@@ -1116,12 +1179,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1116
1179
|
return {
|
|
1117
1180
|
endpoint: "/sapi/v1/margin/apiKey",
|
|
1118
1181
|
method: "POST",
|
|
1119
|
-
|
|
1182
|
+
queryParams: localVarQueryParameter,
|
|
1183
|
+
bodyParams: localVarBodyParameter,
|
|
1120
1184
|
timeUnit: _timeUnit
|
|
1121
1185
|
};
|
|
1122
1186
|
},
|
|
1123
1187
|
deleteSpecialKey: async (apiName, symbol, recvWindow) => {
|
|
1124
1188
|
const localVarQueryParameter = {};
|
|
1189
|
+
const localVarBodyParameter = {};
|
|
1125
1190
|
if (apiName !== void 0 && apiName !== null) localVarQueryParameter["apiName"] = apiName;
|
|
1126
1191
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1127
1192
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1130,13 +1195,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1130
1195
|
return {
|
|
1131
1196
|
endpoint: "/sapi/v1/margin/apiKey",
|
|
1132
1197
|
method: "DELETE",
|
|
1133
|
-
|
|
1198
|
+
queryParams: localVarQueryParameter,
|
|
1199
|
+
bodyParams: localVarBodyParameter,
|
|
1134
1200
|
timeUnit: _timeUnit
|
|
1135
1201
|
};
|
|
1136
1202
|
},
|
|
1137
1203
|
editIpForSpecialKey: async (ip, symbol, recvWindow) => {
|
|
1138
1204
|
assertParamExists("editIpForSpecialKey", "ip", ip);
|
|
1139
1205
|
const localVarQueryParameter = {};
|
|
1206
|
+
const localVarBodyParameter = {};
|
|
1140
1207
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1141
1208
|
if (ip !== void 0 && ip !== null) localVarQueryParameter["ip"] = ip;
|
|
1142
1209
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1145,12 +1212,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1145
1212
|
return {
|
|
1146
1213
|
endpoint: "/sapi/v1/margin/apiKey/ip",
|
|
1147
1214
|
method: "PUT",
|
|
1148
|
-
|
|
1215
|
+
queryParams: localVarQueryParameter,
|
|
1216
|
+
bodyParams: localVarBodyParameter,
|
|
1149
1217
|
timeUnit: _timeUnit
|
|
1150
1218
|
};
|
|
1151
1219
|
},
|
|
1152
1220
|
getForceLiquidationRecord: async (startTime, endTime, isolatedSymbol, current, size, recvWindow) => {
|
|
1153
1221
|
const localVarQueryParameter = {};
|
|
1222
|
+
const localVarBodyParameter = {};
|
|
1154
1223
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
1155
1224
|
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
1156
1225
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
@@ -1162,19 +1231,22 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1162
1231
|
return {
|
|
1163
1232
|
endpoint: "/sapi/v1/margin/forceLiquidationRec",
|
|
1164
1233
|
method: "GET",
|
|
1165
|
-
|
|
1234
|
+
queryParams: localVarQueryParameter,
|
|
1235
|
+
bodyParams: localVarBodyParameter,
|
|
1166
1236
|
timeUnit: _timeUnit
|
|
1167
1237
|
};
|
|
1168
1238
|
},
|
|
1169
1239
|
getSmallLiabilityExchangeCoinList: async (recvWindow) => {
|
|
1170
1240
|
const localVarQueryParameter = {};
|
|
1241
|
+
const localVarBodyParameter = {};
|
|
1171
1242
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1172
1243
|
let _timeUnit;
|
|
1173
1244
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1174
1245
|
return {
|
|
1175
1246
|
endpoint: "/sapi/v1/margin/exchange-small-liability",
|
|
1176
1247
|
method: "GET",
|
|
1177
|
-
|
|
1248
|
+
queryParams: localVarQueryParameter,
|
|
1249
|
+
bodyParams: localVarBodyParameter,
|
|
1178
1250
|
timeUnit: _timeUnit
|
|
1179
1251
|
};
|
|
1180
1252
|
},
|
|
@@ -1182,6 +1254,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1182
1254
|
assertParamExists("getSmallLiabilityExchangeHistory", "current", current);
|
|
1183
1255
|
assertParamExists("getSmallLiabilityExchangeHistory", "size", size);
|
|
1184
1256
|
const localVarQueryParameter = {};
|
|
1257
|
+
const localVarBodyParameter = {};
|
|
1185
1258
|
if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
|
|
1186
1259
|
if (size !== void 0 && size !== null) localVarQueryParameter["size"] = size;
|
|
1187
1260
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
@@ -1192,13 +1265,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1192
1265
|
return {
|
|
1193
1266
|
endpoint: "/sapi/v1/margin/exchange-small-liability-history",
|
|
1194
1267
|
method: "GET",
|
|
1195
|
-
|
|
1268
|
+
queryParams: localVarQueryParameter,
|
|
1269
|
+
bodyParams: localVarBodyParameter,
|
|
1196
1270
|
timeUnit: _timeUnit
|
|
1197
1271
|
};
|
|
1198
1272
|
},
|
|
1199
1273
|
marginAccountCancelAllOpenOrdersOnASymbol: async (symbol, isIsolated, recvWindow) => {
|
|
1200
1274
|
assertParamExists("marginAccountCancelAllOpenOrdersOnASymbol", "symbol", symbol);
|
|
1201
1275
|
const localVarQueryParameter = {};
|
|
1276
|
+
const localVarBodyParameter = {};
|
|
1202
1277
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1203
1278
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1204
1279
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1207,13 +1282,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1207
1282
|
return {
|
|
1208
1283
|
endpoint: "/sapi/v1/margin/openOrders",
|
|
1209
1284
|
method: "DELETE",
|
|
1210
|
-
|
|
1285
|
+
queryParams: localVarQueryParameter,
|
|
1286
|
+
bodyParams: localVarBodyParameter,
|
|
1211
1287
|
timeUnit: _timeUnit
|
|
1212
1288
|
};
|
|
1213
1289
|
},
|
|
1214
1290
|
marginAccountCancelOco: async (symbol, isIsolated, orderListId, listClientOrderId, newClientOrderId, recvWindow) => {
|
|
1215
1291
|
assertParamExists("marginAccountCancelOco", "symbol", symbol);
|
|
1216
1292
|
const localVarQueryParameter = {};
|
|
1293
|
+
const localVarBodyParameter = {};
|
|
1217
1294
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1218
1295
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1219
1296
|
if (orderListId !== void 0 && orderListId !== null) localVarQueryParameter["orderListId"] = orderListId;
|
|
@@ -1225,13 +1302,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1225
1302
|
return {
|
|
1226
1303
|
endpoint: "/sapi/v1/margin/orderList",
|
|
1227
1304
|
method: "DELETE",
|
|
1228
|
-
|
|
1305
|
+
queryParams: localVarQueryParameter,
|
|
1306
|
+
bodyParams: localVarBodyParameter,
|
|
1229
1307
|
timeUnit: _timeUnit
|
|
1230
1308
|
};
|
|
1231
1309
|
},
|
|
1232
1310
|
marginAccountCancelOrder: async (symbol, isIsolated, orderId, origClientOrderId, newClientOrderId, recvWindow) => {
|
|
1233
1311
|
assertParamExists("marginAccountCancelOrder", "symbol", symbol);
|
|
1234
1312
|
const localVarQueryParameter = {};
|
|
1313
|
+
const localVarBodyParameter = {};
|
|
1235
1314
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1236
1315
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1237
1316
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
@@ -1243,7 +1322,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1243
1322
|
return {
|
|
1244
1323
|
endpoint: "/sapi/v1/margin/order",
|
|
1245
1324
|
method: "DELETE",
|
|
1246
|
-
|
|
1325
|
+
queryParams: localVarQueryParameter,
|
|
1326
|
+
bodyParams: localVarBodyParameter,
|
|
1247
1327
|
timeUnit: _timeUnit
|
|
1248
1328
|
};
|
|
1249
1329
|
},
|
|
@@ -1254,6 +1334,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1254
1334
|
assertParamExists("marginAccountNewOco", "price", price);
|
|
1255
1335
|
assertParamExists("marginAccountNewOco", "stopPrice", stopPrice);
|
|
1256
1336
|
const localVarQueryParameter = {};
|
|
1337
|
+
const localVarBodyParameter = {};
|
|
1257
1338
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1258
1339
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1259
1340
|
if (listClientOrderId !== void 0 && listClientOrderId !== null) localVarQueryParameter["listClientOrderId"] = listClientOrderId;
|
|
@@ -1277,7 +1358,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1277
1358
|
return {
|
|
1278
1359
|
endpoint: "/sapi/v1/margin/order/oco",
|
|
1279
1360
|
method: "POST",
|
|
1280
|
-
|
|
1361
|
+
queryParams: localVarQueryParameter,
|
|
1362
|
+
bodyParams: localVarBodyParameter,
|
|
1281
1363
|
timeUnit: _timeUnit
|
|
1282
1364
|
};
|
|
1283
1365
|
},
|
|
@@ -1286,6 +1368,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1286
1368
|
assertParamExists("marginAccountNewOrder", "side", side);
|
|
1287
1369
|
assertParamExists("marginAccountNewOrder", "type", type);
|
|
1288
1370
|
const localVarQueryParameter = {};
|
|
1371
|
+
const localVarBodyParameter = {};
|
|
1289
1372
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1290
1373
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1291
1374
|
if (side !== void 0 && side !== null) localVarQueryParameter["side"] = side;
|
|
@@ -1307,7 +1390,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1307
1390
|
return {
|
|
1308
1391
|
endpoint: "/sapi/v1/margin/order",
|
|
1309
1392
|
method: "POST",
|
|
1310
|
-
|
|
1393
|
+
queryParams: localVarQueryParameter,
|
|
1394
|
+
bodyParams: localVarBodyParameter,
|
|
1311
1395
|
timeUnit: _timeUnit
|
|
1312
1396
|
};
|
|
1313
1397
|
},
|
|
@@ -1322,6 +1406,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1322
1406
|
assertParamExists("marginAccountNewOto", "pendingSide", pendingSide);
|
|
1323
1407
|
assertParamExists("marginAccountNewOto", "pendingQuantity", pendingQuantity);
|
|
1324
1408
|
const localVarQueryParameter = {};
|
|
1409
|
+
const localVarBodyParameter = {};
|
|
1325
1410
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1326
1411
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1327
1412
|
if (listClientOrderId !== void 0 && listClientOrderId !== null) localVarQueryParameter["listClientOrderId"] = listClientOrderId;
|
|
@@ -1350,7 +1435,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1350
1435
|
return {
|
|
1351
1436
|
endpoint: "/sapi/v1/margin/order/oto",
|
|
1352
1437
|
method: "POST",
|
|
1353
|
-
|
|
1438
|
+
queryParams: localVarQueryParameter,
|
|
1439
|
+
bodyParams: localVarBodyParameter,
|
|
1354
1440
|
timeUnit: _timeUnit
|
|
1355
1441
|
};
|
|
1356
1442
|
},
|
|
@@ -1364,6 +1450,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1364
1450
|
assertParamExists("marginAccountNewOtoco", "pendingQuantity", pendingQuantity);
|
|
1365
1451
|
assertParamExists("marginAccountNewOtoco", "pendingAboveType", pendingAboveType);
|
|
1366
1452
|
const localVarQueryParameter = {};
|
|
1453
|
+
const localVarBodyParameter = {};
|
|
1367
1454
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1368
1455
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1369
1456
|
if (sideEffectType !== void 0 && sideEffectType !== null) localVarQueryParameter["sideEffectType"] = sideEffectType;
|
|
@@ -1399,13 +1486,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1399
1486
|
return {
|
|
1400
1487
|
endpoint: "/sapi/v1/margin/order/otoco",
|
|
1401
1488
|
method: "POST",
|
|
1402
|
-
|
|
1489
|
+
queryParams: localVarQueryParameter,
|
|
1490
|
+
bodyParams: localVarBodyParameter,
|
|
1403
1491
|
timeUnit: _timeUnit
|
|
1404
1492
|
};
|
|
1405
1493
|
},
|
|
1406
1494
|
marginManualLiquidation: async (type, symbol, recvWindow) => {
|
|
1407
1495
|
assertParamExists("marginManualLiquidation", "type", type);
|
|
1408
1496
|
const localVarQueryParameter = {};
|
|
1497
|
+
const localVarBodyParameter = {};
|
|
1409
1498
|
if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
|
|
1410
1499
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1411
1500
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1414,12 +1503,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1414
1503
|
return {
|
|
1415
1504
|
endpoint: "/sapi/v1/margin/manual-liquidation",
|
|
1416
1505
|
method: "POST",
|
|
1417
|
-
|
|
1506
|
+
queryParams: localVarQueryParameter,
|
|
1507
|
+
bodyParams: localVarBodyParameter,
|
|
1418
1508
|
timeUnit: _timeUnit
|
|
1419
1509
|
};
|
|
1420
1510
|
},
|
|
1421
1511
|
queryCurrentMarginOrderCountUsage: async (isIsolated, symbol, recvWindow) => {
|
|
1422
1512
|
const localVarQueryParameter = {};
|
|
1513
|
+
const localVarBodyParameter = {};
|
|
1423
1514
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1424
1515
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1425
1516
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1428,12 +1519,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1428
1519
|
return {
|
|
1429
1520
|
endpoint: "/sapi/v1/margin/rateLimit/order",
|
|
1430
1521
|
method: "GET",
|
|
1431
|
-
|
|
1522
|
+
queryParams: localVarQueryParameter,
|
|
1523
|
+
bodyParams: localVarBodyParameter,
|
|
1432
1524
|
timeUnit: _timeUnit
|
|
1433
1525
|
};
|
|
1434
1526
|
},
|
|
1435
1527
|
queryMarginAccountsAllOco: async (isIsolated, symbol, fromId, startTime, endTime, limit, recvWindow) => {
|
|
1436
1528
|
const localVarQueryParameter = {};
|
|
1529
|
+
const localVarBodyParameter = {};
|
|
1437
1530
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1438
1531
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1439
1532
|
if (fromId !== void 0 && fromId !== null) localVarQueryParameter["fromId"] = fromId;
|
|
@@ -1446,13 +1539,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1446
1539
|
return {
|
|
1447
1540
|
endpoint: "/sapi/v1/margin/allOrderList",
|
|
1448
1541
|
method: "GET",
|
|
1449
|
-
|
|
1542
|
+
queryParams: localVarQueryParameter,
|
|
1543
|
+
bodyParams: localVarBodyParameter,
|
|
1450
1544
|
timeUnit: _timeUnit
|
|
1451
1545
|
};
|
|
1452
1546
|
},
|
|
1453
1547
|
queryMarginAccountsAllOrders: async (symbol, isIsolated, orderId, startTime, endTime, limit, recvWindow) => {
|
|
1454
1548
|
assertParamExists("queryMarginAccountsAllOrders", "symbol", symbol);
|
|
1455
1549
|
const localVarQueryParameter = {};
|
|
1550
|
+
const localVarBodyParameter = {};
|
|
1456
1551
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1457
1552
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1458
1553
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
@@ -1465,12 +1560,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1465
1560
|
return {
|
|
1466
1561
|
endpoint: "/sapi/v1/margin/allOrders",
|
|
1467
1562
|
method: "GET",
|
|
1468
|
-
|
|
1563
|
+
queryParams: localVarQueryParameter,
|
|
1564
|
+
bodyParams: localVarBodyParameter,
|
|
1469
1565
|
timeUnit: _timeUnit
|
|
1470
1566
|
};
|
|
1471
1567
|
},
|
|
1472
1568
|
queryMarginAccountsOco: async (isIsolated, symbol, orderListId, origClientOrderId, recvWindow) => {
|
|
1473
1569
|
const localVarQueryParameter = {};
|
|
1570
|
+
const localVarBodyParameter = {};
|
|
1474
1571
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1475
1572
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1476
1573
|
if (orderListId !== void 0 && orderListId !== null) localVarQueryParameter["orderListId"] = orderListId;
|
|
@@ -1481,12 +1578,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1481
1578
|
return {
|
|
1482
1579
|
endpoint: "/sapi/v1/margin/orderList",
|
|
1483
1580
|
method: "GET",
|
|
1484
|
-
|
|
1581
|
+
queryParams: localVarQueryParameter,
|
|
1582
|
+
bodyParams: localVarBodyParameter,
|
|
1485
1583
|
timeUnit: _timeUnit
|
|
1486
1584
|
};
|
|
1487
1585
|
},
|
|
1488
1586
|
queryMarginAccountsOpenOco: async (isIsolated, symbol, recvWindow) => {
|
|
1489
1587
|
const localVarQueryParameter = {};
|
|
1588
|
+
const localVarBodyParameter = {};
|
|
1490
1589
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1491
1590
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1492
1591
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1495,12 +1594,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1495
1594
|
return {
|
|
1496
1595
|
endpoint: "/sapi/v1/margin/openOrderList",
|
|
1497
1596
|
method: "GET",
|
|
1498
|
-
|
|
1597
|
+
queryParams: localVarQueryParameter,
|
|
1598
|
+
bodyParams: localVarBodyParameter,
|
|
1499
1599
|
timeUnit: _timeUnit
|
|
1500
1600
|
};
|
|
1501
1601
|
},
|
|
1502
1602
|
queryMarginAccountsOpenOrders: async (symbol, isIsolated, recvWindow) => {
|
|
1503
1603
|
const localVarQueryParameter = {};
|
|
1604
|
+
const localVarBodyParameter = {};
|
|
1504
1605
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1505
1606
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1506
1607
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -1509,13 +1610,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1509
1610
|
return {
|
|
1510
1611
|
endpoint: "/sapi/v1/margin/openOrders",
|
|
1511
1612
|
method: "GET",
|
|
1512
|
-
|
|
1613
|
+
queryParams: localVarQueryParameter,
|
|
1614
|
+
bodyParams: localVarBodyParameter,
|
|
1513
1615
|
timeUnit: _timeUnit
|
|
1514
1616
|
};
|
|
1515
1617
|
},
|
|
1516
1618
|
queryMarginAccountsOrder: async (symbol, isIsolated, orderId, origClientOrderId, recvWindow) => {
|
|
1517
1619
|
assertParamExists("queryMarginAccountsOrder", "symbol", symbol);
|
|
1518
1620
|
const localVarQueryParameter = {};
|
|
1621
|
+
const localVarBodyParameter = {};
|
|
1519
1622
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1520
1623
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1521
1624
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
@@ -1526,13 +1629,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1526
1629
|
return {
|
|
1527
1630
|
endpoint: "/sapi/v1/margin/order",
|
|
1528
1631
|
method: "GET",
|
|
1529
|
-
|
|
1632
|
+
queryParams: localVarQueryParameter,
|
|
1633
|
+
bodyParams: localVarBodyParameter,
|
|
1530
1634
|
timeUnit: _timeUnit
|
|
1531
1635
|
};
|
|
1532
1636
|
},
|
|
1533
1637
|
queryMarginAccountsTradeList: async (symbol, isIsolated, orderId, startTime, endTime, fromId, limit, recvWindow) => {
|
|
1534
1638
|
assertParamExists("queryMarginAccountsTradeList", "symbol", symbol);
|
|
1535
1639
|
const localVarQueryParameter = {};
|
|
1640
|
+
const localVarBodyParameter = {};
|
|
1536
1641
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1537
1642
|
if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
|
|
1538
1643
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
@@ -1546,12 +1651,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1546
1651
|
return {
|
|
1547
1652
|
endpoint: "/sapi/v1/margin/myTrades",
|
|
1548
1653
|
method: "GET",
|
|
1549
|
-
|
|
1654
|
+
queryParams: localVarQueryParameter,
|
|
1655
|
+
bodyParams: localVarBodyParameter,
|
|
1550
1656
|
timeUnit: _timeUnit
|
|
1551
1657
|
};
|
|
1552
1658
|
},
|
|
1553
1659
|
querySpecialKey: async (symbol, recvWindow) => {
|
|
1554
1660
|
const localVarQueryParameter = {};
|
|
1661
|
+
const localVarBodyParameter = {};
|
|
1555
1662
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1556
1663
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1557
1664
|
let _timeUnit;
|
|
@@ -1559,12 +1666,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1559
1666
|
return {
|
|
1560
1667
|
endpoint: "/sapi/v1/margin/apiKey",
|
|
1561
1668
|
method: "GET",
|
|
1562
|
-
|
|
1669
|
+
queryParams: localVarQueryParameter,
|
|
1670
|
+
bodyParams: localVarBodyParameter,
|
|
1563
1671
|
timeUnit: _timeUnit
|
|
1564
1672
|
};
|
|
1565
1673
|
},
|
|
1566
1674
|
querySpecialKeyList: async (symbol, recvWindow) => {
|
|
1567
1675
|
const localVarQueryParameter = {};
|
|
1676
|
+
const localVarBodyParameter = {};
|
|
1568
1677
|
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
1569
1678
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1570
1679
|
let _timeUnit;
|
|
@@ -1572,13 +1681,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1572
1681
|
return {
|
|
1573
1682
|
endpoint: "/sapi/v1/margin/api-key-list",
|
|
1574
1683
|
method: "GET",
|
|
1575
|
-
|
|
1684
|
+
queryParams: localVarQueryParameter,
|
|
1685
|
+
bodyParams: localVarBodyParameter,
|
|
1576
1686
|
timeUnit: _timeUnit
|
|
1577
1687
|
};
|
|
1578
1688
|
},
|
|
1579
1689
|
smallLiabilityExchange: async (assetNames, recvWindow) => {
|
|
1580
1690
|
assertParamExists("smallLiabilityExchange", "assetNames", assetNames);
|
|
1581
1691
|
const localVarQueryParameter = {};
|
|
1692
|
+
const localVarBodyParameter = {};
|
|
1582
1693
|
if (assetNames) localVarQueryParameter["assetNames"] = assetNames;
|
|
1583
1694
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1584
1695
|
let _timeUnit;
|
|
@@ -1586,7 +1697,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1586
1697
|
return {
|
|
1587
1698
|
endpoint: "/sapi/v1/margin/exchange-small-liability",
|
|
1588
1699
|
method: "POST",
|
|
1589
|
-
|
|
1700
|
+
queryParams: localVarQueryParameter,
|
|
1701
|
+
bodyParams: localVarBodyParameter,
|
|
1590
1702
|
timeUnit: _timeUnit
|
|
1591
1703
|
};
|
|
1592
1704
|
}
|
|
@@ -1635,7 +1747,7 @@ var TradeApi = class {
|
|
|
1635
1747
|
*/
|
|
1636
1748
|
async createSpecialKey(requestParameters) {
|
|
1637
1749
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.createSpecialKey(requestParameters?.apiName, requestParameters?.symbol, requestParameters?.ip, requestParameters?.publicKey, requestParameters?.permissionMode, requestParameters?.recvWindow);
|
|
1638
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1750
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1639
1751
|
}
|
|
1640
1752
|
/**
|
|
1641
1753
|
* This only applies to Special Key for Low Latency Trading.
|
|
@@ -1655,7 +1767,7 @@ var TradeApi = class {
|
|
|
1655
1767
|
*/
|
|
1656
1768
|
async deleteSpecialKey(requestParameters = {}) {
|
|
1657
1769
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.deleteSpecialKey(requestParameters?.apiName, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1658
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1770
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1659
1771
|
}
|
|
1660
1772
|
/**
|
|
1661
1773
|
* Edit ip restriction. This only applies to Special Key for Low Latency Trading.
|
|
@@ -1673,7 +1785,7 @@ var TradeApi = class {
|
|
|
1673
1785
|
*/
|
|
1674
1786
|
async editIpForSpecialKey(requestParameters) {
|
|
1675
1787
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.editIpForSpecialKey(requestParameters?.ip, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1676
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1788
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1677
1789
|
}
|
|
1678
1790
|
/**
|
|
1679
1791
|
* Get Force Liquidation Record
|
|
@@ -1691,7 +1803,7 @@ var TradeApi = class {
|
|
|
1691
1803
|
*/
|
|
1692
1804
|
async getForceLiquidationRecord(requestParameters = {}) {
|
|
1693
1805
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getForceLiquidationRecord(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.isolatedSymbol, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
|
|
1694
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1806
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1695
1807
|
}
|
|
1696
1808
|
/**
|
|
1697
1809
|
* Query the coins which can be small liability exchange
|
|
@@ -1707,7 +1819,7 @@ var TradeApi = class {
|
|
|
1707
1819
|
*/
|
|
1708
1820
|
async getSmallLiabilityExchangeCoinList(requestParameters = {}) {
|
|
1709
1821
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSmallLiabilityExchangeCoinList(requestParameters?.recvWindow);
|
|
1710
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1822
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1711
1823
|
}
|
|
1712
1824
|
/**
|
|
1713
1825
|
* Get Small liability Exchange History
|
|
@@ -1723,7 +1835,7 @@ var TradeApi = class {
|
|
|
1723
1835
|
*/
|
|
1724
1836
|
async getSmallLiabilityExchangeHistory(requestParameters) {
|
|
1725
1837
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSmallLiabilityExchangeHistory(requestParameters?.current, requestParameters?.size, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
1726
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1838
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1727
1839
|
}
|
|
1728
1840
|
/**
|
|
1729
1841
|
* Cancels all active orders on a symbol for margin account.<br></br>
|
|
@@ -1740,7 +1852,7 @@ var TradeApi = class {
|
|
|
1740
1852
|
*/
|
|
1741
1853
|
async marginAccountCancelAllOpenOrdersOnASymbol(requestParameters) {
|
|
1742
1854
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelAllOpenOrdersOnASymbol(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.recvWindow);
|
|
1743
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1855
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1744
1856
|
}
|
|
1745
1857
|
/**
|
|
1746
1858
|
* Cancel an entire Order List for a margin account.
|
|
@@ -1758,7 +1870,7 @@ var TradeApi = class {
|
|
|
1758
1870
|
*/
|
|
1759
1871
|
async marginAccountCancelOco(requestParameters) {
|
|
1760
1872
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelOco(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderListId, requestParameters?.listClientOrderId, requestParameters?.newClientOrderId, requestParameters?.recvWindow);
|
|
1761
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1873
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1762
1874
|
}
|
|
1763
1875
|
/**
|
|
1764
1876
|
* Cancel an active order for margin account.
|
|
@@ -1776,7 +1888,7 @@ var TradeApi = class {
|
|
|
1776
1888
|
*/
|
|
1777
1889
|
async marginAccountCancelOrder(requestParameters) {
|
|
1778
1890
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelOrder(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.origClientOrderId, requestParameters?.newClientOrderId, requestParameters?.recvWindow);
|
|
1779
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1891
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1780
1892
|
}
|
|
1781
1893
|
/**
|
|
1782
1894
|
* Send in a new OCO for a margin account
|
|
@@ -1794,7 +1906,7 @@ var TradeApi = class {
|
|
|
1794
1906
|
*/
|
|
1795
1907
|
async marginAccountNewOco(requestParameters) {
|
|
1796
1908
|
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);
|
|
1797
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1909
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1798
1910
|
}
|
|
1799
1911
|
/**
|
|
1800
1912
|
* Post a new order for margin account.
|
|
@@ -1812,7 +1924,7 @@ var TradeApi = class {
|
|
|
1812
1924
|
*/
|
|
1813
1925
|
async marginAccountNewOrder(requestParameters) {
|
|
1814
1926
|
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);
|
|
1815
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1927
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1816
1928
|
}
|
|
1817
1929
|
/**
|
|
1818
1930
|
* Post a new OTO order for margin account:
|
|
@@ -1838,7 +1950,7 @@ var TradeApi = class {
|
|
|
1838
1950
|
*/
|
|
1839
1951
|
async marginAccountNewOto(requestParameters) {
|
|
1840
1952
|
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);
|
|
1841
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1953
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1842
1954
|
}
|
|
1843
1955
|
/**
|
|
1844
1956
|
* Post a new OTOCO order for margin account:
|
|
@@ -1864,7 +1976,7 @@ var TradeApi = class {
|
|
|
1864
1976
|
*/
|
|
1865
1977
|
async marginAccountNewOtoco(requestParameters) {
|
|
1866
1978
|
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);
|
|
1867
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1979
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1868
1980
|
}
|
|
1869
1981
|
/**
|
|
1870
1982
|
* Margin Manual Liquidation
|
|
@@ -1883,7 +1995,7 @@ var TradeApi = class {
|
|
|
1883
1995
|
*/
|
|
1884
1996
|
async marginManualLiquidation(requestParameters) {
|
|
1885
1997
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginManualLiquidation(requestParameters?.type, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1886
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
1998
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1887
1999
|
}
|
|
1888
2000
|
/**
|
|
1889
2001
|
* Displays the user's current margin order count usage for all intervals.
|
|
@@ -1899,7 +2011,7 @@ var TradeApi = class {
|
|
|
1899
2011
|
*/
|
|
1900
2012
|
async queryCurrentMarginOrderCountUsage(requestParameters = {}) {
|
|
1901
2013
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCurrentMarginOrderCountUsage(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1902
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2014
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1903
2015
|
}
|
|
1904
2016
|
/**
|
|
1905
2017
|
* Retrieves all OCO for a specific margin account based on provided optional parameters
|
|
@@ -1915,7 +2027,7 @@ var TradeApi = class {
|
|
|
1915
2027
|
*/
|
|
1916
2028
|
async queryMarginAccountsAllOco(requestParameters = {}) {
|
|
1917
2029
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsAllOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.fromId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
1918
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2030
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1919
2031
|
}
|
|
1920
2032
|
/**
|
|
1921
2033
|
* Query Margin Account's All Orders
|
|
@@ -1935,7 +2047,7 @@ var TradeApi = class {
|
|
|
1935
2047
|
*/
|
|
1936
2048
|
async queryMarginAccountsAllOrders(requestParameters) {
|
|
1937
2049
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsAllOrders(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
1938
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2050
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1939
2051
|
}
|
|
1940
2052
|
/**
|
|
1941
2053
|
* Retrieves a specific OCO based on provided optional parameters
|
|
@@ -1951,7 +2063,7 @@ var TradeApi = class {
|
|
|
1951
2063
|
*/
|
|
1952
2064
|
async queryMarginAccountsOco(requestParameters = {}) {
|
|
1953
2065
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.orderListId, requestParameters?.origClientOrderId, requestParameters?.recvWindow);
|
|
1954
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2066
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1955
2067
|
}
|
|
1956
2068
|
/**
|
|
1957
2069
|
* Query Margin Account's Open OCO
|
|
@@ -1967,7 +2079,7 @@ var TradeApi = class {
|
|
|
1967
2079
|
*/
|
|
1968
2080
|
async queryMarginAccountsOpenOco(requestParameters = {}) {
|
|
1969
2081
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOpenOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.recvWindow);
|
|
1970
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2082
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1971
2083
|
}
|
|
1972
2084
|
/**
|
|
1973
2085
|
* Query Margin Account's Open Orders
|
|
@@ -1987,7 +2099,7 @@ var TradeApi = class {
|
|
|
1987
2099
|
*/
|
|
1988
2100
|
async queryMarginAccountsOpenOrders(requestParameters = {}) {
|
|
1989
2101
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOpenOrders(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.recvWindow);
|
|
1990
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2102
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1991
2103
|
}
|
|
1992
2104
|
/**
|
|
1993
2105
|
* Query Margin Account's Order
|
|
@@ -2006,7 +2118,7 @@ var TradeApi = class {
|
|
|
2006
2118
|
*/
|
|
2007
2119
|
async queryMarginAccountsOrder(requestParameters) {
|
|
2008
2120
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOrder(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.origClientOrderId, requestParameters?.recvWindow);
|
|
2009
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2121
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2010
2122
|
}
|
|
2011
2123
|
/**
|
|
2012
2124
|
* Query Margin Account's Trade List
|
|
@@ -2025,7 +2137,7 @@ var TradeApi = class {
|
|
|
2025
2137
|
*/
|
|
2026
2138
|
async queryMarginAccountsTradeList(requestParameters) {
|
|
2027
2139
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsTradeList(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.fromId, requestParameters?.limit, requestParameters?.recvWindow);
|
|
2028
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2140
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2029
2141
|
}
|
|
2030
2142
|
/**
|
|
2031
2143
|
* Query Special Key Information.
|
|
@@ -2043,7 +2155,7 @@ var TradeApi = class {
|
|
|
2043
2155
|
*/
|
|
2044
2156
|
async querySpecialKey(requestParameters = {}) {
|
|
2045
2157
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySpecialKey(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
2046
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2158
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2047
2159
|
}
|
|
2048
2160
|
/**
|
|
2049
2161
|
* This only applies to Special Key for Low Latency Trading.
|
|
@@ -2059,7 +2171,7 @@ var TradeApi = class {
|
|
|
2059
2171
|
*/
|
|
2060
2172
|
async querySpecialKeyList(requestParameters = {}) {
|
|
2061
2173
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySpecialKeyList(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
2062
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2174
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2063
2175
|
}
|
|
2064
2176
|
/**
|
|
2065
2177
|
* Small Liability Exchange
|
|
@@ -2079,7 +2191,7 @@ var TradeApi = class {
|
|
|
2079
2191
|
*/
|
|
2080
2192
|
async smallLiabilityExchange(requestParameters) {
|
|
2081
2193
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.smallLiabilityExchange(requestParameters?.assetNames, requestParameters?.recvWindow);
|
|
2082
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2194
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2083
2195
|
}
|
|
2084
2196
|
};
|
|
2085
2197
|
let MarginAccountNewOcoSideEnum = /* @__PURE__ */ function(MarginAccountNewOcoSideEnum$1) {
|
|
@@ -2144,6 +2256,7 @@ const TransferApiAxiosParamCreator = function(configuration) {
|
|
|
2144
2256
|
return {
|
|
2145
2257
|
getCrossMarginTransferHistory: async (asset, type, startTime, endTime, current, size, isolatedSymbol, recvWindow) => {
|
|
2146
2258
|
const localVarQueryParameter = {};
|
|
2259
|
+
const localVarBodyParameter = {};
|
|
2147
2260
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
2148
2261
|
if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
|
|
2149
2262
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
@@ -2157,13 +2270,15 @@ const TransferApiAxiosParamCreator = function(configuration) {
|
|
|
2157
2270
|
return {
|
|
2158
2271
|
endpoint: "/sapi/v1/margin/transfer",
|
|
2159
2272
|
method: "GET",
|
|
2160
|
-
|
|
2273
|
+
queryParams: localVarQueryParameter,
|
|
2274
|
+
bodyParams: localVarBodyParameter,
|
|
2161
2275
|
timeUnit: _timeUnit
|
|
2162
2276
|
};
|
|
2163
2277
|
},
|
|
2164
2278
|
queryMaxTransferOutAmount: async (asset, isolatedSymbol, recvWindow) => {
|
|
2165
2279
|
assertParamExists("queryMaxTransferOutAmount", "asset", asset);
|
|
2166
2280
|
const localVarQueryParameter = {};
|
|
2281
|
+
const localVarBodyParameter = {};
|
|
2167
2282
|
if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
|
|
2168
2283
|
if (isolatedSymbol !== void 0 && isolatedSymbol !== null) localVarQueryParameter["isolatedSymbol"] = isolatedSymbol;
|
|
2169
2284
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -2172,7 +2287,8 @@ const TransferApiAxiosParamCreator = function(configuration) {
|
|
|
2172
2287
|
return {
|
|
2173
2288
|
endpoint: "/sapi/v1/margin/maxTransferable",
|
|
2174
2289
|
method: "GET",
|
|
2175
|
-
|
|
2290
|
+
queryParams: localVarQueryParameter,
|
|
2291
|
+
bodyParams: localVarBodyParameter,
|
|
2176
2292
|
timeUnit: _timeUnit
|
|
2177
2293
|
};
|
|
2178
2294
|
}
|
|
@@ -2205,7 +2321,7 @@ var TransferApi = class {
|
|
|
2205
2321
|
*/
|
|
2206
2322
|
async getCrossMarginTransferHistory(requestParameters = {}) {
|
|
2207
2323
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCrossMarginTransferHistory(requestParameters?.asset, requestParameters?.type, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
|
|
2208
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2324
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2209
2325
|
}
|
|
2210
2326
|
/**
|
|
2211
2327
|
* Query Max Transfer-Out Amount
|
|
@@ -2223,7 +2339,7 @@ var TransferApi = class {
|
|
|
2223
2339
|
*/
|
|
2224
2340
|
async queryMaxTransferOutAmount(requestParameters) {
|
|
2225
2341
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMaxTransferOutAmount(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
|
|
2226
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
2342
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
2227
2343
|
}
|
|
2228
2344
|
};
|
|
2229
2345
|
|
|
@@ -2255,23 +2371,25 @@ var RestAPI = class {
|
|
|
2255
2371
|
* Generic function to send a request.
|
|
2256
2372
|
* @param endpoint - The API endpoint to call.
|
|
2257
2373
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
2258
|
-
* @param
|
|
2374
|
+
* @param queryParams - Query parameters for the request.
|
|
2375
|
+
* @param bodyParams - Body parameters for the request.
|
|
2259
2376
|
*
|
|
2260
2377
|
* @returns A promise resolving to the response data object.
|
|
2261
2378
|
*/
|
|
2262
|
-
sendRequest(endpoint, method,
|
|
2263
|
-
return sendRequest(this.configuration, endpoint, method,
|
|
2379
|
+
sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
2380
|
+
return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
|
|
2264
2381
|
}
|
|
2265
2382
|
/**
|
|
2266
2383
|
* Generic function to send a signed request.
|
|
2267
2384
|
* @param endpoint - The API endpoint to call.
|
|
2268
2385
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
2269
|
-
* @param
|
|
2386
|
+
* @param queryParams - Query parameters for the request.
|
|
2387
|
+
* @param bodyParams - Body parameters for the request.
|
|
2270
2388
|
*
|
|
2271
2389
|
* @returns A promise resolving to the response data object.
|
|
2272
2390
|
*/
|
|
2273
|
-
sendSignedRequest(endpoint, method,
|
|
2274
|
-
return sendRequest(this.configuration, endpoint, method,
|
|
2391
|
+
sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
2392
|
+
return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
|
|
2275
2393
|
}
|
|
2276
2394
|
/**
|
|
2277
2395
|
* Adjust cross margin max leverage
|