ccxt 4.3.5__py2.py3-none-any.whl → 4.3.7__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (189) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/abstract/bingx.py +1 -0
  7. ccxt/abstract/coinbase.py +5 -0
  8. ccxt/abstract/woo.py +1 -0
  9. ccxt/ace.py +5 -0
  10. ccxt/alpaca.py +6 -0
  11. ccxt/ascendex.py +2 -2
  12. ccxt/async_support/__init__.py +1 -1
  13. ccxt/async_support/ace.py +5 -0
  14. ccxt/async_support/alpaca.py +6 -0
  15. ccxt/async_support/ascendex.py +2 -2
  16. ccxt/async_support/base/exchange.py +30 -1
  17. ccxt/async_support/bigone.py +1 -1
  18. ccxt/async_support/binance.py +7 -3
  19. ccxt/async_support/bingx.py +43 -1
  20. ccxt/async_support/bitbank.py +4 -1
  21. ccxt/async_support/bitfinex.py +1 -1
  22. ccxt/async_support/bitfinex2.py +1 -1
  23. ccxt/async_support/bitflyer.py +1 -1
  24. ccxt/async_support/bitget.py +70 -4
  25. ccxt/async_support/bithumb.py +5 -1
  26. ccxt/async_support/bitmart.py +1 -1
  27. ccxt/async_support/bitmex.py +25 -1
  28. ccxt/async_support/bitopro.py +6 -1
  29. ccxt/async_support/bitrue.py +1 -1
  30. ccxt/async_support/bitso.py +4 -1
  31. ccxt/async_support/bitstamp.py +4 -1
  32. ccxt/async_support/bitteam.py +4 -0
  33. ccxt/async_support/bitvavo.py +4 -1
  34. ccxt/async_support/bl3p.py +3 -0
  35. ccxt/async_support/blockchaincom.py +1 -1
  36. ccxt/async_support/btcalpha.py +3 -0
  37. ccxt/async_support/btcbox.py +3 -0
  38. ccxt/async_support/btcmarkets.py +4 -1
  39. ccxt/async_support/btcturk.py +3 -0
  40. ccxt/async_support/bybit.py +196 -14
  41. ccxt/async_support/cex.py +6 -0
  42. ccxt/async_support/coinbase.py +98 -22
  43. ccxt/async_support/coinbaseinternational.py +3 -1
  44. ccxt/async_support/coinbasepro.py +7 -1
  45. ccxt/async_support/coincheck.py +3 -0
  46. ccxt/async_support/coinex.py +180 -79
  47. ccxt/async_support/coinlist.py +5 -1
  48. ccxt/async_support/coinmate.py +4 -1
  49. ccxt/async_support/coinone.py +3 -0
  50. ccxt/async_support/coinsph.py +5 -1
  51. ccxt/async_support/coinspot.py +3 -0
  52. ccxt/async_support/cryptocom.py +33 -2
  53. ccxt/async_support/delta.py +2 -2
  54. ccxt/async_support/deribit.py +1 -1
  55. ccxt/async_support/digifinex.py +3 -3
  56. ccxt/async_support/exmo.py +8 -3
  57. ccxt/async_support/gate.py +112 -24
  58. ccxt/async_support/gemini.py +1 -1
  59. ccxt/async_support/hitbtc.py +7 -6
  60. ccxt/async_support/hollaex.py +1 -1
  61. ccxt/async_support/htx.py +29 -1
  62. ccxt/async_support/huobijp.py +1 -1
  63. ccxt/async_support/hyperliquid.py +39 -2
  64. ccxt/async_support/idex.py +4 -1
  65. ccxt/async_support/independentreserve.py +3 -0
  66. ccxt/async_support/indodax.py +4 -1
  67. ccxt/async_support/kraken.py +28 -1
  68. ccxt/async_support/krakenfutures.py +26 -0
  69. ccxt/async_support/kucoin.py +3 -1
  70. ccxt/async_support/kucoinfutures.py +5 -3
  71. ccxt/async_support/kuna.py +1 -1
  72. ccxt/async_support/latoken.py +6 -0
  73. ccxt/async_support/lbank.py +1 -1
  74. ccxt/async_support/luno.py +3 -0
  75. ccxt/async_support/lykke.py +6 -1
  76. ccxt/async_support/mercado.py +4 -1
  77. ccxt/async_support/mexc.py +110 -4
  78. ccxt/async_support/ndax.py +5 -1
  79. ccxt/async_support/novadax.py +5 -1
  80. ccxt/async_support/okcoin.py +1 -1
  81. ccxt/async_support/okx.py +183 -4
  82. ccxt/async_support/onetrading.py +4 -1
  83. ccxt/async_support/p2b.py +3 -0
  84. ccxt/async_support/phemex.py +1 -1
  85. ccxt/async_support/poloniex.py +1 -1
  86. ccxt/async_support/probit.py +4 -1
  87. ccxt/async_support/timex.py +3 -0
  88. ccxt/async_support/tokocrypto.py +1 -1
  89. ccxt/async_support/tradeogre.py +3 -0
  90. ccxt/async_support/upbit.py +1 -1
  91. ccxt/async_support/wavesexchange.py +4 -1
  92. ccxt/async_support/wazirx.py +3 -0
  93. ccxt/async_support/whitebit.py +38 -1
  94. ccxt/async_support/woo.py +30 -1
  95. ccxt/async_support/yobit.py +4 -1
  96. ccxt/async_support/zaif.py +1 -1
  97. ccxt/async_support/zonda.py +1 -1
  98. ccxt/base/exchange.py +30 -1
  99. ccxt/bigone.py +1 -1
  100. ccxt/binance.py +7 -3
  101. ccxt/bingx.py +43 -1
  102. ccxt/bitbank.py +4 -1
  103. ccxt/bitfinex.py +1 -1
  104. ccxt/bitfinex2.py +1 -1
  105. ccxt/bitflyer.py +1 -1
  106. ccxt/bitget.py +70 -4
  107. ccxt/bithumb.py +5 -1
  108. ccxt/bitmart.py +1 -1
  109. ccxt/bitmex.py +25 -1
  110. ccxt/bitopro.py +6 -1
  111. ccxt/bitrue.py +1 -1
  112. ccxt/bitso.py +4 -1
  113. ccxt/bitstamp.py +4 -1
  114. ccxt/bitteam.py +4 -0
  115. ccxt/bitvavo.py +4 -1
  116. ccxt/bl3p.py +3 -0
  117. ccxt/blockchaincom.py +1 -1
  118. ccxt/btcalpha.py +3 -0
  119. ccxt/btcbox.py +3 -0
  120. ccxt/btcmarkets.py +4 -1
  121. ccxt/btcturk.py +3 -0
  122. ccxt/bybit.py +196 -14
  123. ccxt/cex.py +6 -0
  124. ccxt/coinbase.py +98 -22
  125. ccxt/coinbaseinternational.py +3 -1
  126. ccxt/coinbasepro.py +7 -1
  127. ccxt/coincheck.py +3 -0
  128. ccxt/coinex.py +180 -79
  129. ccxt/coinlist.py +5 -1
  130. ccxt/coinmate.py +4 -1
  131. ccxt/coinone.py +3 -0
  132. ccxt/coinsph.py +5 -1
  133. ccxt/coinspot.py +3 -0
  134. ccxt/cryptocom.py +33 -2
  135. ccxt/delta.py +2 -2
  136. ccxt/deribit.py +1 -1
  137. ccxt/digifinex.py +3 -3
  138. ccxt/exmo.py +8 -3
  139. ccxt/gate.py +112 -24
  140. ccxt/gemini.py +1 -1
  141. ccxt/hitbtc.py +7 -6
  142. ccxt/hollaex.py +1 -1
  143. ccxt/htx.py +29 -1
  144. ccxt/huobijp.py +1 -1
  145. ccxt/hyperliquid.py +39 -2
  146. ccxt/idex.py +4 -1
  147. ccxt/independentreserve.py +3 -0
  148. ccxt/indodax.py +4 -1
  149. ccxt/kraken.py +28 -1
  150. ccxt/krakenfutures.py +26 -0
  151. ccxt/kucoin.py +3 -1
  152. ccxt/kucoinfutures.py +5 -3
  153. ccxt/kuna.py +1 -1
  154. ccxt/latoken.py +6 -0
  155. ccxt/lbank.py +1 -1
  156. ccxt/luno.py +3 -0
  157. ccxt/lykke.py +6 -1
  158. ccxt/mercado.py +4 -1
  159. ccxt/mexc.py +110 -4
  160. ccxt/ndax.py +5 -1
  161. ccxt/novadax.py +5 -1
  162. ccxt/okcoin.py +1 -1
  163. ccxt/okx.py +183 -4
  164. ccxt/onetrading.py +4 -1
  165. ccxt/p2b.py +3 -0
  166. ccxt/phemex.py +1 -1
  167. ccxt/poloniex.py +1 -1
  168. ccxt/pro/__init__.py +1 -1
  169. ccxt/pro/bitget.py +1 -1
  170. ccxt/pro/bybit.py +1 -1
  171. ccxt/pro/coinbase.py +28 -28
  172. ccxt/probit.py +4 -1
  173. ccxt/test/test_async.py +2 -0
  174. ccxt/test/test_sync.py +2 -0
  175. ccxt/timex.py +3 -0
  176. ccxt/tokocrypto.py +1 -1
  177. ccxt/tradeogre.py +3 -0
  178. ccxt/upbit.py +1 -1
  179. ccxt/wavesexchange.py +4 -1
  180. ccxt/wazirx.py +3 -0
  181. ccxt/whitebit.py +38 -1
  182. ccxt/woo.py +30 -1
  183. ccxt/yobit.py +4 -1
  184. ccxt/zaif.py +1 -1
  185. ccxt/zonda.py +1 -1
  186. {ccxt-4.3.5.dist-info → ccxt-4.3.7.dist-info}/METADATA +4 -4
  187. {ccxt-4.3.5.dist-info → ccxt-4.3.7.dist-info}/RECORD +189 -189
  188. {ccxt-4.3.5.dist-info → ccxt-4.3.7.dist-info}/WHEEL +0 -0
  189. {ccxt-4.3.5.dist-info → ccxt-4.3.7.dist-info}/top_level.txt +0 -0
ccxt/pro/coinbase.py CHANGED
@@ -52,7 +52,7 @@ class coinbase(ccxt.async_support.coinbase):
52
52
  },
53
53
  })
54
54
 
55
- async def subscribe(self, name, symbol=None, params={}):
55
+ async def subscribe(self, name: str, isPrivate: bool, symbol=None, params={}):
56
56
  """
57
57
  * @ignore
58
58
  subscribes to a websocket channel
@@ -63,7 +63,6 @@ class coinbase(ccxt.async_support.coinbase):
63
63
  :returns dict: subscription to a websocket channel
64
64
  """
65
65
  await self.load_markets()
66
- self.check_required_credentials()
67
66
  market = None
68
67
  messageHash = name
69
68
  productIds = []
@@ -78,8 +77,6 @@ class coinbase(ccxt.async_support.coinbase):
78
77
  productIds = [market['id']]
79
78
  url = self.urls['api']['ws']
80
79
  timestamp = self.number_to_string(self.seconds())
81
- isCloudAPiKey = (self.apiKey.find('organizations/') >= 0) or (self.secret.startswith('-----BEGIN'))
82
- auth = timestamp + name + ','.join(productIds)
83
80
  subscribe = {
84
81
  'type': 'subscribe',
85
82
  'product_ids': productIds,
@@ -88,22 +85,26 @@ class coinbase(ccxt.async_support.coinbase):
88
85
  # 'timestamp': timestamp,
89
86
  # 'signature': self.hmac(self.encode(auth), self.encode(self.secret), hashlib.sha256),
90
87
  }
91
- if not isCloudAPiKey:
92
- subscribe['api_key'] = self.apiKey
93
- subscribe['timestamp'] = timestamp
94
- subscribe['signature'] = self.hmac(self.encode(auth), self.encode(self.secret), hashlib.sha256)
95
- else:
96
- if self.apiKey.startswith('-----BEGIN'):
97
- raise ArgumentsRequired(self.id + ' apiKey should contain the name(eg: organizations/3b910e93....) and not the public key')
98
- currentToken = self.safe_string(self.options, 'wsToken')
99
- tokenTimestamp = self.safe_integer(self.options, 'wsTokenTimestamp', 0)
100
- seconds = self.seconds()
101
- if currentToken is None or tokenTimestamp + 120 < seconds:
102
- # we should generate new token
103
- token = self.create_auth_token(seconds)
104
- self.options['wsToken'] = token
105
- self.options['wsTokenTimestamp'] = seconds
106
- subscribe['jwt'] = self.safe_string(self.options, 'wsToken')
88
+ if isPrivate:
89
+ self.check_required_credentials()
90
+ isCloudAPiKey = (self.apiKey.find('organizations/') >= 0) or (self.secret.startswith('-----BEGIN'))
91
+ auth = timestamp + name + ','.join(productIds)
92
+ if not isCloudAPiKey:
93
+ subscribe['api_key'] = self.apiKey
94
+ subscribe['timestamp'] = timestamp
95
+ subscribe['signature'] = self.hmac(self.encode(auth), self.encode(self.secret), hashlib.sha256)
96
+ else:
97
+ if self.apiKey.startswith('-----BEGIN'):
98
+ raise ArgumentsRequired(self.id + ' apiKey should contain the name(eg: organizations/3b910e93....) and not the public key')
99
+ currentToken = self.safe_string(self.options, 'wsToken')
100
+ tokenTimestamp = self.safe_integer(self.options, 'wsTokenTimestamp', 0)
101
+ seconds = self.seconds()
102
+ if currentToken is None or tokenTimestamp + 120 < seconds:
103
+ # we should generate new token
104
+ token = self.create_auth_token(seconds)
105
+ self.options['wsToken'] = token
106
+ self.options['wsTokenTimestamp'] = seconds
107
+ subscribe['jwt'] = self.safe_string(self.options, 'wsToken')
107
108
  return await self.watch(url, messageHash, subscribe, messageHash)
108
109
 
109
110
  async def watch_ticker(self, symbol: str, params={}) -> Ticker:
@@ -115,7 +116,7 @@ class coinbase(ccxt.async_support.coinbase):
115
116
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
116
117
  """
117
118
  name = 'ticker'
118
- return await self.subscribe(name, symbol, params)
119
+ return await self.subscribe(name, False, symbol, params)
119
120
 
120
121
  async def watch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
121
122
  """
@@ -128,7 +129,7 @@ class coinbase(ccxt.async_support.coinbase):
128
129
  if symbols is None:
129
130
  symbols = self.symbols
130
131
  name = 'ticker_batch'
131
- tickers = await self.subscribe(name, symbols, params)
132
+ tickers = await self.subscribe(name, False, symbols, params)
132
133
  if self.newUpdates:
133
134
  return tickers
134
135
  return self.tickers
@@ -283,7 +284,7 @@ class coinbase(ccxt.async_support.coinbase):
283
284
  await self.load_markets()
284
285
  symbol = self.symbol(symbol)
285
286
  name = 'market_trades'
286
- trades = await self.subscribe(name, symbol, params)
287
+ trades = await self.subscribe(name, False, symbol, params)
287
288
  if self.newUpdates:
288
289
  limit = trades.getLimit(symbol, limit)
289
290
  return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
@@ -300,7 +301,7 @@ class coinbase(ccxt.async_support.coinbase):
300
301
  """
301
302
  await self.load_markets()
302
303
  name = 'user'
303
- orders = await self.subscribe(name, symbol, params)
304
+ orders = await self.subscribe(name, True, symbol, params)
304
305
  if self.newUpdates:
305
306
  limit = orders.getLimit(symbol, limit)
306
307
  return self.filter_by_since_limit(orders, since, limit, 'timestamp', True)
@@ -318,7 +319,7 @@ class coinbase(ccxt.async_support.coinbase):
318
319
  name = 'level2'
319
320
  market = self.market(symbol)
320
321
  symbol = market['symbol']
321
- orderbook = await self.subscribe(name, symbol, params)
322
+ orderbook = await self.subscribe(name, False, symbol, params)
322
323
  return orderbook.limit()
323
324
 
324
325
  def handle_trade(self, client, message):
@@ -525,8 +526,8 @@ class coinbase(ccxt.async_support.coinbase):
525
526
  self.orderbooks[symbol] = self.order_book({}, limit)
526
527
  orderbook = self.orderbooks[symbol]
527
528
  self.handle_order_book_helper(orderbook, updates)
528
- orderbook['timestamp'] = None
529
- orderbook['datetime'] = None
529
+ orderbook['timestamp'] = self.parse8601(datetime)
530
+ orderbook['datetime'] = datetime
530
531
  orderbook['symbol'] = symbol
531
532
  client.resolve(orderbook, messageHash)
532
533
  if messageHash.endswith('USD'):
@@ -540,7 +541,6 @@ class coinbase(ccxt.async_support.coinbase):
540
541
  client.resolve(orderbook, messageHash)
541
542
  if messageHash.endswith('USD'):
542
543
  client.resolve(orderbook, messageHash + 'C') # sometimes we subscribe to BTC/USDC and coinbase returns BTC/USD
543
- return message
544
544
 
545
545
  def handle_subscription_status(self, client, message):
546
546
  #
ccxt/probit.py CHANGED
@@ -82,8 +82,11 @@ class probit(Exchange, ImplicitAPI):
82
82
  'fetchOrder': True,
83
83
  'fetchOrderBook': True,
84
84
  'fetchPosition': False,
85
+ 'fetchPositionHistory': False,
85
86
  'fetchPositionMode': False,
86
87
  'fetchPositions': False,
88
+ 'fetchPositionsForSymbol': False,
89
+ 'fetchPositionsHistory': False,
87
90
  'fetchPositionsRisk': False,
88
91
  'fetchPremiumIndexOHLCV': False,
89
92
  'fetchTicker': True,
@@ -1331,7 +1334,7 @@ class probit(Exchange, ImplicitAPI):
1331
1334
  data = self.safe_list(response, 'data', [])
1332
1335
  return self.parse_deposit_addresses(data, codes)
1333
1336
 
1334
- def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1337
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1335
1338
  """
1336
1339
  :see: https://docs-en.probit.com/reference/withdrawal
1337
1340
  make a withdrawal
ccxt/test/test_async.py CHANGED
@@ -496,6 +496,8 @@ class testMainClass(baseMainTestClass):
496
496
  final_skips['datetime'] = final_skips['timestamp']
497
497
  if ('bid' in final_skips) and not ('ask' in final_skips):
498
498
  final_skips['ask'] = final_skips['bid']
499
+ if ('baseVolume' in final_skips) and not ('quoteVolume' in final_skips):
500
+ final_skips['quoteVolume'] = final_skips['baseVolume']
499
501
  return final_skips
500
502
 
501
503
  async def test_safe(self, method_name, exchange, args=[], is_public=False):
ccxt/test/test_sync.py CHANGED
@@ -495,6 +495,8 @@ class testMainClass(baseMainTestClass):
495
495
  final_skips['datetime'] = final_skips['timestamp']
496
496
  if ('bid' in final_skips) and not ('ask' in final_skips):
497
497
  final_skips['ask'] = final_skips['bid']
498
+ if ('baseVolume' in final_skips) and not ('quoteVolume' in final_skips):
499
+ final_skips['quoteVolume'] = final_skips['baseVolume']
498
500
  return final_skips
499
501
 
500
502
  def test_safe(self, method_name, exchange, args=[], is_public=False):
ccxt/timex.py CHANGED
@@ -78,8 +78,11 @@ class timex(Exchange, ImplicitAPI):
78
78
  'fetchOrder': True,
79
79
  'fetchOrderBook': True,
80
80
  'fetchPosition': False,
81
+ 'fetchPositionHistory': False,
81
82
  'fetchPositionMode': False,
82
83
  'fetchPositions': False,
84
+ 'fetchPositionsForSymbol': False,
85
+ 'fetchPositionsHistory': False,
83
86
  'fetchPositionsRisk': False,
84
87
  'fetchPremiumIndexOHLCV': False,
85
88
  'fetchTicker': True,
ccxt/tokocrypto.py CHANGED
@@ -2237,7 +2237,7 @@ class tokocrypto(Exchange, ImplicitAPI):
2237
2237
  'fee': fee,
2238
2238
  }
2239
2239
 
2240
- def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2240
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
2241
2241
  """
2242
2242
  :see: https://www.tokocrypto.com/apidocs/#withdraw-signed
2243
2243
  make a withdrawal
ccxt/tradeogre.py CHANGED
@@ -84,8 +84,11 @@ class tradeogre(Exchange, ImplicitAPI):
84
84
  'fetchOrderTrades': False,
85
85
  'fetchPermissions': False,
86
86
  'fetchPosition': False,
87
+ 'fetchPositionHistory': False,
88
+ 'fetchPositionMode': False,
87
89
  'fetchPositions': False,
88
90
  'fetchPositionsForSymbol': False,
91
+ 'fetchPositionsHistory': False,
89
92
  'fetchPositionsRisk': False,
90
93
  'fetchPremiumIndexOHLCV': False,
91
94
  'fetchTicker': True,
ccxt/upbit.py CHANGED
@@ -1717,7 +1717,7 @@ class upbit(Exchange, ImplicitAPI):
1717
1717
  raise AddressPending(self.id + ' is generating ' + code + ' deposit address, call fetchDepositAddress or createDepositAddress one more time later to retrieve the generated address')
1718
1718
  return self.parse_deposit_address(response)
1719
1719
 
1720
- def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1720
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1721
1721
  """
1722
1722
  :see: https://docs.upbit.com/reference/디지털자산-출금하기
1723
1723
  :see: https://docs.upbit.com/reference/%EC%9B%90%ED%99%94-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0
ccxt/wavesexchange.py CHANGED
@@ -79,8 +79,11 @@ class wavesexchange(Exchange, ImplicitAPI):
79
79
  'fetchOrderBook': True,
80
80
  'fetchOrders': True,
81
81
  'fetchPosition': False,
82
+ 'fetchPositionHistory': False,
82
83
  'fetchPositionMode': False,
83
84
  'fetchPositions': False,
85
+ 'fetchPositionsForSymbol': False,
86
+ 'fetchPositionsHistory': False,
84
87
  'fetchPositionsRisk': False,
85
88
  'fetchPremiumIndexOHLCV': False,
86
89
  'fetchTicker': True,
@@ -2289,7 +2292,7 @@ class wavesexchange(Exchange, ImplicitAPI):
2289
2292
  raise ExchangeError(self.id + ' ' + body)
2290
2293
  return None
2291
2294
 
2292
- def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2295
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
2293
2296
  """
2294
2297
  make a withdrawal
2295
2298
  :param str code: unified currency code
ccxt/wazirx.py CHANGED
@@ -82,8 +82,11 @@ class wazirx(Exchange, ImplicitAPI):
82
82
  'fetchOrderBook': True,
83
83
  'fetchOrders': True,
84
84
  'fetchPosition': False,
85
+ 'fetchPositionHistory': False,
85
86
  'fetchPositionMode': False,
86
87
  'fetchPositions': False,
88
+ 'fetchPositionsForSymbol': False,
89
+ 'fetchPositionsHistory': False,
87
90
  'fetchPositionsRisk': False,
88
91
  'fetchPremiumIndexOHLCV': False,
89
92
  'fetchStatus': True,
ccxt/whitebit.py CHANGED
@@ -42,6 +42,7 @@ class whitebit(Exchange, ImplicitAPI):
42
42
  'future': False,
43
43
  'option': False,
44
44
  'cancelAllOrders': True,
45
+ 'cancelAllOrdersAfter': True,
45
46
  'cancelOrder': True,
46
47
  'cancelOrders': False,
47
48
  'createOrder': True,
@@ -1332,6 +1333,42 @@ class whitebit(Exchange, ImplicitAPI):
1332
1333
  #
1333
1334
  return response
1334
1335
 
1336
+ def cancel_all_orders_after(self, timeout: Int, params={}):
1337
+ """
1338
+ dead man's switch, cancel all orders after the given timeout
1339
+ :see: https://docs.whitebit.com/private/http-trade-v4/#sync-kill-switch-timer
1340
+ :param number timeout: time in milliseconds, 0 represents cancel the timer
1341
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1342
+ :param str [params.types]: Order types value. Example: "spot", "margin", "futures" or None
1343
+ :param str [params.symbol]: symbol unified symbol of the market the order was made in
1344
+ :returns dict: the api result
1345
+ """
1346
+ self.load_markets()
1347
+ symbol = self.safe_string(params, 'symbol')
1348
+ if symbol is None:
1349
+ raise ArgumentsRequired(self.id + ' cancelAllOrdersAfter() requires a symbol argument in params')
1350
+ market = self.market(symbol)
1351
+ params = self.omit(params, 'symbol')
1352
+ isBiggerThanZero = (timeout > 0)
1353
+ request: dict = {
1354
+ 'market': market['id'],
1355
+ # 'timeout': self.number_to_string(timeout / 1000) if (timeout > 0) else null,
1356
+ }
1357
+ if isBiggerThanZero:
1358
+ request['timeout'] = self.number_to_string(timeout / 1000)
1359
+ else:
1360
+ request['timeout'] = 'null'
1361
+ response = self.v4PrivatePostOrderKillSwitch(self.extend(request, params))
1362
+ #
1363
+ # {
1364
+ # "market": "BTC_USDT", # currency market,
1365
+ # "startTime": 1662478154, # now timestamp,
1366
+ # "cancellationTime": 1662478154, # now + timer_value,
1367
+ # "types": ["spot", "margin"]
1368
+ # }
1369
+ #
1370
+ return response
1371
+
1335
1372
  def parse_balance(self, response) -> Balances:
1336
1373
  balanceKeys = list(response.keys())
1337
1374
  result = {}
@@ -1772,7 +1809,7 @@ class whitebit(Exchange, ImplicitAPI):
1772
1809
  'status': None,
1773
1810
  }
1774
1811
 
1775
- def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1812
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1776
1813
  """
1777
1814
  make a withdrawal
1778
1815
  :see: https://docs.whitebit.com/private/http-main-v4/#create-withdraw-request
ccxt/woo.py CHANGED
@@ -41,6 +41,7 @@ class woo(Exchange, ImplicitAPI):
41
41
  'option': False,
42
42
  'addMargin': False,
43
43
  'cancelAllOrders': True,
44
+ 'cancelAllOrdersAfter': True,
44
45
  'cancelOrder': True,
45
46
  'cancelWithdraw': False, # exchange have that endpoint disabled atm, but was once implemented in ccxt per old docs: https://kronosresearch.github.io/wootrade-documents/#cancel-withdraw-request
46
47
  'closeAllPositions': False,
@@ -96,8 +97,10 @@ class woo(Exchange, ImplicitAPI):
96
97
  'fetchOrders': True,
97
98
  'fetchOrderTrades': True,
98
99
  'fetchPosition': True,
100
+ 'fetchPositionHistory': False,
99
101
  'fetchPositionMode': False,
100
102
  'fetchPositions': True,
103
+ 'fetchPositionsHistory': False,
101
104
  'fetchPremiumIndexOHLCV': False,
102
105
  'fetchStatus': True,
103
106
  'fetchTicker': False,
@@ -208,6 +211,7 @@ class woo(Exchange, ImplicitAPI):
208
211
  },
209
212
  'post': {
210
213
  'order': 5, # 2 requests per 1 second per symbol
214
+ 'order/cancel_all_after': 1,
211
215
  'asset/main_sub_transfer': 30, # 20 requests per 60 seconds
212
216
  'asset/ltv': 30,
213
217
  'asset/withdraw': 30, # implemented in ccxt, disabled on the exchange side https://kronosresearch.github.io/wootrade-documents/#token-withdraw
@@ -1203,6 +1207,31 @@ class woo(Exchange, ImplicitAPI):
1203
1207
  #
1204
1208
  return response
1205
1209
 
1210
+ def cancel_all_orders_after(self, timeout: Int, params={}):
1211
+ """
1212
+ dead man's switch, cancel all orders after the given timeout
1213
+ :see: https://docs.woo.org/#cancel-all-after
1214
+ :param number timeout: time in milliseconds, 0 represents cancel the timer
1215
+ :param boolean activated: countdown
1216
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1217
+ :returns dict: the api result
1218
+ """
1219
+ self.load_markets()
1220
+ request: dict = {
1221
+ 'trigger_after': timeout if (timeout > 0) else 0,
1222
+ }
1223
+ response = self.v1PrivatePostOrderCancelAllAfter(self.extend(request, params))
1224
+ #
1225
+ # {
1226
+ # "success": True,
1227
+ # "data": {
1228
+ # "expected_trigger_time": 1711534302938
1229
+ # },
1230
+ # "timestamp": 1711534302943
1231
+ # }
1232
+ #
1233
+ return response
1234
+
1206
1235
  def fetch_order(self, id: str, symbol: Str = None, params={}):
1207
1236
  """
1208
1237
  :see: https://docs.woo.org/#get-algo-order
@@ -2211,7 +2240,7 @@ class woo(Exchange, ImplicitAPI):
2211
2240
  }
2212
2241
  return self.safe_string(statuses, status, status)
2213
2242
 
2214
- def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2243
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
2215
2244
  """
2216
2245
  make a withdrawal
2217
2246
  :param str code: unified currency code
ccxt/yobit.py CHANGED
@@ -76,8 +76,11 @@ class yobit(Exchange, ImplicitAPI):
76
76
  'fetchOrderBook': True,
77
77
  'fetchOrderBooks': True,
78
78
  'fetchPosition': False,
79
+ 'fetchPositionHistory': False,
79
80
  'fetchPositionMode': False,
80
81
  'fetchPositions': False,
82
+ 'fetchPositionsForSymbol': False,
83
+ 'fetchPositionsHistory': False,
81
84
  'fetchPositionsRisk': False,
82
85
  'fetchPremiumIndexOHLCV': False,
83
86
  'fetchTicker': True,
@@ -1150,7 +1153,7 @@ class yobit(Exchange, ImplicitAPI):
1150
1153
  },
1151
1154
  }
1152
1155
 
1153
- def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1156
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1154
1157
  """
1155
1158
  :see: https://yobit.net/en/api
1156
1159
  make a withdrawal
ccxt/zaif.py CHANGED
@@ -557,7 +557,7 @@ class zaif(Exchange, ImplicitAPI):
557
557
  response = self.privatePostTradeHistory(self.extend(request, params))
558
558
  return self.parse_orders(response['return'], market, since, limit)
559
559
 
560
- def withdraw(self, code: str, amount: float, address, tag=None, params={}):
560
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
561
561
  """
562
562
  :see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id41
563
563
  make a withdrawal
ccxt/zonda.py CHANGED
@@ -1649,7 +1649,7 @@ class zonda(Exchange, ImplicitAPI):
1649
1649
  }
1650
1650
  return self.safe_string(statuses, status, status)
1651
1651
 
1652
- def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1652
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1653
1653
  """
1654
1654
  :see: https://docs.zondacrypto.exchange/reference/crypto-withdrawal-1
1655
1655
  make a withdrawal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.3.5
3
+ Version: 4.3.7
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
@@ -262,13 +262,13 @@ console.log(version, Object.keys(exchanges));
262
262
 
263
263
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
264
264
 
265
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.5/dist/ccxt.browser.js
266
- * unpkg: https://unpkg.com/ccxt@4.3.5/dist/ccxt.browser.js
265
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.7/dist/ccxt.browser.js
266
+ * unpkg: https://unpkg.com/ccxt@4.3.7/dist/ccxt.browser.js
267
267
 
268
268
  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.
269
269
 
270
270
  ```HTML
271
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.5/dist/ccxt.browser.js"></script>
271
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.7/dist/ccxt.browser.js"></script>
272
272
  ```
273
273
 
274
274
  Creates a global `ccxt` object: