@binance/margin-trading 9.0.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +187 -582
- package/dist/index.d.ts +187 -582
- package/dist/index.js +126 -540
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +103 -520
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20,31 +20,31 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
BadRequestError: () =>
|
|
24
|
-
ConnectorClientError: () =>
|
|
25
|
-
ForbiddenError: () =>
|
|
26
|
-
MARGIN_TRADING_REST_API_PROD_URL: () =>
|
|
27
|
-
MARGIN_TRADING_RISK_WS_STREAMS_PROD_URL: () =>
|
|
28
|
-
MARGIN_TRADING_WS_STREAMS_PROD_URL: () =>
|
|
23
|
+
BadRequestError: () => import_common11.BadRequestError,
|
|
24
|
+
ConnectorClientError: () => import_common11.ConnectorClientError,
|
|
25
|
+
ForbiddenError: () => import_common11.ForbiddenError,
|
|
26
|
+
MARGIN_TRADING_REST_API_PROD_URL: () => import_common11.MARGIN_TRADING_REST_API_PROD_URL,
|
|
27
|
+
MARGIN_TRADING_RISK_WS_STREAMS_PROD_URL: () => import_common11.MARGIN_TRADING_RISK_WS_STREAMS_PROD_URL,
|
|
28
|
+
MARGIN_TRADING_WS_STREAMS_PROD_URL: () => import_common11.MARGIN_TRADING_WS_STREAMS_PROD_URL,
|
|
29
29
|
MarginTrading: () => MarginTrading,
|
|
30
30
|
MarginTradingRestAPI: () => rest_api_exports,
|
|
31
31
|
MarginTradingWebsocketStreams: () => websocket_streams_exports,
|
|
32
|
-
NetworkError: () =>
|
|
33
|
-
NotFoundError: () =>
|
|
34
|
-
RateLimitBanError: () =>
|
|
35
|
-
RequiredError: () =>
|
|
36
|
-
ServerError: () =>
|
|
37
|
-
TooManyRequestsError: () =>
|
|
38
|
-
UnauthorizedError: () =>
|
|
32
|
+
NetworkError: () => import_common11.NetworkError,
|
|
33
|
+
NotFoundError: () => import_common11.NotFoundError,
|
|
34
|
+
RateLimitBanError: () => import_common11.RateLimitBanError,
|
|
35
|
+
RequiredError: () => import_common11.RequiredError,
|
|
36
|
+
ServerError: () => import_common11.ServerError,
|
|
37
|
+
TooManyRequestsError: () => import_common11.TooManyRequestsError,
|
|
38
|
+
UnauthorizedError: () => import_common11.UnauthorizedError
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(index_exports);
|
|
41
41
|
|
|
42
42
|
// src/margin-trading.ts
|
|
43
|
-
var
|
|
43
|
+
var import_common10 = require("@binance/common");
|
|
44
44
|
|
|
45
45
|
// package.json
|
|
46
46
|
var name = "@binance/margin-trading";
|
|
47
|
-
var version = "
|
|
47
|
+
var version = "10.0.0";
|
|
48
48
|
|
|
49
49
|
// src/rest-api/index.ts
|
|
50
50
|
var rest_api_exports = {};
|
|
@@ -62,7 +62,6 @@ __export(rest_api_exports, {
|
|
|
62
62
|
RestAPI: () => RestAPI,
|
|
63
63
|
RiskDataStreamApi: () => RiskDataStreamApi,
|
|
64
64
|
TradeApi: () => TradeApi,
|
|
65
|
-
TradeDataStreamApi: () => TradeDataStreamApi,
|
|
66
65
|
TransferApi: () => TransferApi
|
|
67
66
|
});
|
|
68
67
|
|
|
@@ -78,7 +77,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
78
77
|
* Weight: 3000
|
|
79
78
|
*
|
|
80
79
|
* @summary Adjust cross margin max leverage (USER_DATA)
|
|
81
|
-
* @param {number} maxLeverage Can only adjust 3 , 5 or 10,Example: maxLeverage = 5 or 3 for Cross Margin Classic; maxLeverage=10 for Cross Margin Pro 10x leverage or 20x if compliance allows.
|
|
80
|
+
* @param {number | bigint} maxLeverage Can only adjust 3 , 5 or 10,Example: maxLeverage = 5 or 3 for Cross Margin Classic; maxLeverage=10 for Cross Margin Pro 10x leverage or 20x if compliance allows.
|
|
82
81
|
*
|
|
83
82
|
* @throws {RequiredError}
|
|
84
83
|
*/
|
|
@@ -105,7 +104,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
105
104
|
*
|
|
106
105
|
* @summary Disable Isolated Margin Account (TRADE)
|
|
107
106
|
* @param {string} symbol
|
|
108
|
-
* @param {number} [recvWindow] No more than 60000
|
|
107
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
109
108
|
*
|
|
110
109
|
* @throws {RequiredError}
|
|
111
110
|
*/
|
|
@@ -134,7 +133,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
134
133
|
*
|
|
135
134
|
* @summary Enable Isolated Margin Account (TRADE)
|
|
136
135
|
* @param {string} symbol
|
|
137
|
-
* @param {number} [recvWindow] No more than 60000
|
|
136
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
138
137
|
*
|
|
139
138
|
* @throws {RequiredError}
|
|
140
139
|
*/
|
|
@@ -162,7 +161,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
162
161
|
* Weight: 1(IP)
|
|
163
162
|
*
|
|
164
163
|
* @summary Get BNB Burn Status (USER_DATA)
|
|
165
|
-
* @param {number} [recvWindow] No more than 60000
|
|
164
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
166
165
|
*
|
|
167
166
|
* @throws {RequiredError}
|
|
168
167
|
*/
|
|
@@ -186,7 +185,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
186
185
|
* Weight: 10(IP)
|
|
187
186
|
*
|
|
188
187
|
* @summary Get Summary of Margin account (USER_DATA)
|
|
189
|
-
* @param {number} [recvWindow] No more than 60000
|
|
188
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
190
189
|
*
|
|
191
190
|
* @throws {RequiredError}
|
|
192
191
|
*/
|
|
@@ -213,11 +212,11 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
213
212
|
* @param {string} [asset]
|
|
214
213
|
* @param {string} [symbol] isolated margin pair
|
|
215
214
|
* @param {string} [type] Transfer Type: ROLL_IN, ROLL_OUT
|
|
216
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
217
|
-
* @param {number} [endTime]
|
|
218
|
-
* @param {number} [fromId] 如设置fromId, 将返回id > fromId的数据。否则将返回最新数据
|
|
219
|
-
* @param {number} [limit] Default Value: 500; Max Value: 1000
|
|
220
|
-
* @param {number} [recvWindow] No more than 60000
|
|
215
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
216
|
+
* @param {number | bigint} [endTime]
|
|
217
|
+
* @param {number | bigint} [fromId] 如设置fromId, 将返回id > fromId的数据。否则将返回最新数据
|
|
218
|
+
* @param {number | bigint} [limit] Default Value: 500; Max Value: 1000
|
|
219
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
221
220
|
*
|
|
222
221
|
* @throws {RequiredError}
|
|
223
222
|
*/
|
|
@@ -262,7 +261,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
262
261
|
* Weight: 10(IP)
|
|
263
262
|
*
|
|
264
263
|
* @summary Query Cross Margin Account Details (USER_DATA)
|
|
265
|
-
* @param {number} [recvWindow] No more than 60000
|
|
264
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
266
265
|
*
|
|
267
266
|
* @throws {RequiredError}
|
|
268
267
|
*/
|
|
@@ -286,9 +285,9 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
286
285
|
* Weight: 1 when coin is specified;(IP)
|
|
287
286
|
*
|
|
288
287
|
* @summary Query Cross Margin Fee Data (USER_DATA)
|
|
289
|
-
* @param {number} [vipLevel] User's current specific margin data will be returned if vipLevel is omitted
|
|
288
|
+
* @param {number | bigint} [vipLevel] User's current specific margin data will be returned if vipLevel is omitted
|
|
290
289
|
* @param {string} [coin]
|
|
291
|
-
* @param {number} [recvWindow] No more than 60000
|
|
290
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
292
291
|
*
|
|
293
292
|
* @throws {RequiredError}
|
|
294
293
|
*/
|
|
@@ -318,7 +317,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
318
317
|
* Weight: 1(IP)
|
|
319
318
|
*
|
|
320
319
|
* @summary Query Enabled Isolated Margin Account Limit (USER_DATA)
|
|
321
|
-
* @param {number} [recvWindow] No more than 60000
|
|
320
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
322
321
|
*
|
|
323
322
|
* @throws {RequiredError}
|
|
324
323
|
*/
|
|
@@ -346,7 +345,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
346
345
|
*
|
|
347
346
|
* @summary Query Isolated Margin Account Info (USER_DATA)
|
|
348
347
|
* @param {string} [symbols] Max 5 symbols can be sent; separated by ",". e.g. "BTCUSDT,BNBUSDT,ADAUSDT"
|
|
349
|
-
* @param {number} [recvWindow] No more than 60000
|
|
348
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
350
349
|
*
|
|
351
350
|
* @throws {RequiredError}
|
|
352
351
|
*/
|
|
@@ -373,9 +372,9 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
373
372
|
* Weight: 1 when a single is specified;(IP)
|
|
374
373
|
*
|
|
375
374
|
* @summary Query Isolated Margin Fee Data (USER_DATA)
|
|
376
|
-
* @param {number} [vipLevel] User's current specific margin data will be returned if vipLevel is omitted
|
|
375
|
+
* @param {number | bigint} [vipLevel] User's current specific margin data will be returned if vipLevel is omitted
|
|
377
376
|
* @param {string} [symbol] isolated margin pair
|
|
378
|
-
* @param {number} [recvWindow] No more than 60000
|
|
377
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
379
378
|
*
|
|
380
379
|
* @throws {RequiredError}
|
|
381
380
|
*/
|
|
@@ -758,11 +757,11 @@ var BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
758
757
|
* @summary Get Interest History (USER_DATA)
|
|
759
758
|
* @param {string} [asset]
|
|
760
759
|
* @param {string} [isolatedSymbol] isolated symbol
|
|
761
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
762
|
-
* @param {number} [endTime]
|
|
763
|
-
* @param {number} [current] Currently querying page. Start from 1. Default:1
|
|
764
|
-
* @param {number} [size] Default:10 Max:100
|
|
765
|
-
* @param {number} [recvWindow] No more than 60000
|
|
760
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
761
|
+
* @param {number | bigint} [endTime]
|
|
762
|
+
* @param {number | bigint} [current] Currently querying page. Start from 1. Default:1
|
|
763
|
+
* @param {number | bigint} [size] Default:10 Max:100
|
|
764
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
766
765
|
*
|
|
767
766
|
* @throws {RequiredError}
|
|
768
767
|
*/
|
|
@@ -809,7 +808,7 @@ var BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
809
808
|
* @param {string} symbol
|
|
810
809
|
* @param {string} amount
|
|
811
810
|
* @param {string} type `MARGIN`,`ISOLATED`
|
|
812
|
-
* @param {number} [recvWindow] No more than 60000
|
|
811
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
813
812
|
*
|
|
814
813
|
* @throws {RequiredError}
|
|
815
814
|
*/
|
|
@@ -861,12 +860,12 @@ var BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
861
860
|
* @param {string} type `MARGIN`,`ISOLATED`
|
|
862
861
|
* @param {string} [asset]
|
|
863
862
|
* @param {string} [isolatedSymbol] isolated symbol
|
|
864
|
-
* @param {number} [txId] `tranId` in `POST /sapi/v1/margin/loan`
|
|
865
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
866
|
-
* @param {number} [endTime]
|
|
867
|
-
* @param {number} [current] Currently querying page. Start from 1. Default:1
|
|
868
|
-
* @param {number} [size] Default:10 Max:100
|
|
869
|
-
* @param {number} [recvWindow] No more than 60000
|
|
863
|
+
* @param {number | bigint} [txId] `tranId` in `POST /sapi/v1/margin/loan`
|
|
864
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
865
|
+
* @param {number | bigint} [endTime]
|
|
866
|
+
* @param {number | bigint} [current] Currently querying page. Start from 1. Default:1
|
|
867
|
+
* @param {number | bigint} [size] Default:10 Max:100
|
|
868
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
870
869
|
*
|
|
871
870
|
* @throws {RequiredError}
|
|
872
871
|
*/
|
|
@@ -916,10 +915,10 @@ var BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
916
915
|
*
|
|
917
916
|
* @summary Query Margin Interest Rate History (USER_DATA)
|
|
918
917
|
* @param {string} asset
|
|
919
|
-
* @param {number} [vipLevel] User's current specific margin data will be returned if vipLevel is omitted
|
|
920
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
921
|
-
* @param {number} [endTime]
|
|
922
|
-
* @param {number} [recvWindow] No more than 60000
|
|
918
|
+
* @param {number | bigint} [vipLevel] User's current specific margin data will be returned if vipLevel is omitted
|
|
919
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
920
|
+
* @param {number | bigint} [endTime]
|
|
921
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
923
922
|
*
|
|
924
923
|
* @throws {RequiredError}
|
|
925
924
|
*/
|
|
@@ -961,7 +960,7 @@ var BorrowRepayApiAxiosParamCreator = function(configuration) {
|
|
|
961
960
|
* @summary Query Max Borrow (USER_DATA)
|
|
962
961
|
* @param {string} asset
|
|
963
962
|
* @param {string} [isolatedSymbol] isolated symbol
|
|
964
|
-
* @param {number} [recvWindow] No more than 60000
|
|
963
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
965
964
|
*
|
|
966
965
|
* @throws {RequiredError}
|
|
967
966
|
*/
|
|
@@ -1247,7 +1246,7 @@ var MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
1247
1246
|
*
|
|
1248
1247
|
* @summary Get All Isolated Margin Symbol(MARKET_DATA)
|
|
1249
1248
|
* @param {string} [symbol] isolated margin pair
|
|
1250
|
-
* @param {number} [recvWindow] No more than 60000
|
|
1249
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
1251
1250
|
*
|
|
1252
1251
|
* @throws {RequiredError}
|
|
1253
1252
|
*/
|
|
@@ -1298,7 +1297,7 @@ var MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
1298
1297
|
* Weight: 100
|
|
1299
1298
|
*
|
|
1300
1299
|
* @summary Get Delist Schedule (MARKET_DATA)
|
|
1301
|
-
* @param {number} [recvWindow] No more than 60000
|
|
1300
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
1302
1301
|
*
|
|
1303
1302
|
* @throws {RequiredError}
|
|
1304
1303
|
*/
|
|
@@ -1347,7 +1346,7 @@ var MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
1347
1346
|
* Weight: 100
|
|
1348
1347
|
*
|
|
1349
1348
|
* @summary Get list Schedule (MARKET_DATA)
|
|
1350
|
-
* @param {number} [recvWindow] No more than 60000
|
|
1349
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
1351
1350
|
*
|
|
1352
1351
|
* @throws {RequiredError}
|
|
1353
1352
|
*/
|
|
@@ -1372,8 +1371,8 @@ var MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
1372
1371
|
*
|
|
1373
1372
|
* @summary Query Isolated Margin Tier Data (USER_DATA)
|
|
1374
1373
|
* @param {string} symbol
|
|
1375
|
-
* @param {number} [tier] All margin tier data will be returned if tier is omitted
|
|
1376
|
-
* @param {number} [recvWindow] No more than 60000
|
|
1374
|
+
* @param {number | bigint} [tier] All margin tier data will be returned if tier is omitted
|
|
1375
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
1377
1376
|
*
|
|
1378
1377
|
* @throws {RequiredError}
|
|
1379
1378
|
*/
|
|
@@ -1933,7 +1932,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1933
1932
|
* @param {string} [ip] Can be added in batches, separated by commas. Max 30 for an API key
|
|
1934
1933
|
* @param {string} [publicKey] 1. If publicKey is inputted it will create an RSA or Ed25519 key. <br />2. Need to be encoded to URL-encoded format
|
|
1935
1934
|
* @param {string} [permissionMode] This parameter is only for the Ed25519 API key, and does not effact for other encryption methods. The value can be TRADE (TRADE for all permissions) or READ (READ for USER_DATA, FIX_API_READ_ONLY). The default value is TRADE.
|
|
1936
|
-
* @param {number} [recvWindow] No more than 60000
|
|
1935
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
1937
1936
|
*
|
|
1938
1937
|
* @throws {RequiredError}
|
|
1939
1938
|
*/
|
|
@@ -1979,7 +1978,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1979
1978
|
* @summary Delete Special Key(Low-Latency Trading)(TRADE)
|
|
1980
1979
|
* @param {string} [apiName]
|
|
1981
1980
|
* @param {string} [symbol] isolated margin pair
|
|
1982
|
-
* @param {number} [recvWindow] No more than 60000
|
|
1981
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
1983
1982
|
*
|
|
1984
1983
|
* @throws {RequiredError}
|
|
1985
1984
|
*/
|
|
@@ -2013,7 +2012,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2013
2012
|
* @summary Edit ip for Special Key(Low-Latency Trading)(TRADE)
|
|
2014
2013
|
* @param {string} ip Can be added in batches, separated by commas. Max 30 for an API key
|
|
2015
2014
|
* @param {string} [symbol] isolated margin pair
|
|
2016
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2015
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2017
2016
|
*
|
|
2018
2017
|
* @throws {RequiredError}
|
|
2019
2018
|
*/
|
|
@@ -2046,12 +2045,12 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2046
2045
|
* Weight: 1(IP)
|
|
2047
2046
|
*
|
|
2048
2047
|
* @summary Get Force Liquidation Record (USER_DATA)
|
|
2049
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
2050
|
-
* @param {number} [endTime]
|
|
2048
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
2049
|
+
* @param {number | bigint} [endTime]
|
|
2051
2050
|
* @param {string} [isolatedSymbol] isolated symbol
|
|
2052
|
-
* @param {number} [current] Currently querying page. Start from 1. Default:1
|
|
2053
|
-
* @param {number} [size] Default:10 Max:100
|
|
2054
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2051
|
+
* @param {number | bigint} [current] Currently querying page. Start from 1. Default:1
|
|
2052
|
+
* @param {number | bigint} [size] Default:10 Max:100
|
|
2053
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2055
2054
|
*
|
|
2056
2055
|
* @throws {RequiredError}
|
|
2057
2056
|
*/
|
|
@@ -2090,7 +2089,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2090
2089
|
* Weight: 100
|
|
2091
2090
|
*
|
|
2092
2091
|
* @summary Get Small Liability Exchange Coin List (USER_DATA)
|
|
2093
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2092
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2094
2093
|
*
|
|
2095
2094
|
* @throws {RequiredError}
|
|
2096
2095
|
*/
|
|
@@ -2114,11 +2113,11 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2114
2113
|
* Weight: 100(UID)
|
|
2115
2114
|
*
|
|
2116
2115
|
* @summary Get Small Liability Exchange History (USER_DATA)
|
|
2117
|
-
* @param {number} current Currently querying page. Start from 1. Default:1
|
|
2118
|
-
* @param {number} size Default:10, Max:100
|
|
2119
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
2120
|
-
* @param {number} [endTime]
|
|
2121
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2116
|
+
* @param {number | bigint} current Currently querying page. Start from 1. Default:1
|
|
2117
|
+
* @param {number | bigint} size Default:10, Max:100
|
|
2118
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
2119
|
+
* @param {number | bigint} [endTime]
|
|
2120
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2122
2121
|
*
|
|
2123
2122
|
* @throws {RequiredError}
|
|
2124
2123
|
*/
|
|
@@ -2159,7 +2158,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2159
2158
|
* @summary Margin Account Cancel all Open Orders on a Symbol (TRADE)
|
|
2160
2159
|
* @param {string} symbol
|
|
2161
2160
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
2162
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2161
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2163
2162
|
*
|
|
2164
2163
|
* @throws {RequiredError}
|
|
2165
2164
|
*/
|
|
@@ -2194,10 +2193,10 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2194
2193
|
* @summary Margin Account Cancel OCO (TRADE)
|
|
2195
2194
|
* @param {string} symbol
|
|
2196
2195
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
2197
|
-
* @param {number} [orderListId] Either `orderListId` or `listClientOrderId` must be provided
|
|
2196
|
+
* @param {number | bigint} [orderListId] Either `orderListId` or `listClientOrderId` must be provided
|
|
2198
2197
|
* @param {string} [listClientOrderId] Either `orderListId` or `listClientOrderId` must be provided
|
|
2199
2198
|
* @param {string} [newClientOrderId] Used to uniquely identify this cancel. Automatically generated by default
|
|
2200
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2199
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2201
2200
|
*
|
|
2202
2201
|
* @throws {RequiredError}
|
|
2203
2202
|
*/
|
|
@@ -2241,10 +2240,10 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2241
2240
|
* @summary Margin Account Cancel Order (TRADE)
|
|
2242
2241
|
* @param {string} symbol
|
|
2243
2242
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
2244
|
-
* @param {number} [orderId]
|
|
2243
|
+
* @param {number | bigint} [orderId]
|
|
2245
2244
|
* @param {string} [origClientOrderId]
|
|
2246
2245
|
* @param {string} [newClientOrderId] Used to uniquely identify this cancel. Automatically generated by default
|
|
2247
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2246
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2248
2247
|
*
|
|
2249
2248
|
* @throws {RequiredError}
|
|
2250
2249
|
*/
|
|
@@ -2303,7 +2302,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2303
2302
|
* @param {string} [sideEffectType] NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY,AUTO_BORROW_REPAY; default NO_SIDE_EFFECT. More info in [FAQ](https://www.binance.com/en/support/faq/how-to-use-the-sideeffecttype-parameter-with-the-margin-order-endpoints-f9fc51cda1984bf08b95e0d96c4570bc)
|
|
2304
2303
|
* @param {string} [selfTradePreventionMode] The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE
|
|
2305
2304
|
* @param {boolean} [autoRepayAtCancel] Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true
|
|
2306
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2305
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2307
2306
|
*
|
|
2308
2307
|
* @throws {RequiredError}
|
|
2309
2308
|
*/
|
|
@@ -2400,7 +2399,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2400
2399
|
* @param {MarginAccountNewOrderTimeInForceEnum} [timeInForce] GTC,IOC,FOK
|
|
2401
2400
|
* @param {string} [selfTradePreventionMode] The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE
|
|
2402
2401
|
* @param {boolean} [autoRepayAtCancel] Only when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true
|
|
2403
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2402
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2404
2403
|
*
|
|
2405
2404
|
* @throws {RequiredError}
|
|
2406
2405
|
*/
|
|
@@ -2766,7 +2765,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2766
2765
|
* @summary Margin Manual Liquidation(MARGIN)
|
|
2767
2766
|
* @param {string} type `MARGIN`,`ISOLATED`
|
|
2768
2767
|
* @param {string} [symbol] isolated margin pair
|
|
2769
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2768
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2770
2769
|
*
|
|
2771
2770
|
* @throws {RequiredError}
|
|
2772
2771
|
*/
|
|
@@ -2799,7 +2798,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2799
2798
|
* @summary Query Current Margin Order Count Usage (TRADE)
|
|
2800
2799
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
2801
2800
|
* @param {string} [symbol] isolated margin pair
|
|
2802
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2801
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2803
2802
|
*
|
|
2804
2803
|
* @throws {RequiredError}
|
|
2805
2804
|
*/
|
|
@@ -2831,11 +2830,11 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2831
2830
|
* @summary Query Margin Account\'s all OCO (USER_DATA)
|
|
2832
2831
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
2833
2832
|
* @param {string} [symbol] isolated margin pair
|
|
2834
|
-
* @param {number} [fromId] 如设置fromId, 将返回id > fromId的数据。否则将返回最新数据
|
|
2835
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
2836
|
-
* @param {number} [endTime]
|
|
2837
|
-
* @param {number} [limit] Default Value: 500; Max Value: 1000
|
|
2838
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2833
|
+
* @param {number | bigint} [fromId] 如设置fromId, 将返回id > fromId的数据。否则将返回最新数据
|
|
2834
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
2835
|
+
* @param {number | bigint} [endTime]
|
|
2836
|
+
* @param {number | bigint} [limit] Default Value: 500; Max Value: 1000
|
|
2837
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2839
2838
|
*
|
|
2840
2839
|
* @throws {RequiredError}
|
|
2841
2840
|
*/
|
|
@@ -2883,11 +2882,11 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2883
2882
|
* @summary Query Margin Account\'s All Orders (USER_DATA)
|
|
2884
2883
|
* @param {string} symbol
|
|
2885
2884
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
2886
|
-
* @param {number} [orderId]
|
|
2887
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
2888
|
-
* @param {number} [endTime]
|
|
2889
|
-
* @param {number} [limit] Default Value: 500; Max Value: 1000
|
|
2890
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2885
|
+
* @param {number | bigint} [orderId]
|
|
2886
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
2887
|
+
* @param {number | bigint} [endTime]
|
|
2888
|
+
* @param {number | bigint} [limit] Default Value: 500; Max Value: 1000
|
|
2889
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2891
2890
|
*
|
|
2892
2891
|
* @throws {RequiredError}
|
|
2893
2892
|
*/
|
|
@@ -2932,9 +2931,9 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2932
2931
|
* @summary Query Margin Account\'s OCO (USER_DATA)
|
|
2933
2932
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
2934
2933
|
* @param {string} [symbol] isolated margin pair
|
|
2935
|
-
* @param {number} [orderListId] Either `orderListId` or `listClientOrderId` must be provided
|
|
2934
|
+
* @param {number | bigint} [orderListId] Either `orderListId` or `listClientOrderId` must be provided
|
|
2936
2935
|
* @param {string} [origClientOrderId]
|
|
2937
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2936
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2938
2937
|
*
|
|
2939
2938
|
* @throws {RequiredError}
|
|
2940
2939
|
*/
|
|
@@ -2972,7 +2971,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2972
2971
|
* @summary Query Margin Account\'s Open OCO (USER_DATA)
|
|
2973
2972
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
2974
2973
|
* @param {string} [symbol] isolated margin pair
|
|
2975
|
-
* @param {number} [recvWindow] No more than 60000
|
|
2974
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
2976
2975
|
*
|
|
2977
2976
|
* @throws {RequiredError}
|
|
2978
2977
|
*/
|
|
@@ -3008,7 +3007,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
3008
3007
|
* @summary Query Margin Account\'s Open Orders (USER_DATA)
|
|
3009
3008
|
* @param {string} [symbol] isolated margin pair
|
|
3010
3009
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
3011
|
-
* @param {number} [recvWindow] No more than 60000
|
|
3010
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
3012
3011
|
*
|
|
3013
3012
|
* @throws {RequiredError}
|
|
3014
3013
|
*/
|
|
@@ -3043,9 +3042,9 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
3043
3042
|
* @summary Query Margin Account\'s Order (USER_DATA)
|
|
3044
3043
|
* @param {string} symbol
|
|
3045
3044
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
3046
|
-
* @param {number} [orderId]
|
|
3045
|
+
* @param {number | bigint} [orderId]
|
|
3047
3046
|
* @param {string} [origClientOrderId]
|
|
3048
|
-
* @param {number} [recvWindow] No more than 60000
|
|
3047
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
3049
3048
|
*
|
|
3050
3049
|
* @throws {RequiredError}
|
|
3051
3050
|
*/
|
|
@@ -3087,12 +3086,12 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
3087
3086
|
* @summary Query Margin Account\'s Trade List (USER_DATA)
|
|
3088
3087
|
* @param {string} symbol
|
|
3089
3088
|
* @param {string} [isIsolated] for isolated margin or not, "TRUE", "FALSE",default "FALSE"
|
|
3090
|
-
* @param {number} [orderId]
|
|
3091
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
3092
|
-
* @param {number} [endTime]
|
|
3093
|
-
* @param {number} [fromId] 如设置fromId, 将返回id > fromId的数据。否则将返回最新数据
|
|
3094
|
-
* @param {number} [limit] Default Value: 500; Max Value: 1000
|
|
3095
|
-
* @param {number} [recvWindow] No more than 60000
|
|
3089
|
+
* @param {number | bigint} [orderId]
|
|
3090
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
3091
|
+
* @param {number | bigint} [endTime]
|
|
3092
|
+
* @param {number | bigint} [fromId] 如设置fromId, 将返回id > fromId的数据。否则将返回最新数据
|
|
3093
|
+
* @param {number | bigint} [limit] Default Value: 500; Max Value: 1000
|
|
3094
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
3096
3095
|
*
|
|
3097
3096
|
* @throws {RequiredError}
|
|
3098
3097
|
*/
|
|
@@ -3141,7 +3140,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
3141
3140
|
*
|
|
3142
3141
|
* @summary Query Special key(Low Latency Trading)(TRADE)
|
|
3143
3142
|
* @param {string} [symbol] isolated margin pair
|
|
3144
|
-
* @param {number} [recvWindow] No more than 60000
|
|
3143
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
3145
3144
|
*
|
|
3146
3145
|
* @throws {RequiredError}
|
|
3147
3146
|
*/
|
|
@@ -3169,7 +3168,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
3169
3168
|
*
|
|
3170
3169
|
* @summary Query Special key List(Low Latency Trading)(TRADE)
|
|
3171
3170
|
* @param {string} [symbol] isolated margin pair
|
|
3172
|
-
* @param {number} [recvWindow] No more than 60000
|
|
3171
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
3173
3172
|
*
|
|
3174
3173
|
* @throws {RequiredError}
|
|
3175
3174
|
*/
|
|
@@ -3201,7 +3200,7 @@ var TradeApiAxiosParamCreator = function(configuration) {
|
|
|
3201
3200
|
*
|
|
3202
3201
|
* @summary Small Liability Exchange (MARGIN)
|
|
3203
3202
|
* @param {Array<string>} assetNames The assets list of small liability exchange, Example: assetNames = BTC,ETH
|
|
3204
|
-
* @param {number} [recvWindow] No more than 60000
|
|
3203
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
3205
3204
|
*
|
|
3206
3205
|
* @throws {RequiredError}
|
|
3207
3206
|
*/
|
|
@@ -4128,331 +4127,8 @@ var MarginAccountNewOtocoNewOrderRespTypeEnum = /* @__PURE__ */ ((MarginAccountN
|
|
|
4128
4127
|
return MarginAccountNewOtocoNewOrderRespTypeEnum2;
|
|
4129
4128
|
})(MarginAccountNewOtocoNewOrderRespTypeEnum || {});
|
|
4130
4129
|
|
|
4131
|
-
// src/rest-api/modules/trade-data-stream-api.ts
|
|
4132
|
-
var import_common6 = require("@binance/common");
|
|
4133
|
-
var TradeDataStreamApiAxiosParamCreator = function(configuration) {
|
|
4134
|
-
return {
|
|
4135
|
-
/**
|
|
4136
|
-
* Close out a isolated margin user data stream.
|
|
4137
|
-
*
|
|
4138
|
-
* Weight: 3000
|
|
4139
|
-
*
|
|
4140
|
-
* @summary Close Isolated Margin User Data Stream (USER_STREAM)
|
|
4141
|
-
* @param {string} symbol
|
|
4142
|
-
* @param {string} listenkey
|
|
4143
|
-
*
|
|
4144
|
-
* @deprecated
|
|
4145
|
-
* @throws {RequiredError}
|
|
4146
|
-
*/
|
|
4147
|
-
closeIsolatedMarginUserDataStream: async (symbol, listenkey) => {
|
|
4148
|
-
(0, import_common6.assertParamExists)("closeIsolatedMarginUserDataStream", "symbol", symbol);
|
|
4149
|
-
(0, import_common6.assertParamExists)("closeIsolatedMarginUserDataStream", "listenkey", listenkey);
|
|
4150
|
-
const localVarQueryParameter = {};
|
|
4151
|
-
if (symbol !== void 0 && symbol !== null) {
|
|
4152
|
-
localVarQueryParameter["symbol"] = symbol;
|
|
4153
|
-
}
|
|
4154
|
-
if (listenkey !== void 0 && listenkey !== null) {
|
|
4155
|
-
localVarQueryParameter["listenkey"] = listenkey;
|
|
4156
|
-
}
|
|
4157
|
-
let _timeUnit;
|
|
4158
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
4159
|
-
return {
|
|
4160
|
-
endpoint: "/sapi/v1/userDataStream/isolated",
|
|
4161
|
-
method: "DELETE",
|
|
4162
|
-
params: localVarQueryParameter,
|
|
4163
|
-
timeUnit: _timeUnit
|
|
4164
|
-
};
|
|
4165
|
-
},
|
|
4166
|
-
/**
|
|
4167
|
-
* Close out a Margin user data stream.
|
|
4168
|
-
*
|
|
4169
|
-
* Weight: 3000
|
|
4170
|
-
*
|
|
4171
|
-
* @summary Close Margin User Data Stream (USER_STREAM)
|
|
4172
|
-
* @param {string} listenkey
|
|
4173
|
-
*
|
|
4174
|
-
* @deprecated
|
|
4175
|
-
* @throws {RequiredError}
|
|
4176
|
-
*/
|
|
4177
|
-
closeMarginUserDataStream: async (listenkey) => {
|
|
4178
|
-
(0, import_common6.assertParamExists)("closeMarginUserDataStream", "listenkey", listenkey);
|
|
4179
|
-
const localVarQueryParameter = {};
|
|
4180
|
-
if (listenkey !== void 0 && listenkey !== null) {
|
|
4181
|
-
localVarQueryParameter["listenkey"] = listenkey;
|
|
4182
|
-
}
|
|
4183
|
-
let _timeUnit;
|
|
4184
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
4185
|
-
return {
|
|
4186
|
-
endpoint: "/sapi/v1/userDataStream",
|
|
4187
|
-
method: "DELETE",
|
|
4188
|
-
params: localVarQueryParameter,
|
|
4189
|
-
timeUnit: _timeUnit
|
|
4190
|
-
};
|
|
4191
|
-
},
|
|
4192
|
-
/**
|
|
4193
|
-
* Keepalive an isolated margin user data stream to prevent a time out.
|
|
4194
|
-
*
|
|
4195
|
-
* Weight: 1
|
|
4196
|
-
*
|
|
4197
|
-
* @summary Keepalive Isolated Margin User Data Stream (USER_STREAM)
|
|
4198
|
-
* @param {string} symbol
|
|
4199
|
-
* @param {string} listenKey
|
|
4200
|
-
*
|
|
4201
|
-
* @deprecated
|
|
4202
|
-
* @throws {RequiredError}
|
|
4203
|
-
*/
|
|
4204
|
-
keepaliveIsolatedMarginUserDataStream: async (symbol, listenKey) => {
|
|
4205
|
-
(0, import_common6.assertParamExists)("keepaliveIsolatedMarginUserDataStream", "symbol", symbol);
|
|
4206
|
-
(0, import_common6.assertParamExists)("keepaliveIsolatedMarginUserDataStream", "listenKey", listenKey);
|
|
4207
|
-
const localVarQueryParameter = {};
|
|
4208
|
-
if (symbol !== void 0 && symbol !== null) {
|
|
4209
|
-
localVarQueryParameter["symbol"] = symbol;
|
|
4210
|
-
}
|
|
4211
|
-
if (listenKey !== void 0 && listenKey !== null) {
|
|
4212
|
-
localVarQueryParameter["listenKey"] = listenKey;
|
|
4213
|
-
}
|
|
4214
|
-
let _timeUnit;
|
|
4215
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
4216
|
-
return {
|
|
4217
|
-
endpoint: "/sapi/v1/userDataStream/isolated",
|
|
4218
|
-
method: "PUT",
|
|
4219
|
-
params: localVarQueryParameter,
|
|
4220
|
-
timeUnit: _timeUnit
|
|
4221
|
-
};
|
|
4222
|
-
},
|
|
4223
|
-
/**
|
|
4224
|
-
* Keepalive a margin user data stream to prevent a time out.
|
|
4225
|
-
*
|
|
4226
|
-
* Weight: 1
|
|
4227
|
-
*
|
|
4228
|
-
* @summary Keepalive Margin User Data Stream (USER_STREAM)
|
|
4229
|
-
* @param {string} listenKey
|
|
4230
|
-
*
|
|
4231
|
-
* @deprecated
|
|
4232
|
-
* @throws {RequiredError}
|
|
4233
|
-
*/
|
|
4234
|
-
keepaliveMarginUserDataStream: async (listenKey) => {
|
|
4235
|
-
(0, import_common6.assertParamExists)("keepaliveMarginUserDataStream", "listenKey", listenKey);
|
|
4236
|
-
const localVarQueryParameter = {};
|
|
4237
|
-
if (listenKey !== void 0 && listenKey !== null) {
|
|
4238
|
-
localVarQueryParameter["listenKey"] = listenKey;
|
|
4239
|
-
}
|
|
4240
|
-
let _timeUnit;
|
|
4241
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
4242
|
-
return {
|
|
4243
|
-
endpoint: "/sapi/v1/userDataStream",
|
|
4244
|
-
method: "PUT",
|
|
4245
|
-
params: localVarQueryParameter,
|
|
4246
|
-
timeUnit: _timeUnit
|
|
4247
|
-
};
|
|
4248
|
-
},
|
|
4249
|
-
/**
|
|
4250
|
-
* Start a new isolated margin user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.
|
|
4251
|
-
*
|
|
4252
|
-
* Weight: 1
|
|
4253
|
-
*
|
|
4254
|
-
* @summary Start Isolated Margin User Data Stream (USER_STREAM)
|
|
4255
|
-
* @param {string} symbol
|
|
4256
|
-
*
|
|
4257
|
-
* @deprecated
|
|
4258
|
-
* @throws {RequiredError}
|
|
4259
|
-
*/
|
|
4260
|
-
startIsolatedMarginUserDataStream: async (symbol) => {
|
|
4261
|
-
(0, import_common6.assertParamExists)("startIsolatedMarginUserDataStream", "symbol", symbol);
|
|
4262
|
-
const localVarQueryParameter = {};
|
|
4263
|
-
if (symbol !== void 0 && symbol !== null) {
|
|
4264
|
-
localVarQueryParameter["symbol"] = symbol;
|
|
4265
|
-
}
|
|
4266
|
-
let _timeUnit;
|
|
4267
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
4268
|
-
return {
|
|
4269
|
-
endpoint: "/sapi/v1/userDataStream/isolated",
|
|
4270
|
-
method: "POST",
|
|
4271
|
-
params: localVarQueryParameter,
|
|
4272
|
-
timeUnit: _timeUnit
|
|
4273
|
-
};
|
|
4274
|
-
},
|
|
4275
|
-
/**
|
|
4276
|
-
* Start a new margin user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.
|
|
4277
|
-
*
|
|
4278
|
-
* Weight: 1
|
|
4279
|
-
*
|
|
4280
|
-
* @summary Start Margin User Data Stream (USER_STREAM)
|
|
4281
|
-
*
|
|
4282
|
-
* @deprecated
|
|
4283
|
-
* @throws {RequiredError}
|
|
4284
|
-
*/
|
|
4285
|
-
startMarginUserDataStream: async () => {
|
|
4286
|
-
const localVarQueryParameter = {};
|
|
4287
|
-
let _timeUnit;
|
|
4288
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
4289
|
-
return {
|
|
4290
|
-
endpoint: "/sapi/v1/userDataStream",
|
|
4291
|
-
method: "POST",
|
|
4292
|
-
params: localVarQueryParameter,
|
|
4293
|
-
timeUnit: _timeUnit
|
|
4294
|
-
};
|
|
4295
|
-
}
|
|
4296
|
-
};
|
|
4297
|
-
};
|
|
4298
|
-
var TradeDataStreamApi = class {
|
|
4299
|
-
constructor(configuration) {
|
|
4300
|
-
this.configuration = configuration;
|
|
4301
|
-
this.localVarAxiosParamCreator = TradeDataStreamApiAxiosParamCreator(configuration);
|
|
4302
|
-
}
|
|
4303
|
-
/**
|
|
4304
|
-
* Close out a isolated margin user data stream.
|
|
4305
|
-
*
|
|
4306
|
-
* Weight: 3000
|
|
4307
|
-
*
|
|
4308
|
-
* @summary Close Isolated Margin User Data Stream (USER_STREAM)
|
|
4309
|
-
* @param {CloseIsolatedMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
4310
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
4311
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4312
|
-
* @memberof TradeDataStreamApi
|
|
4313
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Close-Isolated-Margin-User-Data-Stream Binance API Documentation}
|
|
4314
|
-
*/
|
|
4315
|
-
async closeIsolatedMarginUserDataStream(requestParameters) {
|
|
4316
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.closeIsolatedMarginUserDataStream(
|
|
4317
|
-
requestParameters?.symbol,
|
|
4318
|
-
requestParameters?.listenkey
|
|
4319
|
-
);
|
|
4320
|
-
return (0, import_common6.sendRequest)(
|
|
4321
|
-
this.configuration,
|
|
4322
|
-
localVarAxiosArgs.endpoint,
|
|
4323
|
-
localVarAxiosArgs.method,
|
|
4324
|
-
localVarAxiosArgs.params,
|
|
4325
|
-
localVarAxiosArgs?.timeUnit,
|
|
4326
|
-
{ isSigned: false }
|
|
4327
|
-
);
|
|
4328
|
-
}
|
|
4329
|
-
/**
|
|
4330
|
-
* Close out a Margin user data stream.
|
|
4331
|
-
*
|
|
4332
|
-
* Weight: 3000
|
|
4333
|
-
*
|
|
4334
|
-
* @summary Close Margin User Data Stream (USER_STREAM)
|
|
4335
|
-
* @param {CloseMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
4336
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
4337
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4338
|
-
* @memberof TradeDataStreamApi
|
|
4339
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Close-Margin-User-Data-Stream Binance API Documentation}
|
|
4340
|
-
*/
|
|
4341
|
-
async closeMarginUserDataStream(requestParameters) {
|
|
4342
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.closeMarginUserDataStream(
|
|
4343
|
-
requestParameters?.listenkey
|
|
4344
|
-
);
|
|
4345
|
-
return (0, import_common6.sendRequest)(
|
|
4346
|
-
this.configuration,
|
|
4347
|
-
localVarAxiosArgs.endpoint,
|
|
4348
|
-
localVarAxiosArgs.method,
|
|
4349
|
-
localVarAxiosArgs.params,
|
|
4350
|
-
localVarAxiosArgs?.timeUnit,
|
|
4351
|
-
{ isSigned: false }
|
|
4352
|
-
);
|
|
4353
|
-
}
|
|
4354
|
-
/**
|
|
4355
|
-
* Keepalive an isolated margin user data stream to prevent a time out.
|
|
4356
|
-
*
|
|
4357
|
-
* Weight: 1
|
|
4358
|
-
*
|
|
4359
|
-
* @summary Keepalive Isolated Margin User Data Stream (USER_STREAM)
|
|
4360
|
-
* @param {KeepaliveIsolatedMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
4361
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
4362
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4363
|
-
* @memberof TradeDataStreamApi
|
|
4364
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Keepalive-Isolated-Margin-User-Data-Stream Binance API Documentation}
|
|
4365
|
-
*/
|
|
4366
|
-
async keepaliveIsolatedMarginUserDataStream(requestParameters) {
|
|
4367
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.keepaliveIsolatedMarginUserDataStream(
|
|
4368
|
-
requestParameters?.symbol,
|
|
4369
|
-
requestParameters?.listenKey
|
|
4370
|
-
);
|
|
4371
|
-
return (0, import_common6.sendRequest)(
|
|
4372
|
-
this.configuration,
|
|
4373
|
-
localVarAxiosArgs.endpoint,
|
|
4374
|
-
localVarAxiosArgs.method,
|
|
4375
|
-
localVarAxiosArgs.params,
|
|
4376
|
-
localVarAxiosArgs?.timeUnit,
|
|
4377
|
-
{ isSigned: false }
|
|
4378
|
-
);
|
|
4379
|
-
}
|
|
4380
|
-
/**
|
|
4381
|
-
* Keepalive a margin user data stream to prevent a time out.
|
|
4382
|
-
*
|
|
4383
|
-
* Weight: 1
|
|
4384
|
-
*
|
|
4385
|
-
* @summary Keepalive Margin User Data Stream (USER_STREAM)
|
|
4386
|
-
* @param {KeepaliveMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
4387
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
4388
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4389
|
-
* @memberof TradeDataStreamApi
|
|
4390
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Keepalive-Margin-User-Data-Stream Binance API Documentation}
|
|
4391
|
-
*/
|
|
4392
|
-
async keepaliveMarginUserDataStream(requestParameters) {
|
|
4393
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.keepaliveMarginUserDataStream(
|
|
4394
|
-
requestParameters?.listenKey
|
|
4395
|
-
);
|
|
4396
|
-
return (0, import_common6.sendRequest)(
|
|
4397
|
-
this.configuration,
|
|
4398
|
-
localVarAxiosArgs.endpoint,
|
|
4399
|
-
localVarAxiosArgs.method,
|
|
4400
|
-
localVarAxiosArgs.params,
|
|
4401
|
-
localVarAxiosArgs?.timeUnit,
|
|
4402
|
-
{ isSigned: false }
|
|
4403
|
-
);
|
|
4404
|
-
}
|
|
4405
|
-
/**
|
|
4406
|
-
* Start a new isolated margin user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.
|
|
4407
|
-
*
|
|
4408
|
-
* Weight: 1
|
|
4409
|
-
*
|
|
4410
|
-
* @summary Start Isolated Margin User Data Stream (USER_STREAM)
|
|
4411
|
-
* @param {StartIsolatedMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
4412
|
-
* @returns {Promise<RestApiResponse<StartIsolatedMarginUserDataStreamResponse>>}
|
|
4413
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4414
|
-
* @memberof TradeDataStreamApi
|
|
4415
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Start-Isolated-Margin-User-Data-Stream Binance API Documentation}
|
|
4416
|
-
*/
|
|
4417
|
-
async startIsolatedMarginUserDataStream(requestParameters) {
|
|
4418
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.startIsolatedMarginUserDataStream(
|
|
4419
|
-
requestParameters?.symbol
|
|
4420
|
-
);
|
|
4421
|
-
return (0, import_common6.sendRequest)(
|
|
4422
|
-
this.configuration,
|
|
4423
|
-
localVarAxiosArgs.endpoint,
|
|
4424
|
-
localVarAxiosArgs.method,
|
|
4425
|
-
localVarAxiosArgs.params,
|
|
4426
|
-
localVarAxiosArgs?.timeUnit,
|
|
4427
|
-
{ isSigned: false }
|
|
4428
|
-
);
|
|
4429
|
-
}
|
|
4430
|
-
/**
|
|
4431
|
-
* Start a new margin user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.
|
|
4432
|
-
*
|
|
4433
|
-
* Weight: 1
|
|
4434
|
-
*
|
|
4435
|
-
* @summary Start Margin User Data Stream (USER_STREAM)
|
|
4436
|
-
* @returns {Promise<RestApiResponse<StartMarginUserDataStreamResponse>>}
|
|
4437
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4438
|
-
* @memberof TradeDataStreamApi
|
|
4439
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Start-Margin-User-Data-Stream Binance API Documentation}
|
|
4440
|
-
*/
|
|
4441
|
-
async startMarginUserDataStream() {
|
|
4442
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.startMarginUserDataStream();
|
|
4443
|
-
return (0, import_common6.sendRequest)(
|
|
4444
|
-
this.configuration,
|
|
4445
|
-
localVarAxiosArgs.endpoint,
|
|
4446
|
-
localVarAxiosArgs.method,
|
|
4447
|
-
localVarAxiosArgs.params,
|
|
4448
|
-
localVarAxiosArgs?.timeUnit,
|
|
4449
|
-
{ isSigned: false }
|
|
4450
|
-
);
|
|
4451
|
-
}
|
|
4452
|
-
};
|
|
4453
|
-
|
|
4454
4130
|
// src/rest-api/modules/transfer-api.ts
|
|
4455
|
-
var
|
|
4131
|
+
var import_common6 = require("@binance/common");
|
|
4456
4132
|
var TransferApiAxiosParamCreator = function(configuration) {
|
|
4457
4133
|
return {
|
|
4458
4134
|
/**
|
|
@@ -4467,12 +4143,12 @@ var TransferApiAxiosParamCreator = function(configuration) {
|
|
|
4467
4143
|
* @summary Get Cross Margin Transfer History (USER_DATA)
|
|
4468
4144
|
* @param {string} [asset]
|
|
4469
4145
|
* @param {string} [type] Transfer Type: ROLL_IN, ROLL_OUT
|
|
4470
|
-
* @param {number} [startTime] 只支持查询最近90天的数据
|
|
4471
|
-
* @param {number} [endTime]
|
|
4472
|
-
* @param {number} [current] Currently querying page. Start from 1. Default:1
|
|
4473
|
-
* @param {number} [size] Default:10 Max:100
|
|
4146
|
+
* @param {number | bigint} [startTime] 只支持查询最近90天的数据
|
|
4147
|
+
* @param {number | bigint} [endTime]
|
|
4148
|
+
* @param {number | bigint} [current] Currently querying page. Start from 1. Default:1
|
|
4149
|
+
* @param {number | bigint} [size] Default:10 Max:100
|
|
4474
4150
|
* @param {string} [isolatedSymbol] isolated symbol
|
|
4475
|
-
* @param {number} [recvWindow] No more than 60000
|
|
4151
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
4476
4152
|
*
|
|
4477
4153
|
* @throws {RequiredError}
|
|
4478
4154
|
*/
|
|
@@ -4521,12 +4197,12 @@ var TransferApiAxiosParamCreator = function(configuration) {
|
|
|
4521
4197
|
* @summary Query Max Transfer-Out Amount (USER_DATA)
|
|
4522
4198
|
* @param {string} asset
|
|
4523
4199
|
* @param {string} [isolatedSymbol] isolated symbol
|
|
4524
|
-
* @param {number} [recvWindow] No more than 60000
|
|
4200
|
+
* @param {number | bigint} [recvWindow] No more than 60000
|
|
4525
4201
|
*
|
|
4526
4202
|
* @throws {RequiredError}
|
|
4527
4203
|
*/
|
|
4528
4204
|
queryMaxTransferOutAmount: async (asset, isolatedSymbol, recvWindow) => {
|
|
4529
|
-
(0,
|
|
4205
|
+
(0, import_common6.assertParamExists)("queryMaxTransferOutAmount", "asset", asset);
|
|
4530
4206
|
const localVarQueryParameter = {};
|
|
4531
4207
|
if (asset !== void 0 && asset !== null) {
|
|
4532
4208
|
localVarQueryParameter["asset"] = asset;
|
|
@@ -4580,7 +4256,7 @@ var TransferApi = class {
|
|
|
4580
4256
|
requestParameters?.isolatedSymbol,
|
|
4581
4257
|
requestParameters?.recvWindow
|
|
4582
4258
|
);
|
|
4583
|
-
return (0,
|
|
4259
|
+
return (0, import_common6.sendRequest)(
|
|
4584
4260
|
this.configuration,
|
|
4585
4261
|
localVarAxiosArgs.endpoint,
|
|
4586
4262
|
localVarAxiosArgs.method,
|
|
@@ -4609,7 +4285,7 @@ var TransferApi = class {
|
|
|
4609
4285
|
requestParameters?.isolatedSymbol,
|
|
4610
4286
|
requestParameters?.recvWindow
|
|
4611
4287
|
);
|
|
4612
|
-
return (0,
|
|
4288
|
+
return (0, import_common6.sendRequest)(
|
|
4613
4289
|
this.configuration,
|
|
4614
4290
|
localVarAxiosArgs.endpoint,
|
|
4615
4291
|
localVarAxiosArgs.method,
|
|
@@ -4621,7 +4297,7 @@ var TransferApi = class {
|
|
|
4621
4297
|
};
|
|
4622
4298
|
|
|
4623
4299
|
// src/rest-api/rest-api.ts
|
|
4624
|
-
var
|
|
4300
|
+
var import_common7 = require("@binance/common");
|
|
4625
4301
|
var RestAPI = class {
|
|
4626
4302
|
constructor(configuration) {
|
|
4627
4303
|
this.configuration = configuration;
|
|
@@ -4630,7 +4306,6 @@ var RestAPI = class {
|
|
|
4630
4306
|
this.marketDataApi = new MarketDataApi(configuration);
|
|
4631
4307
|
this.riskDataStreamApi = new RiskDataStreamApi(configuration);
|
|
4632
4308
|
this.tradeApi = new TradeApi(configuration);
|
|
4633
|
-
this.tradeDataStreamApi = new TradeDataStreamApi(configuration);
|
|
4634
4309
|
this.transferApi = new TransferApi(configuration);
|
|
4635
4310
|
}
|
|
4636
4311
|
/**
|
|
@@ -4642,7 +4317,7 @@ var RestAPI = class {
|
|
|
4642
4317
|
* @returns A promise resolving to the response data object.
|
|
4643
4318
|
*/
|
|
4644
4319
|
sendRequest(endpoint, method, params = {}) {
|
|
4645
|
-
return (0,
|
|
4320
|
+
return (0, import_common7.sendRequest)(this.configuration, endpoint, method, params, void 0);
|
|
4646
4321
|
}
|
|
4647
4322
|
/**
|
|
4648
4323
|
* Generic function to send a signed request.
|
|
@@ -4653,7 +4328,7 @@ var RestAPI = class {
|
|
|
4653
4328
|
* @returns A promise resolving to the response data object.
|
|
4654
4329
|
*/
|
|
4655
4330
|
sendSignedRequest(endpoint, method, params = {}) {
|
|
4656
|
-
return (0,
|
|
4331
|
+
return (0, import_common7.sendRequest)(this.configuration, endpoint, method, params, void 0, {
|
|
4657
4332
|
isSigned: true
|
|
4658
4333
|
});
|
|
4659
4334
|
}
|
|
@@ -5604,95 +5279,6 @@ var RestAPI = class {
|
|
|
5604
5279
|
smallLiabilityExchange(requestParameters) {
|
|
5605
5280
|
return this.tradeApi.smallLiabilityExchange(requestParameters);
|
|
5606
5281
|
}
|
|
5607
|
-
/**
|
|
5608
|
-
* Close out a isolated margin user data stream.
|
|
5609
|
-
*
|
|
5610
|
-
* Weight: 3000
|
|
5611
|
-
*
|
|
5612
|
-
* @summary Close Isolated Margin User Data Stream (USER_STREAM)
|
|
5613
|
-
* @param {CloseIsolatedMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
5614
|
-
* @deprecated
|
|
5615
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
5616
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5617
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Close-Isolated-Margin-User-Data-Stream Binance API Documentation}
|
|
5618
|
-
*/
|
|
5619
|
-
closeIsolatedMarginUserDataStream(requestParameters) {
|
|
5620
|
-
return this.tradeDataStreamApi.closeIsolatedMarginUserDataStream(requestParameters);
|
|
5621
|
-
}
|
|
5622
|
-
/**
|
|
5623
|
-
* Close out a Margin user data stream.
|
|
5624
|
-
*
|
|
5625
|
-
* Weight: 3000
|
|
5626
|
-
*
|
|
5627
|
-
* @summary Close Margin User Data Stream (USER_STREAM)
|
|
5628
|
-
* @param {CloseMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
5629
|
-
* @deprecated
|
|
5630
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
5631
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5632
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Close-Margin-User-Data-Stream Binance API Documentation}
|
|
5633
|
-
*/
|
|
5634
|
-
closeMarginUserDataStream(requestParameters) {
|
|
5635
|
-
return this.tradeDataStreamApi.closeMarginUserDataStream(requestParameters);
|
|
5636
|
-
}
|
|
5637
|
-
/**
|
|
5638
|
-
* Keepalive an isolated margin user data stream to prevent a time out.
|
|
5639
|
-
*
|
|
5640
|
-
* Weight: 1
|
|
5641
|
-
*
|
|
5642
|
-
* @summary Keepalive Isolated Margin User Data Stream (USER_STREAM)
|
|
5643
|
-
* @param {KeepaliveIsolatedMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
5644
|
-
* @deprecated
|
|
5645
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
5646
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5647
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Keepalive-Isolated-Margin-User-Data-Stream Binance API Documentation}
|
|
5648
|
-
*/
|
|
5649
|
-
keepaliveIsolatedMarginUserDataStream(requestParameters) {
|
|
5650
|
-
return this.tradeDataStreamApi.keepaliveIsolatedMarginUserDataStream(requestParameters);
|
|
5651
|
-
}
|
|
5652
|
-
/**
|
|
5653
|
-
* Keepalive a margin user data stream to prevent a time out.
|
|
5654
|
-
*
|
|
5655
|
-
* Weight: 1
|
|
5656
|
-
*
|
|
5657
|
-
* @summary Keepalive Margin User Data Stream (USER_STREAM)
|
|
5658
|
-
* @param {KeepaliveMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
5659
|
-
* @deprecated
|
|
5660
|
-
* @returns {Promise<RestApiResponse<void>>}
|
|
5661
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5662
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Keepalive-Margin-User-Data-Stream Binance API Documentation}
|
|
5663
|
-
*/
|
|
5664
|
-
keepaliveMarginUserDataStream(requestParameters) {
|
|
5665
|
-
return this.tradeDataStreamApi.keepaliveMarginUserDataStream(requestParameters);
|
|
5666
|
-
}
|
|
5667
|
-
/**
|
|
5668
|
-
* Start a new isolated margin user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.
|
|
5669
|
-
*
|
|
5670
|
-
* Weight: 1
|
|
5671
|
-
*
|
|
5672
|
-
* @summary Start Isolated Margin User Data Stream (USER_STREAM)
|
|
5673
|
-
* @param {StartIsolatedMarginUserDataStreamRequest} requestParameters Request parameters.
|
|
5674
|
-
* @deprecated
|
|
5675
|
-
* @returns {Promise<RestApiResponse<StartIsolatedMarginUserDataStreamResponse>>}
|
|
5676
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5677
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Start-Isolated-Margin-User-Data-Stream Binance API Documentation}
|
|
5678
|
-
*/
|
|
5679
|
-
startIsolatedMarginUserDataStream(requestParameters) {
|
|
5680
|
-
return this.tradeDataStreamApi.startIsolatedMarginUserDataStream(requestParameters);
|
|
5681
|
-
}
|
|
5682
|
-
/**
|
|
5683
|
-
* Start a new margin user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.
|
|
5684
|
-
*
|
|
5685
|
-
* Weight: 1
|
|
5686
|
-
*
|
|
5687
|
-
* @summary Start Margin User Data Stream (USER_STREAM)
|
|
5688
|
-
* @deprecated
|
|
5689
|
-
* @returns {Promise<RestApiResponse<StartMarginUserDataStreamResponse>>}
|
|
5690
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5691
|
-
* @see {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Start-Margin-User-Data-Stream Binance API Documentation}
|
|
5692
|
-
*/
|
|
5693
|
-
startMarginUserDataStream() {
|
|
5694
|
-
return this.tradeDataStreamApi.startMarginUserDataStream();
|
|
5695
|
-
}
|
|
5696
5282
|
/**
|
|
5697
5283
|
* Get Cross Margin Transfer History
|
|
5698
5284
|
*
|
|
@@ -5739,10 +5325,10 @@ __export(websocket_streams_exports, {
|
|
|
5739
5325
|
});
|
|
5740
5326
|
|
|
5741
5327
|
// src/websocket-streams/websocket-streams.ts
|
|
5742
|
-
var
|
|
5328
|
+
var import_common9 = require("@binance/common");
|
|
5743
5329
|
|
|
5744
5330
|
// src/websocket-streams/websocket-streams-connection.ts
|
|
5745
|
-
var
|
|
5331
|
+
var import_common8 = require("@binance/common");
|
|
5746
5332
|
var WebsocketStreamsConnection = class {
|
|
5747
5333
|
constructor(websocketBase) {
|
|
5748
5334
|
this.websocketBase = websocketBase;
|
|
@@ -5825,7 +5411,7 @@ var WebsocketStreamsConnection = class {
|
|
|
5825
5411
|
* @returns A WebSocket stream handler for the risk data stream.
|
|
5826
5412
|
*/
|
|
5827
5413
|
riskData(listenKey, id) {
|
|
5828
|
-
return (0,
|
|
5414
|
+
return (0, import_common8.createStreamHandler)(this.websocketBase, listenKey, id);
|
|
5829
5415
|
}
|
|
5830
5416
|
/**
|
|
5831
5417
|
* Subscribes to the trade data WebSocket stream using the provided listen key.
|
|
@@ -5834,7 +5420,7 @@ var WebsocketStreamsConnection = class {
|
|
|
5834
5420
|
* @returns A WebSocket stream handler for the trade data stream.
|
|
5835
5421
|
*/
|
|
5836
5422
|
tradeData(listenKey, id) {
|
|
5837
|
-
return (0,
|
|
5423
|
+
return (0, import_common8.createStreamHandler)(
|
|
5838
5424
|
this.websocketBase,
|
|
5839
5425
|
listenKey,
|
|
5840
5426
|
id
|
|
@@ -5861,7 +5447,7 @@ var WebsocketStreams = class {
|
|
|
5861
5447
|
mode,
|
|
5862
5448
|
poolSize
|
|
5863
5449
|
} = {}) {
|
|
5864
|
-
const websocketBase = new
|
|
5450
|
+
const websocketBase = new import_common9.WebsocketStreamsBase({
|
|
5865
5451
|
...this.configuration,
|
|
5866
5452
|
...mode && { mode },
|
|
5867
5453
|
...poolSize && { poolSize }
|
|
@@ -5875,12 +5461,12 @@ var WebsocketStreams = class {
|
|
|
5875
5461
|
// src/margin-trading.ts
|
|
5876
5462
|
var MarginTrading = class {
|
|
5877
5463
|
constructor(config) {
|
|
5878
|
-
const userAgent = (0,
|
|
5464
|
+
const userAgent = (0, import_common10.buildUserAgent)(name, version);
|
|
5879
5465
|
if (config?.configurationRestAPI) {
|
|
5880
|
-
const configRestAPI = new
|
|
5466
|
+
const configRestAPI = new import_common10.ConfigurationRestAPI(
|
|
5881
5467
|
config.configurationRestAPI
|
|
5882
5468
|
);
|
|
5883
|
-
configRestAPI.basePath = configRestAPI.basePath ||
|
|
5469
|
+
configRestAPI.basePath = configRestAPI.basePath || import_common10.MARGIN_TRADING_REST_API_PROD_URL;
|
|
5884
5470
|
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
5885
5471
|
configRestAPI.baseOptions.headers = {
|
|
5886
5472
|
...configRestAPI.baseOptions.headers || {},
|
|
@@ -5889,10 +5475,10 @@ var MarginTrading = class {
|
|
|
5889
5475
|
this.restAPI = new RestAPI(configRestAPI);
|
|
5890
5476
|
}
|
|
5891
5477
|
if (config?.configurationWebsocketStreams) {
|
|
5892
|
-
const configWebsocketStreams = new
|
|
5478
|
+
const configWebsocketStreams = new import_common10.ConfigurationWebsocketStreams(
|
|
5893
5479
|
config.configurationWebsocketStreams
|
|
5894
5480
|
);
|
|
5895
|
-
configWebsocketStreams.wsURL = configWebsocketStreams.wsURL ||
|
|
5481
|
+
configWebsocketStreams.wsURL = configWebsocketStreams.wsURL || import_common10.MARGIN_TRADING_WS_STREAMS_PROD_URL;
|
|
5896
5482
|
configWebsocketStreams.userAgent = userAgent;
|
|
5897
5483
|
this.websocketStreams = new WebsocketStreams(configWebsocketStreams);
|
|
5898
5484
|
}
|
|
@@ -5900,7 +5486,7 @@ var MarginTrading = class {
|
|
|
5900
5486
|
};
|
|
5901
5487
|
|
|
5902
5488
|
// src/index.ts
|
|
5903
|
-
var
|
|
5489
|
+
var import_common11 = require("@binance/common");
|
|
5904
5490
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5905
5491
|
0 && (module.exports = {
|
|
5906
5492
|
BadRequestError,
|