ccxt 4.3.49__py2.py3-none-any.whl → 4.3.51__py2.py3-none-any.whl

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.
ccxt/binancecoinm.py CHANGED
@@ -18,6 +18,7 @@ class binancecoinm(binance, ImplicitAPI):
18
18
  'doc': [
19
19
  'https://binance-docs.github.io/apidocs/delivery/en/',
20
20
  'https://binance-docs.github.io/apidocs/spot/en',
21
+ 'https://developers.binance.com/en',
21
22
  ],
22
23
  },
23
24
  'has': {
ccxt/binanceusdm.py CHANGED
@@ -19,6 +19,7 @@ class binanceusdm(binance, ImplicitAPI):
19
19
  'doc': [
20
20
  'https://binance-docs.github.io/apidocs/futures/en/',
21
21
  'https://binance-docs.github.io/apidocs/spot/en',
22
+ 'https://developers.binance.com/en',
22
23
  ],
23
24
  },
24
25
  'has': {
@@ -40,6 +41,7 @@ class binanceusdm(binance, ImplicitAPI):
40
41
  'marginModes': {},
41
42
  },
42
43
  # https://binance-docs.github.io/apidocs/futures/en/#error-codes
44
+ # https://developers.binance.com/docs/derivatives/usds-margined-futures/error-code
43
45
  'exceptions': {
44
46
  'exact': {
45
47
  '-5021': InvalidOrder, # {"code":-5021,"msg":"Due to the order could not be filled immediately, the FOK order has been rejected."}
ccxt/bitget.py CHANGED
@@ -3980,6 +3980,7 @@ class bitget(Exchange, ImplicitAPI):
3980
3980
  :param str [params.trailingTriggerPrice]: *swap and future only* the price to trigger a trailing stop order, default uses the price argument
3981
3981
  :param str [params.triggerType]: *swap and future only* 'fill_price', 'mark_price' or 'index_price'
3982
3982
  :param boolean [params.oneWayMode]: *swap and future only* required to set self to True in one_way_mode and you can leave self in hedge_mode, can adjust the mode using the setPositionMode() method
3983
+ :param bool [params.reduceOnly]: True or False whether the order is reduce-only
3983
3984
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
3984
3985
  """
3985
3986
  self.load_markets()
ccxt/bybit.py CHANGED
@@ -48,6 +48,7 @@ class bybit(Exchange, ImplicitAPI):
48
48
  'option': True,
49
49
  'borrowCrossMargin': True,
50
50
  'cancelAllOrders': True,
51
+ 'cancelAllOrdersAfter': True,
51
52
  'cancelOrder': True,
52
53
  'cancelOrders': True,
53
54
  'cancelOrdersForSymbols': True,
@@ -4108,6 +4109,37 @@ class bybit(Exchange, ImplicitAPI):
4108
4109
  row = self.safe_list(result, 'list', [])
4109
4110
  return self.parse_orders(row, market)
4110
4111
 
4112
+ def cancel_all_orders_after(self, timeout: Int, params={}):
4113
+ """
4114
+ dead man's switch, cancel all orders after the given timeout
4115
+ :see: https://bybit-exchange.github.io/docs/v5/order/dcp
4116
+ :param number timeout: time in milliseconds
4117
+ :param dict [params]: extra parameters specific to the exchange API endpoint
4118
+ :param str [params.product]: OPTIONS, DERIVATIVES, SPOT, default is 'DERIVATIVES'
4119
+ :returns dict: the api result
4120
+ """
4121
+ self.load_markets()
4122
+ request: dict = {
4123
+ 'timeWindow': self.parse_to_int(timeout / 1000),
4124
+ }
4125
+ type: Str = None
4126
+ type, params = self.handle_market_type_and_params('cancelAllOrdersAfter', None, params, 'swap')
4127
+ productMap = {
4128
+ 'spot': 'SPOT',
4129
+ 'swap': 'DERIVATIVES',
4130
+ 'option': 'OPTIONS',
4131
+ }
4132
+ product = self.safe_string(productMap, type, type)
4133
+ request['product'] = product
4134
+ response = self.privatePostV5OrderDisconnectedCancelAll(self.extend(request, params))
4135
+ #
4136
+ # {
4137
+ # "retCode": 0,
4138
+ # "retMsg": "success"
4139
+ # }
4140
+ #
4141
+ return response
4142
+
4111
4143
  def cancel_orders_for_symbols(self, orders: List[CancellationRequest], params={}):
4112
4144
  """
4113
4145
  cancel multiple orders for multiple symbols
ccxt/exmo.py CHANGED
@@ -30,7 +30,7 @@ class exmo(Exchange, ImplicitAPI):
30
30
  'id': 'exmo',
31
31
  'name': 'EXMO',
32
32
  'countries': ['LT'], # Lithuania
33
- 'rateLimit': 350, # once every 350 ms ≈ 180 requests per minute ≈ 3 requests per second
33
+ 'rateLimit': 100, # 10 requests per 1 second
34
34
  'version': 'v1.1',
35
35
  'has': {
36
36
  'CORS': None,
ccxt/htx.py CHANGED
@@ -3746,10 +3746,10 @@ class htx(Exchange, ImplicitAPI):
3746
3746
  '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
3747
3747
  }
3748
3748
  response = None
3749
- stop = self.safe_value(params, 'stop')
3749
+ stop = self.safe_bool_2(params, 'stop', 'trigger')
3750
3750
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
3751
3751
  trailing = self.safe_bool(params, 'trailing', False)
3752
- params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing'])
3752
+ params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
3753
3753
  if stop or stopLossTakeProfit or trailing:
3754
3754
  if limit is not None:
3755
3755
  request['page_size'] = limit
@@ -4070,10 +4070,10 @@ class htx(Exchange, ImplicitAPI):
4070
4070
  if limit is not None:
4071
4071
  request['page_size'] = limit
4072
4072
  request['contract_code'] = market['id']
4073
- stop = self.safe_value(params, 'stop')
4073
+ stop = self.safe_bool_2(params, 'stop', 'trigger')
4074
4074
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
4075
4075
  trailing = self.safe_bool(params, 'trailing', False)
4076
- params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing'])
4076
+ params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
4077
4077
  if market['linear']:
4078
4078
  marginMode = None
4079
4079
  marginMode, params = self.handle_margin_mode_and_params('fetchOpenOrders', params)
@@ -5305,10 +5305,10 @@ class htx(Exchange, ImplicitAPI):
5305
5305
  request['symbol'] = market['settleId']
5306
5306
  else:
5307
5307
  request['contract_code'] = market['id']
5308
- stop = self.safe_value(params, 'stop')
5308
+ stop = self.safe_bool_2(params, 'stop', 'trigger')
5309
5309
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
5310
5310
  trailing = self.safe_bool(params, 'trailing', False)
5311
- params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing'])
5311
+ params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
5312
5312
  if market['linear']:
5313
5313
  marginMode = None
5314
5314
  marginMode, params = self.handle_margin_mode_and_params('cancelOrder', params)
@@ -5432,9 +5432,9 @@ class htx(Exchange, ImplicitAPI):
5432
5432
  request['symbol'] = market['settleId']
5433
5433
  else:
5434
5434
  request['contract_code'] = market['id']
5435
- stop = self.safe_value(params, 'stop')
5435
+ stop = self.safe_bool_2(params, 'stop', 'trigger')
5436
5436
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
5437
- params = self.omit(params, ['stop', 'stopLossTakeProfit'])
5437
+ params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trigger'])
5438
5438
  if market['linear']:
5439
5439
  marginMode = None
5440
5440
  marginMode, params = self.handle_margin_mode_and_params('cancelOrders', params)
@@ -5564,10 +5564,10 @@ class htx(Exchange, ImplicitAPI):
5564
5564
  if market['future']:
5565
5565
  request['symbol'] = market['settleId']
5566
5566
  request['contract_code'] = market['id']
5567
- stop = self.safe_value(params, 'stop')
5567
+ stop = self.safe_bool_2(params, 'stop', 'trigger')
5568
5568
  stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
5569
5569
  trailing = self.safe_bool(params, 'trailing', False)
5570
- params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing'])
5570
+ params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
5571
5571
  if market['linear']:
5572
5572
  marginMode = None
5573
5573
  marginMode, params = self.handle_margin_mode_and_params('cancelAllOrders', params)
ccxt/kucoin.py CHANGED
@@ -2396,9 +2396,9 @@ class kucoin(Exchange, ImplicitAPI):
2396
2396
  self.load_markets()
2397
2397
  lowercaseStatus = status.lower()
2398
2398
  until = self.safe_integer(params, 'until')
2399
- stop = self.safe_bool(params, 'stop', False)
2399
+ stop = self.safe_bool_2(params, 'stop', 'trigger', False)
2400
2400
  hf = self.safe_bool(params, 'hf', False)
2401
- params = self.omit(params, ['stop', 'hf', 'until'])
2401
+ params = self.omit(params, ['stop', 'hf', 'until', 'trigger'])
2402
2402
  marginMode, query = self.handle_margin_mode_and_params('fetchOrdersByStatus', params)
2403
2403
  if lowercaseStatus == 'open':
2404
2404
  lowercaseStatus = 'active'
@@ -2555,7 +2555,7 @@ class kucoin(Exchange, ImplicitAPI):
2555
2555
  self.load_markets()
2556
2556
  request: dict = {}
2557
2557
  clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
2558
- stop = self.safe_bool(params, 'stop', False)
2558
+ stop = self.safe_bool_2(params, 'stop', 'trigger', False)
2559
2559
  hf = self.safe_bool(params, 'hf', False)
2560
2560
  market = None
2561
2561
  if symbol is not None:
@@ -2564,7 +2564,7 @@ class kucoin(Exchange, ImplicitAPI):
2564
2564
  if symbol is None:
2565
2565
  raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol parameter for hf orders')
2566
2566
  request['symbol'] = market['id']
2567
- params = self.omit(params, ['stop', 'hf', 'clientOid', 'clientOrderId'])
2567
+ params = self.omit(params, ['stop', 'hf', 'clientOid', 'clientOrderId', 'trigger'])
2568
2568
  response = None
2569
2569
  if clientOrderId is not None:
2570
2570
  request['clientOid'] = clientOrderId
ccxt/kucoinfutures.py CHANGED
@@ -1688,7 +1688,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
1688
1688
  paginate, params = self.handle_option_and_params(params, 'fetchOrdersByStatus', 'paginate')
1689
1689
  if paginate:
1690
1690
  return self.fetch_paginated_call_dynamic('fetchOrdersByStatus', symbol, since, limit, params)
1691
- stop = self.safe_value_2(params, 'stop', 'trigger')
1691
+ stop = self.safe_bool_2(params, 'stop', 'trigger')
1692
1692
  until = self.safe_integer(params, 'until')
1693
1693
  params = self.omit(params, ['stop', 'until', 'trigger'])
1694
1694
  if status == 'closed':
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.49'
7
+ __version__ = '4.3.51'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
ccxt/pro/binance.py CHANGED
@@ -88,6 +88,7 @@ class binance(ccxt.async_support.binance):
88
88
  'papi': 'wss://fstream.binance.com/pm/ws',
89
89
  },
90
90
  },
91
+ 'doc': 'https://developers.binance.com/en',
91
92
  },
92
93
  'streaming': {
93
94
  'keepAlive': 180000,
@@ -194,8 +195,8 @@ class binance(ccxt.async_support.binance):
194
195
  async def watch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
195
196
  """
196
197
  watch the public liquidations of a trading pair
197
- :see: https://binance-docs.github.io/apidocs/futures/en/#liquidation-order-streams
198
- :see: https://binance-docs.github.io/apidocs/delivery/en/#liquidation-order-streams
198
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams
199
+ :see: https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Liquidation-Order-Streams
199
200
  :param str symbol: unified CCXT market symbol
200
201
  :param int [since]: the earliest time in ms to fetch liquidations for
201
202
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -207,8 +208,8 @@ class binance(ccxt.async_support.binance):
207
208
  async def watch_liquidations_for_symbols(self, symbols: List[str] = None, since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
208
209
  """
209
210
  watch the public liquidations of a trading pair
210
- :see: https://binance-docs.github.io/apidocs/futures/en/#all-market-liquidation-order-streams
211
- :see: https://binance-docs.github.io/apidocs/delivery/en/#all-market-liquidation-order-streams
211
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
212
+ :see: https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
212
213
  :param str symbol: unified CCXT market symbol
213
214
  :param int [since]: the earliest time in ms to fetch liquidations for
214
215
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -403,8 +404,8 @@ class binance(ccxt.async_support.binance):
403
404
  async def watch_my_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
404
405
  """
405
406
  watch the private liquidations of a trading pair
406
- :see: https://binance-docs.github.io/apidocs/futures/en/#event-order-update
407
- :see: https://binance-docs.github.io/apidocs/delivery/en/#event-order-update
407
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
408
+ :see: https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
408
409
  :param str symbol: unified CCXT market symbol
409
410
  :param int [since]: the earliest time in ms to fetch liquidations for
410
411
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -416,8 +417,8 @@ class binance(ccxt.async_support.binance):
416
417
  async def watch_my_liquidations_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
417
418
  """
418
419
  watch the private liquidations of a trading pair
419
- :see: https://binance-docs.github.io/apidocs/futures/en/#event-order-update
420
- :see: https://binance-docs.github.io/apidocs/delivery/en/#event-order-update
420
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
421
+ :see: https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
421
422
  :param str symbol: unified CCXT market symbol
422
423
  :param int [since]: the earliest time in ms to fetch liquidations for
423
424
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -611,7 +612,8 @@ class binance(ccxt.async_support.binance):
611
612
  async def fetch_order_book_ws(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
612
613
  """
613
614
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
614
- :see: https://binance-docs.github.io/apidocs/futures/en/#order-book-2
615
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#order-book
616
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book
615
617
  :param str symbol: unified symbol of the market to fetch the order book for
616
618
  :param int [limit]: the maximum amount of order book entries to return
617
619
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1204,7 +1206,6 @@ class binance(ccxt.async_support.binance):
1204
1206
  async def fetch_ticker_ws(self, symbol: str, params={}) -> Ticker:
1205
1207
  """
1206
1208
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1207
- :see: https://binance-docs.github.io/apidocs/voptions/en/#24hr-ticker-price-change-statistics
1208
1209
  :param str symbol: unified symbol of the market to fetch the ticker for
1209
1210
  :param dict [params]: extra parameters specific to the exchange API endpoint
1210
1211
  :param str [params.method]: method to use can be ticker.price or ticker.book
@@ -1241,8 +1242,8 @@ class binance(ccxt.async_support.binance):
1241
1242
 
1242
1243
  async def fetch_ohlcv_ws(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
1243
1244
  """
1244
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#klines
1245
1245
  query historical candlestick data containing the open, high, low, and close price, and the volume of a market
1246
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#klines
1246
1247
  :param str symbol: unified symbol of the market to query OHLCV data for
1247
1248
  :param str timeframe: the length of time each candle represents
1248
1249
  :param int since: timestamp in ms of the earliest candle to fetch
@@ -1356,10 +1357,10 @@ class binance(ccxt.async_support.binance):
1356
1357
 
1357
1358
  async def watch_bids_asks(self, symbols: Strings = None, params={}) -> Tickers:
1358
1359
  """
1359
- :see: https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-book-ticker-streams
1360
- :see: https://binance-docs.github.io/apidocs/futures/en/#all-book-tickers-stream
1361
- :see: https://binance-docs.github.io/apidocs/delivery/en/#all-book-tickers-stream
1362
1360
  watches best bid & ask for symbols
1361
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#symbol-order-book-ticker
1362
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
1363
+ :see: https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
1363
1364
  :param str[] symbols: unified symbol of the market to fetch the ticker for
1364
1365
  :param dict [params]: extra parameters specific to the exchange API endpoint
1365
1366
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -1812,9 +1813,8 @@ class binance(ccxt.async_support.binance):
1812
1813
  async def fetch_balance_ws(self, params={}) -> Balances:
1813
1814
  """
1814
1815
  fetch balance and get the amount of funds available for trading or funds locked in orders
1815
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#account-information-user_data
1816
- :see: https://binance-docs.github.io/apidocs/futures/en/#account-information-user_data
1817
- :see: https://binance-docs.github.io/apidocs/futures/en/#futures-account-balance-user_data
1816
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance
1817
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-information-user_data
1818
1818
  :param dict [params]: extra parameters specific to the exchange API endpoint
1819
1819
  :param str|None [params.type]: 'future', 'delivery', 'savings', 'funding', or 'spot'
1820
1820
  :param str|None [params.marginMode]: 'cross' or 'isolated', for margin trading, uses self.options.defaultMarginMode if not passed, defaults to None/None/None
@@ -1909,7 +1909,7 @@ class binance(ccxt.async_support.binance):
1909
1909
 
1910
1910
  async def fetch_position_ws(self, symbol: str, params={}) -> List[Position]:
1911
1911
  """
1912
- :see: https://binance-docs.github.io/apidocs/futures/en/#position-information-user_data
1912
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
1913
1913
  fetch data on an open position
1914
1914
  :param str symbol: unified market symbol of the market the position is held in
1915
1915
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1920,7 +1920,7 @@ class binance(ccxt.async_support.binance):
1920
1920
  async def fetch_positions_ws(self, symbols: Strings = None, params={}) -> List[Position]:
1921
1921
  """
1922
1922
  fetch all open positions
1923
- :see: https://binance-docs.github.io/apidocs/futures/en/#position-information-user_data
1923
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
1924
1924
  :param str[] [symbols]: list of unified market symbols
1925
1925
  :param dict [params]: extra parameters specific to the exchange API endpoint
1926
1926
  :param boolean [params.returnRateLimits]: set to True to return rate limit informations, defaults to False.
@@ -2138,9 +2138,9 @@ class binance(ccxt.async_support.binance):
2138
2138
 
2139
2139
  async def create_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}) -> Order:
2140
2140
  """
2141
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#place-new-order-trade
2142
- :see: https://binance-docs.github.io/apidocs/futures/en/#new-order-trade-2
2143
2141
  create a trade order
2142
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#place-new-order-trade
2143
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Order
2144
2144
  :param str symbol: unified symbol of the market to create an order in
2145
2145
  :param str type: 'market' or 'limit'
2146
2146
  :param str side: 'buy' or 'sell'
@@ -2281,8 +2281,8 @@ class binance(ccxt.async_support.binance):
2281
2281
  async def edit_order_ws(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}) -> Order:
2282
2282
  """
2283
2283
  edit a trade order
2284
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#cancel-and-replace-order-trade
2285
- :see: https://binance-docs.github.io/apidocs/futures/en/#modify-order-trade-2
2284
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-and-replace-order-trade
2285
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order
2286
2286
  :param str id: order id
2287
2287
  :param str symbol: unified symbol of the market to create an order in
2288
2288
  :param str type: 'market' or 'limit'
@@ -2429,9 +2429,9 @@ class binance(ccxt.async_support.binance):
2429
2429
 
2430
2430
  async def cancel_order_ws(self, id: str, symbol: Str = None, params={}) -> Order:
2431
2431
  """
2432
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#cancel-order-trade
2433
- :see: https://binance-docs.github.io/apidocs/futures/en/#cancel-order-trade-2
2434
2432
  cancel multiple orders
2433
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-order-trade
2434
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order
2435
2435
  :param str id: order id
2436
2436
  :param str symbol: unified market symbol, default is None
2437
2437
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2470,8 +2470,8 @@ class binance(ccxt.async_support.binance):
2470
2470
 
2471
2471
  async def cancel_all_orders_ws(self, symbol: Str = None, params={}):
2472
2472
  """
2473
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#current-open-orders-user_data
2474
2473
  cancel all open orders in a market
2474
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-open-orders-trade
2475
2475
  :param str symbol: unified market symbol of the market to cancel orders in
2476
2476
  :param dict [params]: extra parameters specific to the exchange API endpoint
2477
2477
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2502,9 +2502,9 @@ class binance(ccxt.async_support.binance):
2502
2502
 
2503
2503
  async def fetch_order_ws(self, id: str, symbol: Str = None, params={}) -> Order:
2504
2504
  """
2505
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#query-order-user_data
2506
- :see: https://binance-docs.github.io/apidocs/futures/en/#query-order-user_data-2
2507
2505
  fetches information on an order made by the user
2506
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-user_data
2507
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order
2508
2508
  :param str symbol: unified symbol of the market the order was made in
2509
2509
  :param dict params: extra parameters specific to the exchange API endpoint
2510
2510
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2542,8 +2542,8 @@ class binance(ccxt.async_support.binance):
2542
2542
 
2543
2543
  async def fetch_orders_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2544
2544
  """
2545
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#account-order-history-user_data
2546
2545
  fetches information on multiple orders made by the user
2546
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
2547
2547
  :param str symbol: unified market symbol of the market orders were made in
2548
2548
  :param int|None [since]: the earliest time in ms to fetch orders for
2549
2549
  :param int|None [limit]: the maximum number of order structures to retrieve
@@ -2583,8 +2583,8 @@ class binance(ccxt.async_support.binance):
2583
2583
 
2584
2584
  async def fetch_closed_orders_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2585
2585
  """
2586
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#account-order-history-user_data
2587
2586
  fetch closed orders
2587
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
2588
2588
  :param str symbol: unified market symbol
2589
2589
  :param int [since]: the earliest time in ms to fetch open orders for
2590
2590
  :param int [limit]: the maximum number of open orders structures to retrieve
@@ -2601,8 +2601,8 @@ class binance(ccxt.async_support.binance):
2601
2601
 
2602
2602
  async def fetch_open_orders_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2603
2603
  """
2604
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#current-open-orders-user_data
2605
2604
  fetch all unfilled currently open orders
2605
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#current-open-orders-user_data
2606
2606
  :param str symbol: unified market symbol
2607
2607
  :param int|None [since]: the earliest time in ms to fetch open orders for
2608
2608
  :param int|None [limit]: the maximum number of open orders structures to retrieve
@@ -2638,9 +2638,9 @@ class binance(ccxt.async_support.binance):
2638
2638
  async def watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2639
2639
  """
2640
2640
  watches information on multiple orders made by the user
2641
- :see: https://binance-docs.github.io/apidocs/spot/en/#payload-order-update
2642
- :see: https://binance-docs.github.io/apidocs/pm/en/#event-futures-order-update
2643
- :see: https://binance-docs.github.io/apidocs/pm/en/#event-margin-order-update
2641
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/user-data-stream#order-update
2642
+ :see: https://developers.binance.com/docs/margin_trading/trade-data-stream/Event-Order-Update
2643
+ :see: https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
2644
2644
  :param str symbol: unified market symbol of the market the orders were made in
2645
2645
  :param int [since]: the earliest time in ms to fetch orders for
2646
2646
  :param int [limit]: the maximum number of order structures to retrieve
@@ -3117,8 +3117,8 @@ class binance(ccxt.async_support.binance):
3117
3117
 
3118
3118
  async def fetch_my_trades_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
3119
3119
  """
3120
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#account-trade-history-user_data
3121
3120
  fetch all trades made by the user
3121
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-trade-history-user_data
3122
3122
  :param str symbol: unified market symbol
3123
3123
  :param int|None [since]: the earliest time in ms to fetch trades for
3124
3124
  :param int|None [limit]: the maximum number of trades structures to retrieve
@@ -3163,8 +3163,8 @@ class binance(ccxt.async_support.binance):
3163
3163
 
3164
3164
  async def fetch_trades_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
3165
3165
  """
3166
- :see: https://binance-docs.github.io/apidocs/websocket_api/en/#recent-trades
3167
3166
  fetch all trades made by the user
3167
+ :see: https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#recent-trades
3168
3168
  :param str symbol: unified market symbol
3169
3169
  :param int [since]: the earliest time in ms to fetch trades for
3170
3170
  :param int [limit]: the maximum number of trades structures to retrieve, default=500, max=1000
ccxt/pro/binancecoinm.py CHANGED
@@ -20,6 +20,7 @@ class binancecoinm(binance):
20
20
  'name': 'Binance COIN-M',
21
21
  'urls': {
22
22
  'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
23
+ 'doc': 'https://developers.binance.com/en',
23
24
  },
24
25
  'options': {
25
26
  'fetchMarkets': ['inverse'],
ccxt/pro/binanceusdm.py CHANGED
@@ -15,12 +15,14 @@ class binanceusdm(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, # {"code":-5021,"msg":"Due to the order could not be filled immediately, the FOK order has been rejected."}
ccxt/pro/gate.py CHANGED
@@ -227,8 +227,8 @@ class gate(ccxt.async_support.gate):
227
227
  """
228
228
  await self.load_markets()
229
229
  market = None if (symbol is None) else self.market(symbol)
230
- stop = self.safe_value_2(params, 'is_stop_order', 'stop', False)
231
- params = self.omit(params, ['is_stop_order', 'stop'])
230
+ stop = self.safe_value_n(params, ['is_stop_order', 'stop', 'trigger'], False)
231
+ params = self.omit(params, ['is_stop_order', 'stop', 'trigger'])
232
232
  type, query = self.handle_market_type_and_params('cancelOrder', market, params)
233
233
  request, requestParams = self.spotOrderPrepareRequest(market, stop, query) if (type == 'spot' or type == 'margin') else self.prepareRequest(market, type, query)
234
234
  messageType = self.get_type_by_market(market)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.3.49
3
+ Version: 4.3.51
4
4
  Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
5
5
  Home-page: https://ccxt.com
6
6
  Author: Igor Kroitor
@@ -84,7 +84,7 @@ Current feature list:
84
84
 
85
85
  | logo | id | name | ver | type | certified | pro | discount |
86
86
  |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------:|------|-----------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
87
- | [![binance](https://user-images.githubusercontent.com/1294454/29604020-d5483cdc-87ee-11e7-94c7-d1a8d9169293.jpg)](https://accounts.binance.com/en/register?ref=D7YA7CLY) | binance | [Binance](https://accounts.binance.com/en/register?ref=D7YA7CLY) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://binance-docs.github.io/apidocs/spot/en) | cex | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with Binance using CCXT's referral link for a 10% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d10%25&color=orange)](https://accounts.binance.com/en/register?ref=D7YA7CLY) |
87
+ | [![binance](https://user-images.githubusercontent.com/1294454/29604020-d5483cdc-87ee-11e7-94c7-d1a8d9169293.jpg)](https://accounts.binance.com/en/register?ref=D7YA7CLY) | binance | [Binance](https://accounts.binance.com/en/register?ref=D7YA7CLY) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://developers.binance.com/en) | cex | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with Binance using CCXT's referral link for a 10% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d10%25&color=orange)](https://accounts.binance.com/en/register?ref=D7YA7CLY) |
88
88
  | [![binancecoinm](https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg)](https://accounts.binance.com/en/register?ref=D7YA7CLY) | binancecoinm | [Binance COIN-M](https://accounts.binance.com/en/register?ref=D7YA7CLY) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://binance-docs.github.io/apidocs/delivery/en/) | cex | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with Binance COIN-M using CCXT's referral link for a 10% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d10%25&color=orange)](https://accounts.binance.com/en/register?ref=D7YA7CLY) |
89
89
  | [![binanceusdm](https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg)](https://accounts.binance.com/en/register?ref=D7YA7CLY) | binanceusdm | [Binance USDⓈ-M](https://accounts.binance.com/en/register?ref=D7YA7CLY) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://binance-docs.github.io/apidocs/futures/en/) | cex | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with Binance USDⓈ-M using CCXT's referral link for a 10% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d10%25&color=orange)](https://accounts.binance.com/en/register?ref=D7YA7CLY) |
90
90
  | [![bingx](https://github-production-user-asset-6210df.s3.amazonaws.com/1294454/253675376-6983b72e-4999-4549-b177-33b374c195e3.jpg)](https://bingx.com/invite/OHETOM) | bingx | [BingX](https://bingx.com/invite/OHETOM) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://bingx-api.github.io/docs/) | cex | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | |
@@ -116,7 +116,7 @@ The CCXT library currently supports the following 100 cryptocurrency exchange ma
116
116
  | [![ascendex](https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg)](https://ascendex.com/en-us/register?inviteCode=EL6BXBQM) | ascendex | [AscendEX](https://ascendex.com/en-us/register?inviteCode=EL6BXBQM) | [![API Version 2](https://img.shields.io/badge/2-lightgray)](https://ascendex.github.io/ascendex-pro-api/#ascendex-pro-api-documentation) | cex | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
117
117
  | [![bequant](https://user-images.githubusercontent.com/1294454/55248342-a75dfe00-525a-11e9-8aa2-05e9dca943c6.jpg)](https://bequant.io/referral/dd104e3bee7634ec) | bequant | [Bequant](https://bequant.io/referral/dd104e3bee7634ec) | [![API Version 3](https://img.shields.io/badge/3-lightgray)](https://api.bequant.io/) | cex | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
118
118
  | [![bigone](https://user-images.githubusercontent.com/1294454/69354403-1d532180-0c91-11ea-88ed-44c06cefdf87.jpg)](https://b1.run/users/new?code=D3LLBVFT) | bigone | [BigONE](https://b1.run/users/new?code=D3LLBVFT) | [![API Version 3](https://img.shields.io/badge/3-lightgray)](https://open.big.one/docs/api.html) | cex | | |
119
- | [![binance](https://user-images.githubusercontent.com/1294454/29604020-d5483cdc-87ee-11e7-94c7-d1a8d9169293.jpg)](https://accounts.binance.com/en/register?ref=D7YA7CLY) | binance | [Binance](https://accounts.binance.com/en/register?ref=D7YA7CLY) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://binance-docs.github.io/apidocs/spot/en) | cex | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
119
+ | [![binance](https://user-images.githubusercontent.com/1294454/29604020-d5483cdc-87ee-11e7-94c7-d1a8d9169293.jpg)](https://accounts.binance.com/en/register?ref=D7YA7CLY) | binance | [Binance](https://accounts.binance.com/en/register?ref=D7YA7CLY) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://developers.binance.com/en) | cex | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
120
120
  | [![binancecoinm](https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg)](https://accounts.binance.com/en/register?ref=D7YA7CLY) | binancecoinm | [Binance COIN-M](https://accounts.binance.com/en/register?ref=D7YA7CLY) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://binance-docs.github.io/apidocs/delivery/en/) | cex | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
121
121
  | [![binanceus](https://user-images.githubusercontent.com/1294454/65177307-217b7c80-da5f-11e9-876e-0b748ba0a358.jpg)](https://www.binance.us/?ref=35005074) | binanceus | [Binance US](https://www.binance.us/?ref=35005074) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://github.com/binance-us/binance-official-api-docs) | cex | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
122
122
  | [![binanceusdm](https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg)](https://accounts.binance.com/en/register?ref=D7YA7CLY) | binanceusdm | [Binance USDⓈ-M](https://accounts.binance.com/en/register?ref=D7YA7CLY) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://binance-docs.github.io/apidocs/futures/en/) | cex | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
@@ -268,13 +268,13 @@ console.log(version, Object.keys(exchanges));
268
268
 
269
269
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
270
270
 
271
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.49/dist/ccxt.browser.min.js
272
- * unpkg: https://unpkg.com/ccxt@4.3.49/dist/ccxt.browser.min.js
271
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.51/dist/ccxt.browser.min.js
272
+ * unpkg: https://unpkg.com/ccxt@4.3.51/dist/ccxt.browser.min.js
273
273
 
274
274
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
275
275
 
276
276
  ```HTML
277
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.49/dist/ccxt.browser.min.js"></script>
277
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.51/dist/ccxt.browser.min.js"></script>
278
278
  ```
279
279
 
280
280
  Creates a global `ccxt` object: