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.
@@ -17,6 +17,7 @@ export default class binancecoinm extends binance {
17
17
  'doc': [
18
18
  'https://binance-docs.github.io/apidocs/delivery/en/',
19
19
  'https://binance-docs.github.io/apidocs/spot/en',
20
+ 'https://developers.binance.com/en',
20
21
  ],
21
22
  },
22
23
  'has': {
@@ -18,6 +18,7 @@ export default class binanceusdm extends binance {
18
18
  'doc': [
19
19
  'https://binance-docs.github.io/apidocs/futures/en/',
20
20
  'https://binance-docs.github.io/apidocs/spot/en',
21
+ 'https://developers.binance.com/en',
21
22
  ],
22
23
  },
23
24
  'has': {
@@ -39,6 +40,7 @@ export default class binanceusdm extends binance {
39
40
  'marginModes': {},
40
41
  },
41
42
  // https://binance-docs.github.io/apidocs/futures/en/#error-codes
43
+ // https://developers.binance.com/docs/derivatives/usds-margined-futures/error-code
42
44
  'exceptions': {
43
45
  'exact': {
44
46
  '-5021': InvalidOrder,
package/js/src/bybit.d.ts CHANGED
@@ -68,6 +68,7 @@ export default class bybit extends Exchange {
68
68
  cancelOrderRequest(id: string, symbol?: Str, params?: {}): any;
69
69
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
70
70
  cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
71
+ cancelAllOrdersAfter(timeout: Int, params?: {}): Promise<any>;
71
72
  cancelOrdersForSymbols(orders: CancellationRequest[], params?: {}): Promise<Order[]>;
72
73
  cancelAllUsdcOrders(symbol?: Str, params?: {}): Promise<any>;
73
74
  cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
package/js/src/bybit.js CHANGED
@@ -37,6 +37,7 @@ export default class bybit extends Exchange {
37
37
  'option': true,
38
38
  'borrowCrossMargin': true,
39
39
  'cancelAllOrders': true,
40
+ 'cancelAllOrdersAfter': true,
40
41
  'cancelOrder': true,
41
42
  'cancelOrders': true,
42
43
  'cancelOrdersForSymbols': true,
@@ -4405,6 +4406,39 @@ export default class bybit extends Exchange {
4405
4406
  const row = this.safeList(result, 'list', []);
4406
4407
  return this.parseOrders(row, market);
4407
4408
  }
4409
+ async cancelAllOrdersAfter(timeout, params = {}) {
4410
+ /**
4411
+ * @method
4412
+ * @name bybit#cancelAllOrdersAfter
4413
+ * @description dead man's switch, cancel all orders after the given timeout
4414
+ * @see https://bybit-exchange.github.io/docs/v5/order/dcp
4415
+ * @param {number} timeout time in milliseconds
4416
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4417
+ * @param {string} [params.product] OPTIONS, DERIVATIVES, SPOT, default is 'DERIVATIVES'
4418
+ * @returns {object} the api result
4419
+ */
4420
+ await this.loadMarkets();
4421
+ const request = {
4422
+ 'timeWindow': this.parseToInt(timeout / 1000),
4423
+ };
4424
+ let type = undefined;
4425
+ [type, params] = this.handleMarketTypeAndParams('cancelAllOrdersAfter', undefined, params, 'swap');
4426
+ const productMap = {
4427
+ 'spot': 'SPOT',
4428
+ 'swap': 'DERIVATIVES',
4429
+ 'option': 'OPTIONS',
4430
+ };
4431
+ const product = this.safeString(productMap, type, type);
4432
+ request['product'] = product;
4433
+ const response = await this.privatePostV5OrderDisconnectedCancelAll(this.extend(request, params));
4434
+ //
4435
+ // {
4436
+ // "retCode": 0,
4437
+ // "retMsg": "success"
4438
+ // }
4439
+ //
4440
+ return response;
4441
+ }
4408
4442
  async cancelOrdersForSymbols(orders, params = {}) {
4409
4443
  /**
4410
4444
  * @method
@@ -5175,9 +5209,15 @@ export default class bybit extends Exchange {
5175
5209
  * @param {string} [params.baseCoin] Base coin. Supports linear, inverse & option
5176
5210
  * @param {string} [params.settleCoin] Settle coin. Supports linear, inverse & option
5177
5211
  * @param {string} [params.orderFilter] 'Order' or 'StopOrder' or 'tpslOrder'
5212
+ * @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)
5178
5213
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5179
5214
  */
5180
5215
  await this.loadMarkets();
5216
+ let paginate = false;
5217
+ [paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
5218
+ if (paginate) {
5219
+ return await this.fetchPaginatedCallCursor('fetchOpenOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', undefined, 50);
5220
+ }
5181
5221
  const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
5182
5222
  const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
5183
5223
  const request = {};
package/js/src/exmo.js CHANGED
@@ -21,7 +21,7 @@ export default class exmo extends Exchange {
21
21
  'id': 'exmo',
22
22
  'name': 'EXMO',
23
23
  'countries': ['LT'],
24
- 'rateLimit': 350,
24
+ 'rateLimit': 100,
25
25
  'version': 'v1.1',
26
26
  'has': {
27
27
  'CORS': undefined,
@@ -84,6 +84,7 @@ export default class krakenfutures extends Exchange {
84
84
  'public': 'https://demo-futures.kraken.com/derivatives/api/',
85
85
  'private': 'https://demo-futures.kraken.com/derivatives/api/',
86
86
  'charts': 'https://demo-futures.kraken.com/api/charts/',
87
+ 'history': 'https://demo-futures.kraken.com/api/history/',
87
88
  'www': 'https://demo-futures.kraken.com',
88
89
  },
89
90
  'logo': 'https://user-images.githubusercontent.com/24300605/81436764-b22fd580-9172-11ea-9703-742783e6376d.jpg',
package/js/src/okx.js CHANGED
@@ -434,6 +434,7 @@ export default class okx extends Exchange {
434
434
  'sprd/cancel-order': 1,
435
435
  'sprd/mass-cancel': 1,
436
436
  'sprd/amend-order': 1,
437
+ 'sprd/cancel-all-after': 10,
437
438
  // trade
438
439
  'trade/order': 1 / 3,
439
440
  'trade/batch-orders': 1 / 15,
@@ -85,6 +85,7 @@ export default class binance extends binanceRest {
85
85
  'papi': 'wss://fstream.binance.com/pm/ws',
86
86
  },
87
87
  },
88
+ 'doc': 'https://developers.binance.com/en',
88
89
  },
89
90
  'streaming': {
90
91
  'keepAlive': 180000,
@@ -196,8 +197,8 @@ export default class binance extends binanceRest {
196
197
  * @method
197
198
  * @name binance#watchLiquidations
198
199
  * @description watch the public liquidations of a trading pair
199
- * @see https://binance-docs.github.io/apidocs/futures/en/#liquidation-order-streams
200
- * @see https://binance-docs.github.io/apidocs/delivery/en/#liquidation-order-streams
200
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams
201
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Liquidation-Order-Streams
201
202
  * @param {string} symbol unified CCXT market symbol
202
203
  * @param {int} [since] the earliest time in ms to fetch liquidations for
203
204
  * @param {int} [limit] the maximum number of liquidation structures to retrieve
@@ -211,8 +212,8 @@ export default class binance extends binanceRest {
211
212
  * @method
212
213
  * @name binance#watchLiquidationsForSymbols
213
214
  * @description watch the public liquidations of a trading pair
214
- * @see https://binance-docs.github.io/apidocs/futures/en/#all-market-liquidation-order-streams
215
- * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-liquidation-order-streams
215
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
216
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
216
217
  * @param {string} symbol unified CCXT market symbol
217
218
  * @param {int} [since] the earliest time in ms to fetch liquidations for
218
219
  * @param {int} [limit] the maximum number of liquidation structures to retrieve
@@ -417,8 +418,8 @@ export default class binance extends binanceRest {
417
418
  * @method
418
419
  * @name binance#watchMyLiquidations
419
420
  * @description watch the private liquidations of a trading pair
420
- * @see https://binance-docs.github.io/apidocs/futures/en/#event-order-update
421
- * @see https://binance-docs.github.io/apidocs/delivery/en/#event-order-update
421
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
422
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
422
423
  * @param {string} symbol unified CCXT market symbol
423
424
  * @param {int} [since] the earliest time in ms to fetch liquidations for
424
425
  * @param {int} [limit] the maximum number of liquidation structures to retrieve
@@ -432,8 +433,8 @@ export default class binance extends binanceRest {
432
433
  * @method
433
434
  * @name binance#watchMyLiquidationsForSymbols
434
435
  * @description watch the private liquidations of a trading pair
435
- * @see https://binance-docs.github.io/apidocs/futures/en/#event-order-update
436
- * @see https://binance-docs.github.io/apidocs/delivery/en/#event-order-update
436
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
437
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
437
438
  * @param {string} symbol unified CCXT market symbol
438
439
  * @param {int} [since] the earliest time in ms to fetch liquidations for
439
440
  * @param {int} [limit] the maximum number of liquidation structures to retrieve
@@ -644,7 +645,8 @@ export default class binance extends binanceRest {
644
645
  * @method
645
646
  * @name binance#fetchOrderBookWs
646
647
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
647
- * @see https://binance-docs.github.io/apidocs/futures/en/#order-book-2
648
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#order-book
649
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book
648
650
  * @param {string} symbol unified symbol of the market to fetch the order book for
649
651
  * @param {int} [limit] the maximum amount of order book entries to return
650
652
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1298,7 +1300,6 @@ export default class binance extends binanceRest {
1298
1300
  * @method
1299
1301
  * @name binance#fetchTickerWs
1300
1302
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1301
- * @see https://binance-docs.github.io/apidocs/voptions/en/#24hr-ticker-price-change-statistics
1302
1303
  * @param {string} symbol unified symbol of the market to fetch the ticker for
1303
1304
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1304
1305
  * @param {string} [params.method] method to use can be ticker.price or ticker.book
@@ -1338,8 +1339,8 @@ export default class binance extends binanceRest {
1338
1339
  /**
1339
1340
  * @method
1340
1341
  * @name binance#fetchOHLCVWs
1341
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#klines
1342
1342
  * @description query historical candlestick data containing the open, high, low, and close price, and the volume of a market
1343
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#klines
1343
1344
  * @param {string} symbol unified symbol of the market to query OHLCV data for
1344
1345
  * @param {string} timeframe the length of time each candle represents
1345
1346
  * @param {int} since timestamp in ms of the earliest candle to fetch
@@ -1465,10 +1466,10 @@ export default class binance extends binanceRest {
1465
1466
  /**
1466
1467
  * @method
1467
1468
  * @name binance#watchBidsAsks
1468
- * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-book-ticker-streams
1469
- * @see https://binance-docs.github.io/apidocs/futures/en/#all-book-tickers-stream
1470
- * @see https://binance-docs.github.io/apidocs/delivery/en/#all-book-tickers-stream
1471
1469
  * @description watches best bid & ask for symbols
1470
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#symbol-order-book-ticker
1471
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
1472
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
1472
1473
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
1473
1474
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1474
1475
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -1988,9 +1989,8 @@ export default class binance extends binanceRest {
1988
1989
  * @method
1989
1990
  * @name binance#fetchBalanceWs
1990
1991
  * @description fetch balance and get the amount of funds available for trading or funds locked in orders
1991
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#account-information-user_data
1992
- * @see https://binance-docs.github.io/apidocs/futures/en/#account-information-user_data
1993
- * @see https://binance-docs.github.io/apidocs/futures/en/#futures-account-balance-user_data
1992
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance
1993
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-information-user_data
1994
1994
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1995
1995
  * @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
1996
1996
  * @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
@@ -2088,7 +2088,7 @@ export default class binance extends binanceRest {
2088
2088
  /**
2089
2089
  * @method
2090
2090
  * @name binance#fetchPositionWs
2091
- * @see https://binance-docs.github.io/apidocs/futures/en/#position-information-user_data
2091
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
2092
2092
  * @description fetch data on an open position
2093
2093
  * @param {string} symbol unified market symbol of the market the position is held in
2094
2094
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -2101,7 +2101,7 @@ export default class binance extends binanceRest {
2101
2101
  * @method
2102
2102
  * @name binance#fetchPositionsWs
2103
2103
  * @description fetch all open positions
2104
- * @see https://binance-docs.github.io/apidocs/futures/en/#position-information-user_data
2104
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
2105
2105
  * @param {string[]} [symbols] list of unified market symbols
2106
2106
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2107
2107
  * @param {boolean} [params.returnRateLimits] set to true to return rate limit informations, defaults to false.
@@ -2340,9 +2340,9 @@ export default class binance extends binanceRest {
2340
2340
  /**
2341
2341
  * @method
2342
2342
  * @name binance#createOrderWs
2343
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#place-new-order-trade
2344
- * @see https://binance-docs.github.io/apidocs/futures/en/#new-order-trade-2
2345
2343
  * @description create a trade order
2344
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#place-new-order-trade
2345
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Order
2346
2346
  * @param {string} symbol unified symbol of the market to create an order in
2347
2347
  * @param {string} type 'market' or 'limit'
2348
2348
  * @param {string} side 'buy' or 'sell'
@@ -2489,8 +2489,8 @@ export default class binance extends binanceRest {
2489
2489
  * @method
2490
2490
  * @name binance#editOrderWs
2491
2491
  * @description edit a trade order
2492
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#cancel-and-replace-order-trade
2493
- * @see https://binance-docs.github.io/apidocs/futures/en/#modify-order-trade-2
2492
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-and-replace-order-trade
2493
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order
2494
2494
  * @param {string} id order id
2495
2495
  * @param {string} symbol unified symbol of the market to create an order in
2496
2496
  * @param {string} type 'market' or 'limit'
@@ -2644,9 +2644,9 @@ export default class binance extends binanceRest {
2644
2644
  /**
2645
2645
  * @method
2646
2646
  * @name binance#cancelOrderWs
2647
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#cancel-order-trade
2648
- * @see https://binance-docs.github.io/apidocs/futures/en/#cancel-order-trade-2
2649
2647
  * @description cancel multiple orders
2648
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-order-trade
2649
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order
2650
2650
  * @param {string} id order id
2651
2651
  * @param {string} symbol unified market symbol, default is undefined
2652
2652
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -2690,8 +2690,8 @@ export default class binance extends binanceRest {
2690
2690
  /**
2691
2691
  * @method
2692
2692
  * @name binance#cancelAllOrdersWs
2693
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#current-open-orders-user_data
2694
2693
  * @description cancel all open orders in a market
2694
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-open-orders-trade
2695
2695
  * @param {string} symbol unified market symbol of the market to cancel orders in
2696
2696
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2697
2697
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -2725,9 +2725,9 @@ export default class binance extends binanceRest {
2725
2725
  /**
2726
2726
  * @method
2727
2727
  * @name binance#fetchOrderWs
2728
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#query-order-user_data
2729
- * @see https://binance-docs.github.io/apidocs/futures/en/#query-order-user_data-2
2730
2728
  * @description fetches information on an order made by the user
2729
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-user_data
2730
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order
2731
2731
  * @param {string} symbol unified symbol of the market the order was made in
2732
2732
  * @param {object} params extra parameters specific to the exchange API endpoint
2733
2733
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -2771,8 +2771,8 @@ export default class binance extends binanceRest {
2771
2771
  /**
2772
2772
  * @method
2773
2773
  * @name binance#fetchOrdersWs
2774
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#account-order-history-user_data
2775
2774
  * @description fetches information on multiple orders made by the user
2775
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
2776
2776
  * @param {string} symbol unified market symbol of the market orders were made in
2777
2777
  * @param {int|undefined} [since] the earliest time in ms to fetch orders for
2778
2778
  * @param {int|undefined} [limit] the maximum number of order structures to retrieve
@@ -2816,8 +2816,8 @@ export default class binance extends binanceRest {
2816
2816
  /**
2817
2817
  * @method
2818
2818
  * @name binance#fetchClosedOrdersWs
2819
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#account-order-history-user_data
2820
2819
  * @description fetch closed orders
2820
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
2821
2821
  * @param {string} symbol unified market symbol
2822
2822
  * @param {int} [since] the earliest time in ms to fetch open orders for
2823
2823
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -2838,8 +2838,8 @@ export default class binance extends binanceRest {
2838
2838
  /**
2839
2839
  * @method
2840
2840
  * @name binance#fetchOpenOrdersWs
2841
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#current-open-orders-user_data
2842
2841
  * @description fetch all unfilled currently open orders
2842
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#current-open-orders-user_data
2843
2843
  * @param {string} symbol unified market symbol
2844
2844
  * @param {int|undefined} [since] the earliest time in ms to fetch open orders for
2845
2845
  * @param {int|undefined} [limit] the maximum number of open orders structures to retrieve
@@ -2879,9 +2879,9 @@ export default class binance extends binanceRest {
2879
2879
  * @method
2880
2880
  * @name binance#watchOrders
2881
2881
  * @description watches information on multiple orders made by the user
2882
- * @see https://binance-docs.github.io/apidocs/spot/en/#payload-order-update
2883
- * @see https://binance-docs.github.io/apidocs/pm/en/#event-futures-order-update
2884
- * @see https://binance-docs.github.io/apidocs/pm/en/#event-margin-order-update
2882
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/user-data-stream#order-update
2883
+ * @see https://developers.binance.com/docs/margin_trading/trade-data-stream/Event-Order-Update
2884
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
2885
2885
  * @param {string} symbol unified market symbol of the market the orders were made in
2886
2886
  * @param {int} [since] the earliest time in ms to fetch orders for
2887
2887
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -3401,8 +3401,8 @@ export default class binance extends binanceRest {
3401
3401
  /**
3402
3402
  * @method
3403
3403
  * @name binance#fetchMyTradesWs
3404
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#account-trade-history-user_data
3405
3404
  * @description fetch all trades made by the user
3405
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-trade-history-user_data
3406
3406
  * @param {string} symbol unified market symbol
3407
3407
  * @param {int|undefined} [since] the earliest time in ms to fetch trades for
3408
3408
  * @param {int|undefined} [limit] the maximum number of trades structures to retrieve
@@ -3454,8 +3454,8 @@ export default class binance extends binanceRest {
3454
3454
  /**
3455
3455
  * @method
3456
3456
  * @name binance#fetchTradesWs
3457
- * @see https://binance-docs.github.io/apidocs/websocket_api/en/#recent-trades
3458
3457
  * @description fetch all trades made by the user
3458
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#recent-trades
3459
3459
  * @param {string} symbol unified market symbol
3460
3460
  * @param {int} [since] the earliest time in ms to fetch trades for
3461
3461
  * @param {int} [limit] the maximum number of trades structures to retrieve, default=500, max=1000
@@ -19,6 +19,7 @@ export default class binancecoinm extends binance {
19
19
  'name': 'Binance COIN-M',
20
20
  'urls': {
21
21
  'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
22
+ 'doc': 'https://developers.binance.com/en',
22
23
  },
23
24
  'options': {
24
25
  'fetchMarkets': ['inverse'],
@@ -15,12 +15,14 @@ export default class binanceusdm extends binance {
15
15
  'name': 'Binance USDⓈ-M',
16
16
  'urls': {
17
17
  'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
18
+ 'doc': 'https://developers.binance.com/en',
18
19
  },
19
20
  'options': {
20
21
  'fetchMarkets': ['linear'],
21
22
  'defaultSubType': 'linear',
22
23
  },
23
24
  // https://binance-docs.github.io/apidocs/futures/en/#error-codes
25
+ // https://developers.binance.com/docs/derivatives/usds-margined-futures/error-code
24
26
  'exceptions': {
25
27
  'exact': {
26
28
  '-5021': InvalidOrder,
package/js/src/pro/okx.js CHANGED
@@ -102,7 +102,7 @@ export default class okx extends okxRest {
102
102
  // okex does not support built-in ws protocol-level ping-pong
103
103
  // instead it requires a custom text-based ping-pong
104
104
  'ping': this.ping,
105
- 'keepAlive': 20000,
105
+ 'keepAlive': 18000,
106
106
  },
107
107
  });
108
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.50",
3
+ "version": "4.3.52",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",