ccxt 4.3.49 → 4.3.51

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.
@@ -14,6 +14,7 @@ class binancecoinm extends binance {
14
14
  'doc': [
15
15
  'https://binance-docs.github.io/apidocs/delivery/en/',
16
16
  'https://binance-docs.github.io/apidocs/spot/en',
17
+ 'https://developers.binance.com/en',
17
18
  ],
18
19
  },
19
20
  'has': {
@@ -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,
@@ -4151,6 +4151,7 @@ class bitget extends bitget$1 {
4151
4151
  * @param {string} [params.trailingTriggerPrice] *swap and future only* the price to trigger a trailing stop order, default uses the price argument
4152
4152
  * @param {string} [params.triggerType] *swap and future only* 'fill_price', 'mark_price' or 'index_price'
4153
4153
  * @param {boolean} [params.oneWayMode] *swap and future only* required to set this to true in one_way_mode and you can leave this as undefined in hedge_mode, can adjust the mode using the setPositionMode() method
4154
+ * @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
4154
4155
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4155
4156
  */
4156
4157
  await this.loadMarkets();
@@ -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
@@ -18,7 +18,7 @@ class exmo extends exmo$1 {
18
18
  'id': 'exmo',
19
19
  'name': 'EXMO',
20
20
  'countries': ['LT'],
21
- 'rateLimit': 350,
21
+ 'rateLimit': 100,
22
22
  'version': 'v1.1',
23
23
  'has': {
24
24
  'CORS': undefined,
@@ -3993,10 +3993,10 @@ class htx extends htx$1 {
3993
3993
  'status': '0', // support multiple query seperated by ',',such as '3,4,5', 0: all. 3. Have sumbmitted the orders; 4. Orders partially matched; 5. Orders cancelled with partially matched; 6. Orders fully matched; 7. Orders cancelled;
3994
3994
  };
3995
3995
  let response = undefined;
3996
- const stop = this.safeValue(params, 'stop');
3996
+ const stop = this.safeBool2(params, 'stop', 'trigger');
3997
3997
  const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
3998
3998
  const trailing = this.safeBool(params, 'trailing', false);
3999
- params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing']);
3999
+ params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger']);
4000
4000
  if (stop || stopLossTakeProfit || trailing) {
4001
4001
  if (limit !== undefined) {
4002
4002
  request['page_size'] = limit;
@@ -4368,10 +4368,10 @@ class htx extends htx$1 {
4368
4368
  request['page_size'] = limit;
4369
4369
  }
4370
4370
  request['contract_code'] = market['id'];
4371
- const stop = this.safeValue(params, 'stop');
4371
+ const stop = this.safeBool2(params, 'stop', 'trigger');
4372
4372
  const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
4373
4373
  const trailing = this.safeBool(params, 'trailing', false);
4374
- params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing']);
4374
+ params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger']);
4375
4375
  if (market['linear']) {
4376
4376
  let marginMode = undefined;
4377
4377
  [marginMode, params] = this.handleMarginModeAndParams('fetchOpenOrders', params);
@@ -5751,10 +5751,10 @@ class htx extends htx$1 {
5751
5751
  else {
5752
5752
  request['contract_code'] = market['id'];
5753
5753
  }
5754
- const stop = this.safeValue(params, 'stop');
5754
+ const stop = this.safeBool2(params, 'stop', 'trigger');
5755
5755
  const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
5756
5756
  const trailing = this.safeBool(params, 'trailing', false);
5757
- params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing']);
5757
+ params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger']);
5758
5758
  if (market['linear']) {
5759
5759
  let marginMode = undefined;
5760
5760
  [marginMode, params] = this.handleMarginModeAndParams('cancelOrder', params);
@@ -5917,9 +5917,9 @@ class htx extends htx$1 {
5917
5917
  else {
5918
5918
  request['contract_code'] = market['id'];
5919
5919
  }
5920
- const stop = this.safeValue(params, 'stop');
5920
+ const stop = this.safeBool2(params, 'stop', 'trigger');
5921
5921
  const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
5922
- params = this.omit(params, ['stop', 'stopLossTakeProfit']);
5922
+ params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trigger']);
5923
5923
  if (market['linear']) {
5924
5924
  let marginMode = undefined;
5925
5925
  [marginMode, params] = this.handleMarginModeAndParams('cancelOrders', params);
@@ -6076,10 +6076,10 @@ class htx extends htx$1 {
6076
6076
  request['symbol'] = market['settleId'];
6077
6077
  }
6078
6078
  request['contract_code'] = market['id'];
6079
- const stop = this.safeValue(params, 'stop');
6079
+ const stop = this.safeBool2(params, 'stop', 'trigger');
6080
6080
  const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
6081
6081
  const trailing = this.safeBool(params, 'trailing', false);
6082
- params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing']);
6082
+ params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger']);
6083
6083
  if (market['linear']) {
6084
6084
  let marginMode = undefined;
6085
6085
  [marginMode, params] = this.handleMarginModeAndParams('cancelAllOrders', params);
@@ -2509,9 +2509,9 @@ class kucoin extends kucoin$1 {
2509
2509
  await this.loadMarkets();
2510
2510
  let lowercaseStatus = status.toLowerCase();
2511
2511
  const until = this.safeInteger(params, 'until');
2512
- const stop = this.safeBool(params, 'stop', false);
2512
+ const stop = this.safeBool2(params, 'stop', 'trigger', false);
2513
2513
  const hf = this.safeBool(params, 'hf', false);
2514
- params = this.omit(params, ['stop', 'hf', 'until']);
2514
+ params = this.omit(params, ['stop', 'hf', 'until', 'trigger']);
2515
2515
  const [marginMode, query] = this.handleMarginModeAndParams('fetchOrdersByStatus', params);
2516
2516
  if (lowercaseStatus === 'open') {
2517
2517
  lowercaseStatus = 'active';
@@ -2688,7 +2688,7 @@ class kucoin extends kucoin$1 {
2688
2688
  await this.loadMarkets();
2689
2689
  const request = {};
2690
2690
  const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
2691
- const stop = this.safeBool(params, 'stop', false);
2691
+ const stop = this.safeBool2(params, 'stop', 'trigger', false);
2692
2692
  const hf = this.safeBool(params, 'hf', false);
2693
2693
  let market = undefined;
2694
2694
  if (symbol !== undefined) {
@@ -2700,7 +2700,7 @@ class kucoin extends kucoin$1 {
2700
2700
  }
2701
2701
  request['symbol'] = market['id'];
2702
2702
  }
2703
- params = this.omit(params, ['stop', 'hf', 'clientOid', 'clientOrderId']);
2703
+ params = this.omit(params, ['stop', 'hf', 'clientOid', 'clientOrderId', 'trigger']);
2704
2704
  let response = undefined;
2705
2705
  if (clientOrderId !== undefined) {
2706
2706
  request['clientOid'] = clientOrderId;
@@ -1765,7 +1765,7 @@ class kucoinfutures extends kucoinfutures$1 {
1765
1765
  if (paginate) {
1766
1766
  return await this.fetchPaginatedCallDynamic('fetchOrdersByStatus', symbol, since, limit, params);
1767
1767
  }
1768
- const stop = this.safeValue2(params, 'stop', 'trigger');
1768
+ const stop = this.safeBool2(params, 'stop', 'trigger');
1769
1769
  const until = this.safeInteger(params, 'until');
1770
1770
  params = this.omit(params, ['stop', 'until', 'trigger']);
1771
1771
  if (status === 'closed') {
@@ -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-docs.github.io/apidocs/futures/en/#liquidation-order-streams
197
- * @see https://binance-docs.github.io/apidocs/delivery/en/#liquidation-order-streams
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-docs.github.io/apidocs/futures/en/#all-market-liquidation-order-streams
212
- * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-liquidation-order-streams
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-docs.github.io/apidocs/futures/en/#event-order-update
418
- * @see https://binance-docs.github.io/apidocs/delivery/en/#event-order-update
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-docs.github.io/apidocs/futures/en/#event-order-update
433
- * @see https://binance-docs.github.io/apidocs/delivery/en/#event-order-update
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-docs.github.io/apidocs/futures/en/#order-book-2
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-docs.github.io/apidocs/websocket_api/en/#account-information-user_data
1989
- * @see https://binance-docs.github.io/apidocs/futures/en/#account-information-user_data
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-docs.github.io/apidocs/futures/en/#position-information-user_data
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-docs.github.io/apidocs/futures/en/#position-information-user_data
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-docs.github.io/apidocs/websocket_api/en/#cancel-and-replace-order-trade
2490
- * @see https://binance-docs.github.io/apidocs/futures/en/#modify-order-trade-2
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-docs.github.io/apidocs/spot/en/#payload-order-update
2880
- * @see https://binance-docs.github.io/apidocs/pm/en/#event-futures-order-update
2881
- * @see https://binance-docs.github.io/apidocs/pm/en/#event-margin-order-update
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,
@@ -225,8 +225,8 @@ class gate extends gate$1 {
225
225
  */
226
226
  await this.loadMarkets();
227
227
  const market = (symbol === undefined) ? undefined : this.market(symbol);
228
- const stop = this.safeValue2(params, 'is_stop_order', 'stop', false);
229
- params = this.omit(params, ['is_stop_order', 'stop']);
228
+ const stop = this.safeValueN(params, ['is_stop_order', 'stop', 'trigger'], false);
229
+ params = this.omit(params, ['is_stop_order', 'stop', 'trigger']);
230
230
  const [type, query] = this.handleMarketTypeAndParams('cancelOrder', market, params);
231
231
  const [request, requestParams] = (type === 'spot' || type === 'margin') ? this.spotOrderPrepareRequest(market, stop, query) : this.prepareRequest(market, type, query);
232
232
  const messageType = this.getTypeByMarket(market);
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.48";
7
+ declare const version = "4.3.50";
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.49';
41
+ const version = '4.3.51';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
package/js/src/bigone.js CHANGED
@@ -23,7 +23,7 @@ export default class bigone extends Exchange {
23
23
  'name': 'BigONE',
24
24
  'countries': ['CN'],
25
25
  'version': 'v3',
26
- 'rateLimit': 1200,
26
+ 'rateLimit': 20,
27
27
  'has': {
28
28
  'CORS': undefined,
29
29
  'spot': true,