ccxt 4.3.50 → 4.3.52
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/README.md +5 -5
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +292 -331
- package/dist/cjs/src/binancecoinm.js +1 -0
- package/dist/cjs/src/binanceusdm.js +2 -0
- package/dist/cjs/src/bybit.js +40 -0
- package/dist/cjs/src/exmo.js +1 -1
- package/dist/cjs/src/krakenfutures.js +1 -0
- package/dist/cjs/src/okx.js +1 -0
- package/dist/cjs/src/pro/binance.js +36 -36
- package/dist/cjs/src/pro/binancecoinm.js +1 -0
- package/dist/cjs/src/pro/binanceusdm.js +2 -0
- package/dist/cjs/src/pro/okx.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/okx.d.ts +1 -0
- package/js/src/bigone.js +1 -1
- package/js/src/binance.js +292 -331
- package/js/src/binancecoinm.js +1 -0
- package/js/src/binanceusdm.js +2 -0
- package/js/src/bybit.d.ts +1 -0
- package/js/src/bybit.js +40 -0
- package/js/src/exmo.js +1 -1
- package/js/src/krakenfutures.js +1 -0
- package/js/src/okx.js +1 -0
- package/js/src/pro/binance.js +36 -36
- package/js/src/pro/binancecoinm.js +1 -0
- package/js/src/pro/binanceusdm.js +2 -0
- package/js/src/pro/okx.js +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ class binanceusdm extends binance {
|
|
|
15
15
|
'doc': [
|
|
16
16
|
'https://binance-docs.github.io/apidocs/futures/en/',
|
|
17
17
|
'https://binance-docs.github.io/apidocs/spot/en',
|
|
18
|
+
'https://developers.binance.com/en',
|
|
18
19
|
],
|
|
19
20
|
},
|
|
20
21
|
'has': {
|
|
@@ -36,6 +37,7 @@ class binanceusdm extends binance {
|
|
|
36
37
|
'marginModes': {},
|
|
37
38
|
},
|
|
38
39
|
// https://binance-docs.github.io/apidocs/futures/en/#error-codes
|
|
40
|
+
// https://developers.binance.com/docs/derivatives/usds-margined-futures/error-code
|
|
39
41
|
'exceptions': {
|
|
40
42
|
'exact': {
|
|
41
43
|
'-5021': errors.InvalidOrder,
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -34,6 +34,7 @@ class bybit extends bybit$1 {
|
|
|
34
34
|
'option': true,
|
|
35
35
|
'borrowCrossMargin': true,
|
|
36
36
|
'cancelAllOrders': true,
|
|
37
|
+
'cancelAllOrdersAfter': true,
|
|
37
38
|
'cancelOrder': true,
|
|
38
39
|
'cancelOrders': true,
|
|
39
40
|
'cancelOrdersForSymbols': true,
|
|
@@ -4402,6 +4403,39 @@ class bybit extends bybit$1 {
|
|
|
4402
4403
|
const row = this.safeList(result, 'list', []);
|
|
4403
4404
|
return this.parseOrders(row, market);
|
|
4404
4405
|
}
|
|
4406
|
+
async cancelAllOrdersAfter(timeout, params = {}) {
|
|
4407
|
+
/**
|
|
4408
|
+
* @method
|
|
4409
|
+
* @name bybit#cancelAllOrdersAfter
|
|
4410
|
+
* @description dead man's switch, cancel all orders after the given timeout
|
|
4411
|
+
* @see https://bybit-exchange.github.io/docs/v5/order/dcp
|
|
4412
|
+
* @param {number} timeout time in milliseconds
|
|
4413
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4414
|
+
* @param {string} [params.product] OPTIONS, DERIVATIVES, SPOT, default is 'DERIVATIVES'
|
|
4415
|
+
* @returns {object} the api result
|
|
4416
|
+
*/
|
|
4417
|
+
await this.loadMarkets();
|
|
4418
|
+
const request = {
|
|
4419
|
+
'timeWindow': this.parseToInt(timeout / 1000),
|
|
4420
|
+
};
|
|
4421
|
+
let type = undefined;
|
|
4422
|
+
[type, params] = this.handleMarketTypeAndParams('cancelAllOrdersAfter', undefined, params, 'swap');
|
|
4423
|
+
const productMap = {
|
|
4424
|
+
'spot': 'SPOT',
|
|
4425
|
+
'swap': 'DERIVATIVES',
|
|
4426
|
+
'option': 'OPTIONS',
|
|
4427
|
+
};
|
|
4428
|
+
const product = this.safeString(productMap, type, type);
|
|
4429
|
+
request['product'] = product;
|
|
4430
|
+
const response = await this.privatePostV5OrderDisconnectedCancelAll(this.extend(request, params));
|
|
4431
|
+
//
|
|
4432
|
+
// {
|
|
4433
|
+
// "retCode": 0,
|
|
4434
|
+
// "retMsg": "success"
|
|
4435
|
+
// }
|
|
4436
|
+
//
|
|
4437
|
+
return response;
|
|
4438
|
+
}
|
|
4405
4439
|
async cancelOrdersForSymbols(orders, params = {}) {
|
|
4406
4440
|
/**
|
|
4407
4441
|
* @method
|
|
@@ -5172,9 +5206,15 @@ class bybit extends bybit$1 {
|
|
|
5172
5206
|
* @param {string} [params.baseCoin] Base coin. Supports linear, inverse & option
|
|
5173
5207
|
* @param {string} [params.settleCoin] Settle coin. Supports linear, inverse & option
|
|
5174
5208
|
* @param {string} [params.orderFilter] 'Order' or 'StopOrder' or 'tpslOrder'
|
|
5209
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5175
5210
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5176
5211
|
*/
|
|
5177
5212
|
await this.loadMarkets();
|
|
5213
|
+
let paginate = false;
|
|
5214
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
|
|
5215
|
+
if (paginate) {
|
|
5216
|
+
return await this.fetchPaginatedCallCursor('fetchOpenOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', undefined, 50);
|
|
5217
|
+
}
|
|
5178
5218
|
const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
|
|
5179
5219
|
const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
|
|
5180
5220
|
const request = {};
|
package/dist/cjs/src/exmo.js
CHANGED
|
@@ -81,6 +81,7 @@ class krakenfutures extends krakenfutures$1 {
|
|
|
81
81
|
'public': 'https://demo-futures.kraken.com/derivatives/api/',
|
|
82
82
|
'private': 'https://demo-futures.kraken.com/derivatives/api/',
|
|
83
83
|
'charts': 'https://demo-futures.kraken.com/api/charts/',
|
|
84
|
+
'history': 'https://demo-futures.kraken.com/api/history/',
|
|
84
85
|
'www': 'https://demo-futures.kraken.com',
|
|
85
86
|
},
|
|
86
87
|
'logo': 'https://user-images.githubusercontent.com/24300605/81436764-b22fd580-9172-11ea-9703-742783e6376d.jpg',
|
package/dist/cjs/src/okx.js
CHANGED
|
@@ -82,6 +82,7 @@ class binance extends binance$1 {
|
|
|
82
82
|
'papi': 'wss://fstream.binance.com/pm/ws',
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
|
+
'doc': 'https://developers.binance.com/en',
|
|
85
86
|
},
|
|
86
87
|
'streaming': {
|
|
87
88
|
'keepAlive': 180000,
|
|
@@ -193,8 +194,8 @@ class binance extends binance$1 {
|
|
|
193
194
|
* @method
|
|
194
195
|
* @name binance#watchLiquidations
|
|
195
196
|
* @description watch the public liquidations of a trading pair
|
|
196
|
-
* @see https://binance
|
|
197
|
-
* @see https://binance
|
|
197
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams
|
|
198
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Liquidation-Order-Streams
|
|
198
199
|
* @param {string} symbol unified CCXT market symbol
|
|
199
200
|
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
200
201
|
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
@@ -208,8 +209,8 @@ class binance extends binance$1 {
|
|
|
208
209
|
* @method
|
|
209
210
|
* @name binance#watchLiquidationsForSymbols
|
|
210
211
|
* @description watch the public liquidations of a trading pair
|
|
211
|
-
* @see https://binance
|
|
212
|
-
* @see https://binance
|
|
212
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
|
|
213
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
|
|
213
214
|
* @param {string} symbol unified CCXT market symbol
|
|
214
215
|
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
215
216
|
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
@@ -414,8 +415,8 @@ class binance extends binance$1 {
|
|
|
414
415
|
* @method
|
|
415
416
|
* @name binance#watchMyLiquidations
|
|
416
417
|
* @description watch the private liquidations of a trading pair
|
|
417
|
-
* @see https://binance
|
|
418
|
-
* @see https://binance
|
|
418
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
|
|
419
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
|
|
419
420
|
* @param {string} symbol unified CCXT market symbol
|
|
420
421
|
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
421
422
|
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
@@ -429,8 +430,8 @@ class binance extends binance$1 {
|
|
|
429
430
|
* @method
|
|
430
431
|
* @name binance#watchMyLiquidationsForSymbols
|
|
431
432
|
* @description watch the private liquidations of a trading pair
|
|
432
|
-
* @see https://binance
|
|
433
|
-
* @see https://binance
|
|
433
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
|
|
434
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
|
|
434
435
|
* @param {string} symbol unified CCXT market symbol
|
|
435
436
|
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
436
437
|
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
@@ -641,7 +642,8 @@ class binance extends binance$1 {
|
|
|
641
642
|
* @method
|
|
642
643
|
* @name binance#fetchOrderBookWs
|
|
643
644
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
644
|
-
* @see https://binance
|
|
645
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#order-book
|
|
646
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book
|
|
645
647
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
646
648
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
647
649
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1295,7 +1297,6 @@ class binance extends binance$1 {
|
|
|
1295
1297
|
* @method
|
|
1296
1298
|
* @name binance#fetchTickerWs
|
|
1297
1299
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1298
|
-
* @see https://binance-docs.github.io/apidocs/voptions/en/#24hr-ticker-price-change-statistics
|
|
1299
1300
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1300
1301
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1301
1302
|
* @param {string} [params.method] method to use can be ticker.price or ticker.book
|
|
@@ -1335,8 +1336,8 @@ class binance extends binance$1 {
|
|
|
1335
1336
|
/**
|
|
1336
1337
|
* @method
|
|
1337
1338
|
* @name binance#fetchOHLCVWs
|
|
1338
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#klines
|
|
1339
1339
|
* @description query historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1340
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#klines
|
|
1340
1341
|
* @param {string} symbol unified symbol of the market to query OHLCV data for
|
|
1341
1342
|
* @param {string} timeframe the length of time each candle represents
|
|
1342
1343
|
* @param {int} since timestamp in ms of the earliest candle to fetch
|
|
@@ -1462,10 +1463,10 @@ class binance extends binance$1 {
|
|
|
1462
1463
|
/**
|
|
1463
1464
|
* @method
|
|
1464
1465
|
* @name binance#watchBidsAsks
|
|
1465
|
-
* @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-book-ticker-streams
|
|
1466
|
-
* @see https://binance-docs.github.io/apidocs/futures/en/#all-book-tickers-stream
|
|
1467
|
-
* @see https://binance-docs.github.io/apidocs/delivery/en/#all-book-tickers-stream
|
|
1468
1466
|
* @description watches best bid & ask for symbols
|
|
1467
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#symbol-order-book-ticker
|
|
1468
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
|
|
1469
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
|
|
1469
1470
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
1470
1471
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1471
1472
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -1985,9 +1986,8 @@ class binance extends binance$1 {
|
|
|
1985
1986
|
* @method
|
|
1986
1987
|
* @name binance#fetchBalanceWs
|
|
1987
1988
|
* @description fetch balance and get the amount of funds available for trading or funds locked in orders
|
|
1988
|
-
* @see https://binance
|
|
1989
|
-
* @see https://binance
|
|
1990
|
-
* @see https://binance-docs.github.io/apidocs/futures/en/#futures-account-balance-user_data
|
|
1989
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance
|
|
1990
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-information-user_data
|
|
1991
1991
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1992
1992
|
* @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
|
|
1993
1993
|
* @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
|
|
@@ -2085,7 +2085,7 @@ class binance extends binance$1 {
|
|
|
2085
2085
|
/**
|
|
2086
2086
|
* @method
|
|
2087
2087
|
* @name binance#fetchPositionWs
|
|
2088
|
-
* @see https://binance
|
|
2088
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
|
|
2089
2089
|
* @description fetch data on an open position
|
|
2090
2090
|
* @param {string} symbol unified market symbol of the market the position is held in
|
|
2091
2091
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2098,7 +2098,7 @@ class binance extends binance$1 {
|
|
|
2098
2098
|
* @method
|
|
2099
2099
|
* @name binance#fetchPositionsWs
|
|
2100
2100
|
* @description fetch all open positions
|
|
2101
|
-
* @see https://binance
|
|
2101
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
|
|
2102
2102
|
* @param {string[]} [symbols] list of unified market symbols
|
|
2103
2103
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2104
2104
|
* @param {boolean} [params.returnRateLimits] set to true to return rate limit informations, defaults to false.
|
|
@@ -2337,9 +2337,9 @@ class binance extends binance$1 {
|
|
|
2337
2337
|
/**
|
|
2338
2338
|
* @method
|
|
2339
2339
|
* @name binance#createOrderWs
|
|
2340
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#place-new-order-trade
|
|
2341
|
-
* @see https://binance-docs.github.io/apidocs/futures/en/#new-order-trade-2
|
|
2342
2340
|
* @description create a trade order
|
|
2341
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#place-new-order-trade
|
|
2342
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Order
|
|
2343
2343
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
2344
2344
|
* @param {string} type 'market' or 'limit'
|
|
2345
2345
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -2486,8 +2486,8 @@ class binance extends binance$1 {
|
|
|
2486
2486
|
* @method
|
|
2487
2487
|
* @name binance#editOrderWs
|
|
2488
2488
|
* @description edit a trade order
|
|
2489
|
-
* @see https://binance
|
|
2490
|
-
* @see https://binance
|
|
2489
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-and-replace-order-trade
|
|
2490
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order
|
|
2491
2491
|
* @param {string} id order id
|
|
2492
2492
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
2493
2493
|
* @param {string} type 'market' or 'limit'
|
|
@@ -2641,9 +2641,9 @@ class binance extends binance$1 {
|
|
|
2641
2641
|
/**
|
|
2642
2642
|
* @method
|
|
2643
2643
|
* @name binance#cancelOrderWs
|
|
2644
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#cancel-order-trade
|
|
2645
|
-
* @see https://binance-docs.github.io/apidocs/futures/en/#cancel-order-trade-2
|
|
2646
2644
|
* @description cancel multiple orders
|
|
2645
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-order-trade
|
|
2646
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order
|
|
2647
2647
|
* @param {string} id order id
|
|
2648
2648
|
* @param {string} symbol unified market symbol, default is undefined
|
|
2649
2649
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2687,8 +2687,8 @@ class binance extends binance$1 {
|
|
|
2687
2687
|
/**
|
|
2688
2688
|
* @method
|
|
2689
2689
|
* @name binance#cancelAllOrdersWs
|
|
2690
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#current-open-orders-user_data
|
|
2691
2690
|
* @description cancel all open orders in a market
|
|
2691
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-open-orders-trade
|
|
2692
2692
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
2693
2693
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2694
2694
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -2722,9 +2722,9 @@ class binance extends binance$1 {
|
|
|
2722
2722
|
/**
|
|
2723
2723
|
* @method
|
|
2724
2724
|
* @name binance#fetchOrderWs
|
|
2725
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#query-order-user_data
|
|
2726
|
-
* @see https://binance-docs.github.io/apidocs/futures/en/#query-order-user_data-2
|
|
2727
2725
|
* @description fetches information on an order made by the user
|
|
2726
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-user_data
|
|
2727
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order
|
|
2728
2728
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2729
2729
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
2730
2730
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -2768,8 +2768,8 @@ class binance extends binance$1 {
|
|
|
2768
2768
|
/**
|
|
2769
2769
|
* @method
|
|
2770
2770
|
* @name binance#fetchOrdersWs
|
|
2771
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#account-order-history-user_data
|
|
2772
2771
|
* @description fetches information on multiple orders made by the user
|
|
2772
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
|
|
2773
2773
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2774
2774
|
* @param {int|undefined} [since] the earliest time in ms to fetch orders for
|
|
2775
2775
|
* @param {int|undefined} [limit] the maximum number of order structures to retrieve
|
|
@@ -2813,8 +2813,8 @@ class binance extends binance$1 {
|
|
|
2813
2813
|
/**
|
|
2814
2814
|
* @method
|
|
2815
2815
|
* @name binance#fetchClosedOrdersWs
|
|
2816
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#account-order-history-user_data
|
|
2817
2816
|
* @description fetch closed orders
|
|
2817
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
|
|
2818
2818
|
* @param {string} symbol unified market symbol
|
|
2819
2819
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2820
2820
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -2835,8 +2835,8 @@ class binance extends binance$1 {
|
|
|
2835
2835
|
/**
|
|
2836
2836
|
* @method
|
|
2837
2837
|
* @name binance#fetchOpenOrdersWs
|
|
2838
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#current-open-orders-user_data
|
|
2839
2838
|
* @description fetch all unfilled currently open orders
|
|
2839
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#current-open-orders-user_data
|
|
2840
2840
|
* @param {string} symbol unified market symbol
|
|
2841
2841
|
* @param {int|undefined} [since] the earliest time in ms to fetch open orders for
|
|
2842
2842
|
* @param {int|undefined} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -2876,9 +2876,9 @@ class binance extends binance$1 {
|
|
|
2876
2876
|
* @method
|
|
2877
2877
|
* @name binance#watchOrders
|
|
2878
2878
|
* @description watches information on multiple orders made by the user
|
|
2879
|
-
* @see https://binance
|
|
2880
|
-
* @see https://binance
|
|
2881
|
-
* @see https://binance
|
|
2879
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/user-data-stream#order-update
|
|
2880
|
+
* @see https://developers.binance.com/docs/margin_trading/trade-data-stream/Event-Order-Update
|
|
2881
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
|
|
2882
2882
|
* @param {string} symbol unified market symbol of the market the orders were made in
|
|
2883
2883
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2884
2884
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -3398,8 +3398,8 @@ class binance extends binance$1 {
|
|
|
3398
3398
|
/**
|
|
3399
3399
|
* @method
|
|
3400
3400
|
* @name binance#fetchMyTradesWs
|
|
3401
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#account-trade-history-user_data
|
|
3402
3401
|
* @description fetch all trades made by the user
|
|
3402
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-trade-history-user_data
|
|
3403
3403
|
* @param {string} symbol unified market symbol
|
|
3404
3404
|
* @param {int|undefined} [since] the earliest time in ms to fetch trades for
|
|
3405
3405
|
* @param {int|undefined} [limit] the maximum number of trades structures to retrieve
|
|
@@ -3451,8 +3451,8 @@ class binance extends binance$1 {
|
|
|
3451
3451
|
/**
|
|
3452
3452
|
* @method
|
|
3453
3453
|
* @name binance#fetchTradesWs
|
|
3454
|
-
* @see https://binance-docs.github.io/apidocs/websocket_api/en/#recent-trades
|
|
3455
3454
|
* @description fetch all trades made by the user
|
|
3455
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#recent-trades
|
|
3456
3456
|
* @param {string} symbol unified market symbol
|
|
3457
3457
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3458
3458
|
* @param {int} [limit] the maximum number of trades structures to retrieve, default=500, max=1000
|
|
@@ -16,6 +16,7 @@ class binancecoinm extends binance {
|
|
|
16
16
|
'name': 'Binance COIN-M',
|
|
17
17
|
'urls': {
|
|
18
18
|
'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
|
|
19
|
+
'doc': 'https://developers.binance.com/en',
|
|
19
20
|
},
|
|
20
21
|
'options': {
|
|
21
22
|
'fetchMarkets': ['inverse'],
|
|
@@ -12,12 +12,14 @@ class binanceusdm extends binance {
|
|
|
12
12
|
'name': 'Binance USDⓈ-M',
|
|
13
13
|
'urls': {
|
|
14
14
|
'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
|
|
15
|
+
'doc': 'https://developers.binance.com/en',
|
|
15
16
|
},
|
|
16
17
|
'options': {
|
|
17
18
|
'fetchMarkets': ['linear'],
|
|
18
19
|
'defaultSubType': 'linear',
|
|
19
20
|
},
|
|
20
21
|
// https://binance-docs.github.io/apidocs/futures/en/#error-codes
|
|
22
|
+
// https://developers.binance.com/docs/derivatives/usds-margined-futures/error-code
|
|
21
23
|
'exceptions': {
|
|
22
24
|
'exact': {
|
|
23
25
|
'-5021': errors.InvalidOrder,
|
package/dist/cjs/src/pro/okx.js
CHANGED
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.3.
|
|
7
|
+
declare const version = "4.3.51";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.3.
|
|
41
|
+
const version = '4.3.52';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
package/js/src/abstract/okx.d.ts
CHANGED
|
@@ -222,6 +222,7 @@ interface Exchange {
|
|
|
222
222
|
privatePostSprdCancelOrder(params?: {}): Promise<implicitReturnType>;
|
|
223
223
|
privatePostSprdMassCancel(params?: {}): Promise<implicitReturnType>;
|
|
224
224
|
privatePostSprdAmendOrder(params?: {}): Promise<implicitReturnType>;
|
|
225
|
+
privatePostSprdCancelAllAfter(params?: {}): Promise<implicitReturnType>;
|
|
225
226
|
privatePostTradeOrder(params?: {}): Promise<implicitReturnType>;
|
|
226
227
|
privatePostTradeBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
227
228
|
privatePostTradeCancelOrder(params?: {}): Promise<implicitReturnType>;
|