ccxt 4.4.77__py2.py3-none-any.whl → 4.4.80__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.
Files changed (133) hide show
  1. ccxt/__init__.py +3 -3
  2. ccxt/abstract/apex.py +31 -0
  3. ccxt/abstract/bitmart.py +1 -0
  4. ccxt/apex.py +1884 -0
  5. ccxt/ascendex.py +23 -6
  6. ccxt/async_support/__init__.py +3 -3
  7. ccxt/async_support/apex.py +1884 -0
  8. ccxt/async_support/ascendex.py +23 -6
  9. ccxt/async_support/base/exchange.py +5 -1
  10. ccxt/async_support/binance.py +9 -3
  11. ccxt/async_support/bingx.py +4 -4
  12. ccxt/async_support/bitfinex.py +61 -36
  13. ccxt/async_support/bitflyer.py +2 -2
  14. ccxt/async_support/bitget.py +186 -128
  15. ccxt/async_support/bitmart.py +9 -4
  16. ccxt/async_support/bitmex.py +14 -7
  17. ccxt/async_support/bitopro.py +5 -1
  18. ccxt/async_support/bitrue.py +2 -1
  19. ccxt/async_support/bitso.py +1 -1
  20. ccxt/async_support/bitteam.py +2 -0
  21. ccxt/async_support/bitvavo.py +25 -10
  22. ccxt/async_support/btcalpha.py +1 -1
  23. ccxt/async_support/btcmarkets.py +1 -1
  24. ccxt/async_support/btcturk.py +1 -1
  25. ccxt/async_support/bybit.py +27 -15
  26. ccxt/async_support/cex.py +1 -1
  27. ccxt/async_support/coinbase.py +17 -4
  28. ccxt/async_support/coincatch.py +66 -0
  29. ccxt/async_support/coinex.py +2 -1
  30. ccxt/async_support/coinlist.py +1 -0
  31. ccxt/async_support/coinone.py +1 -0
  32. ccxt/async_support/cryptocom.py +2 -2
  33. ccxt/async_support/defx.py +1 -1
  34. ccxt/async_support/delta.py +4 -1
  35. ccxt/async_support/deribit.py +3 -2
  36. ccxt/async_support/derive.py +2 -2
  37. ccxt/async_support/digifinex.py +2 -2
  38. ccxt/async_support/gate.py +1 -1
  39. ccxt/async_support/hitbtc.py +5 -2
  40. ccxt/async_support/hollaex.py +1 -0
  41. ccxt/async_support/htx.py +9 -5
  42. ccxt/async_support/huobijp.py +1 -0
  43. ccxt/async_support/hyperliquid.py +14 -6
  44. ccxt/async_support/kraken.py +4 -2
  45. ccxt/async_support/krakenfutures.py +2 -2
  46. ccxt/async_support/kucoinfutures.py +2 -2
  47. ccxt/async_support/mexc.py +50 -52
  48. ccxt/async_support/okx.py +2 -2
  49. ccxt/async_support/oxfun.py +2 -2
  50. ccxt/async_support/paradex.py +2 -2
  51. ccxt/async_support/phemex.py +4 -3
  52. ccxt/async_support/poloniex.py +4 -3
  53. ccxt/async_support/probit.py +1 -0
  54. ccxt/async_support/timex.py +2 -2
  55. ccxt/async_support/tradeogre.py +2 -1
  56. ccxt/async_support/upbit.py +243 -63
  57. ccxt/async_support/vertex.py +2 -2
  58. ccxt/async_support/whitebit.py +66 -12
  59. ccxt/async_support/woo.py +5 -3
  60. ccxt/async_support/woofipro.py +2 -2
  61. ccxt/async_support/xt.py +9 -2
  62. ccxt/base/exchange.py +69 -2
  63. ccxt/binance.py +9 -3
  64. ccxt/bingx.py +4 -4
  65. ccxt/bitfinex.py +61 -36
  66. ccxt/bitflyer.py +2 -2
  67. ccxt/bitget.py +186 -128
  68. ccxt/bitmart.py +9 -4
  69. ccxt/bitmex.py +14 -7
  70. ccxt/bitopro.py +5 -1
  71. ccxt/bitrue.py +2 -1
  72. ccxt/bitso.py +1 -1
  73. ccxt/bitteam.py +2 -0
  74. ccxt/bitvavo.py +25 -10
  75. ccxt/btcalpha.py +1 -1
  76. ccxt/btcmarkets.py +1 -1
  77. ccxt/btcturk.py +1 -1
  78. ccxt/bybit.py +27 -15
  79. ccxt/cex.py +1 -1
  80. ccxt/coinbase.py +17 -4
  81. ccxt/coincatch.py +66 -0
  82. ccxt/coinex.py +2 -1
  83. ccxt/coinlist.py +1 -0
  84. ccxt/coinone.py +1 -0
  85. ccxt/cryptocom.py +2 -2
  86. ccxt/defx.py +1 -1
  87. ccxt/delta.py +4 -1
  88. ccxt/deribit.py +3 -2
  89. ccxt/derive.py +2 -2
  90. ccxt/digifinex.py +2 -2
  91. ccxt/gate.py +1 -1
  92. ccxt/hitbtc.py +5 -2
  93. ccxt/hollaex.py +1 -0
  94. ccxt/htx.py +9 -5
  95. ccxt/huobijp.py +1 -0
  96. ccxt/hyperliquid.py +14 -6
  97. ccxt/kraken.py +4 -2
  98. ccxt/krakenfutures.py +2 -2
  99. ccxt/kucoinfutures.py +2 -2
  100. ccxt/mexc.py +50 -52
  101. ccxt/okx.py +2 -2
  102. ccxt/oxfun.py +2 -2
  103. ccxt/paradex.py +2 -2
  104. ccxt/phemex.py +4 -3
  105. ccxt/poloniex.py +4 -3
  106. ccxt/pro/__init__.py +5 -1
  107. ccxt/pro/apex.py +984 -0
  108. ccxt/pro/binance.py +3 -3
  109. ccxt/pro/coinbase.py +43 -57
  110. ccxt/pro/gate.py +22 -2
  111. ccxt/pro/hollaex.py +2 -2
  112. ccxt/pro/p2b.py +2 -2
  113. ccxt/pro/tradeogre.py +272 -0
  114. ccxt/pro/upbit.py +42 -0
  115. ccxt/probit.py +1 -0
  116. ccxt/test/tests_async.py +4 -1
  117. ccxt/test/tests_sync.py +4 -1
  118. ccxt/timex.py +2 -2
  119. ccxt/tradeogre.py +2 -1
  120. ccxt/upbit.py +243 -63
  121. ccxt/vertex.py +2 -2
  122. ccxt/whitebit.py +66 -12
  123. ccxt/woo.py +5 -3
  124. ccxt/woofipro.py +2 -2
  125. ccxt/xt.py +9 -2
  126. {ccxt-4.4.77.dist-info → ccxt-4.4.80.dist-info}/METADATA +9 -11
  127. {ccxt-4.4.77.dist-info → ccxt-4.4.80.dist-info}/RECORD +130 -128
  128. ccxt/abstract/ace.py +0 -15
  129. ccxt/ace.py +0 -1152
  130. ccxt/async_support/ace.py +0 -1152
  131. {ccxt-4.4.77.dist-info → ccxt-4.4.80.dist-info}/LICENSE.txt +0 -0
  132. {ccxt-4.4.77.dist-info → ccxt-4.4.80.dist-info}/WHEEL +0 -0
  133. {ccxt-4.4.77.dist-info → ccxt-4.4.80.dist-info}/top_level.txt +0 -0
ccxt/ascendex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.ascendex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Any, Balances, Currencies, Currency, DepositAddress, Int, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Any, Balances, Bool, Currencies, Currency, DepositAddress, Int, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -521,6 +521,7 @@ class ascendex(Exchange, ImplicitAPI):
521
521
  # "data":[
522
522
  # {
523
523
  # "assetCode":"BTT",
524
+ # "displayName": "BTT",
524
525
  # "borrowAssetCode":"BTT-B",
525
526
  # "interestAssetCode":"BTT-I",
526
527
  # "nativeScale":0,
@@ -541,12 +542,13 @@ class ascendex(Exchange, ImplicitAPI):
541
542
  # "data":[
542
543
  # {
543
544
  # "assetCode":"LTCBULL",
545
+ # "displayName": "LTCBULL",
544
546
  # "nativeScale":4,
545
547
  # "numConfirmations":20,
546
548
  # "withdrawFee":"0.2",
547
549
  # "minWithdrawalAmt":"1.0",
548
550
  # "statusCode":"Normal",
549
- # "statusMessage":""
551
+ # "statusMessage":"" # hideFromWalletTx
550
552
  # }
551
553
  # ]
552
554
  # }
@@ -568,8 +570,23 @@ class ascendex(Exchange, ImplicitAPI):
568
570
  scale = self.safe_string_2(currency, 'precisionScale', 'nativeScale')
569
571
  precision = self.parse_number(self.parse_precision(scale))
570
572
  fee = self.safe_number_2(currency, 'withdrawFee', 'withdrawalFee')
571
- status = self.safe_string_2(currency, 'status', 'statusCode')
573
+ status = self.safe_string(currency, 'status')
574
+ statusCode = self.safe_string(currency, 'statusCode')
572
575
  active = (status == 'Normal')
576
+ depositEnabled: Bool = None
577
+ withdrawEnabled: Bool = None
578
+ if status == 'Delisted' or statusCode == 'hideFromWalletTx':
579
+ depositEnabled = False
580
+ withdrawEnabled = False
581
+ elif status == 'Normal':
582
+ depositEnabled = True
583
+ withdrawEnabled = True
584
+ elif status == 'NoTransaction' or statusCode == 'NoTransaction':
585
+ depositEnabled = True
586
+ withdrawEnabled = False
587
+ elif status == 'NoDeposit':
588
+ depositEnabled = False
589
+ withdrawEnabled = True
573
590
  marginInside = ('borrowAssetCode' in currency)
574
591
  result[code] = {
575
592
  'id': id,
@@ -579,8 +596,8 @@ class ascendex(Exchange, ImplicitAPI):
579
596
  'margin': marginInside,
580
597
  'name': self.safe_string(currency, 'assetName'),
581
598
  'active': active,
582
- 'deposit': None,
583
- 'withdraw': None,
599
+ 'deposit': depositEnabled,
600
+ 'withdraw': withdrawEnabled,
584
601
  'fee': fee,
585
602
  'precision': precision,
586
603
  'limits': {
@@ -2632,7 +2649,7 @@ class ascendex(Exchange, ImplicitAPI):
2632
2649
  'internal': False,
2633
2650
  }
2634
2651
 
2635
- def fetch_positions(self, symbols: Strings = None, params={}):
2652
+ def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
2636
2653
  """
2637
2654
  fetch all open positions
2638
2655
  :param str[]|None symbols: list of unified market symbols
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.77'
7
+ __version__ = '4.4.80'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -63,8 +63,8 @@ from ccxt.base.errors import UnsubscribeError # noqa: F4
63
63
  from ccxt.base.errors import error_hierarchy # noqa: F401
64
64
 
65
65
 
66
- from ccxt.async_support.ace import ace # noqa: F401
67
66
  from ccxt.async_support.alpaca import alpaca # noqa: F401
67
+ from ccxt.async_support.apex import apex # noqa: F401
68
68
  from ccxt.async_support.ascendex import ascendex # noqa: F401
69
69
  from ccxt.async_support.bequant import bequant # noqa: F401
70
70
  from ccxt.async_support.bigone import bigone # noqa: F401
@@ -172,8 +172,8 @@ from ccxt.async_support.zaif import zaif
172
172
  from ccxt.async_support.zonda import zonda # noqa: F401
173
173
 
174
174
  exchanges = [
175
- 'ace',
176
175
  'alpaca',
176
+ 'apex',
177
177
  'ascendex',
178
178
  'bequant',
179
179
  'bigone',