ccxt 4.3.50__py2.py3-none-any.whl → 4.3.52__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/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
@@ -4806,9 +4838,14 @@ class bybit(Exchange, ImplicitAPI):
4806
4838
  :param str [params.baseCoin]: Base coin. Supports linear, inverse & option
4807
4839
  :param str [params.settleCoin]: Settle coin. Supports linear, inverse & option
4808
4840
  :param str [params.orderFilter]: 'Order' or 'StopOrder' or 'tpslOrder'
4841
+ :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
4809
4842
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
4810
4843
  """
4811
4844
  self.load_markets()
4845
+ paginate = False
4846
+ paginate, params = self.handle_option_and_params(params, 'fetchOpenOrders', 'paginate')
4847
+ if paginate:
4848
+ return self.fetch_paginated_call_cursor('fetchOpenOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
4812
4849
  enableUnifiedMargin, enableUnifiedAccount = self.is_unified_enabled()
4813
4850
  isUnifiedAccount = (enableUnifiedMargin or enableUnifiedAccount)
4814
4851
  request: dict = {}
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/krakenfutures.py CHANGED
@@ -96,6 +96,7 @@ class krakenfutures(Exchange, ImplicitAPI):
96
96
  'public': 'https://demo-futures.kraken.com/derivatives/api/',
97
97
  'private': 'https://demo-futures.kraken.com/derivatives/api/',
98
98
  'charts': 'https://demo-futures.kraken.com/api/charts/',
99
+ 'history': 'https://demo-futures.kraken.com/api/history/',
99
100
  'www': 'https://demo-futures.kraken.com',
100
101
  },
101
102
  'logo': 'https://user-images.githubusercontent.com/24300605/81436764-b22fd580-9172-11ea-9703-742783e6376d.jpg',
ccxt/okx.py CHANGED
@@ -455,6 +455,7 @@ class okx(Exchange, ImplicitAPI):
455
455
  'sprd/cancel-order': 1,
456
456
  'sprd/mass-cancel': 1,
457
457
  'sprd/amend-order': 1,
458
+ 'sprd/cancel-all-after': 10,
458
459
  # trade
459
460
  'trade/order': 1 / 3,
460
461
  'trade/batch-orders': 1 / 15,
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.50'
7
+ __version__ = '4.3.52'
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/okx.py CHANGED
@@ -109,7 +109,7 @@ class okx(ccxt.async_support.okx):
109
109
  # okex does not support built-in ws protocol-level ping-pong
110
110
  # instead it requires a custom text-based ping-pong
111
111
  'ping': self.ping,
112
- 'keepAlive': 20000,
112
+ 'keepAlive': 18000,
113
113
  },
114
114
  })
115
115
 
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright © 2024 Igor Kroitor
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.3.50
3
+ Version: 4.3.52
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
@@ -33,19 +33,20 @@ Classifier: Programming Language :: PHP
33
33
  Classifier: Operating System :: OS Independent
34
34
  Classifier: Environment :: Console
35
35
  Description-Content-Type: text/markdown
36
- Requires-Dist: setuptools >=60.9.0
37
- Requires-Dist: certifi >=2018.1.18
38
- Requires-Dist: requests >=2.18.4
39
- Requires-Dist: cryptography >=2.6.1
40
- Requires-Dist: typing-extensions >=4.4.0
41
- Requires-Dist: aiohttp >=3.8 ; python_version>="3.5.2"
42
- Requires-Dist: aiodns >=1.1.1 ; python_version>="3.5.2"
43
- Requires-Dist: yarl >=1.7.2 ; python_version>="3.5.2"
36
+ License-File: LICENSE.txt
37
+ Requires-Dist: setuptools (>=60.9.0)
38
+ Requires-Dist: certifi (>=2018.1.18)
39
+ Requires-Dist: requests (>=2.18.4)
40
+ Requires-Dist: cryptography (>=2.6.1)
41
+ Requires-Dist: typing-extensions (>=4.4.0)
42
+ Requires-Dist: aiohttp (>=3.8) ; python_version>="3.5.2"
43
+ Requires-Dist: aiodns (>=1.1.1) ; python_version>="3.5.2"
44
+ Requires-Dist: yarl (>=1.7.2) ; python_version>="3.5.2"
44
45
  Provides-Extra: qa
45
- Requires-Dist: ruff ==0.0.292 ; extra == 'qa'
46
- Requires-Dist: tox >=4.8.0 ; extra == 'qa'
46
+ Requires-Dist: ruff (==0.0.292) ; extra == 'qa'
47
+ Requires-Dist: tox (>=4.8.0) ; extra == 'qa'
47
48
  Provides-Extra: type
48
- Requires-Dist: mypy ==1.6.1 ; extra == 'type'
49
+ Requires-Dist: mypy (==1.6.1) ; extra == 'type'
49
50
 
50
51
  # CCXT – CryptoCurrency eXchange Trading Library
51
52
 
@@ -84,7 +85,7 @@ Current feature list:
84
85
 
85
86
  | logo | id | name | ver | type | certified | pro | discount |
86
87
  |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------:|------|-----------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
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) |
88
+ | [![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
89
  | [![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
90
  | [![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
91
  | [![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 +117,7 @@ The CCXT library currently supports the following 100 cryptocurrency exchange ma
116
117
  | [![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
118
  | [![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
119
  | [![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) |
120
+ | [![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
121
  | [![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
122
  | [![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
123
  | [![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 +269,13 @@ console.log(version, Object.keys(exchanges));
268
269
 
269
270
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
270
271
 
271
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.50/dist/ccxt.browser.min.js
272
- * unpkg: https://unpkg.com/ccxt@4.3.50/dist/ccxt.browser.min.js
272
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.52/dist/ccxt.browser.min.js
273
+ * unpkg: https://unpkg.com/ccxt@4.3.52/dist/ccxt.browser.min.js
273
274
 
274
275
  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
276
 
276
277
  ```HTML
277
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.50/dist/ccxt.browser.min.js"></script>
278
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.52/dist/ccxt.browser.min.js"></script>
278
279
  ```
279
280
 
280
281
  Creates a global `ccxt` object: