ccxt 4.4.33__py2.py3-none-any.whl → 4.4.35__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 (100) hide show
  1. ccxt/__init__.py +3 -1
  2. ccxt/abstract/bingx.py +17 -0
  3. ccxt/abstract/bitbank.py +5 -0
  4. ccxt/abstract/bitfinex2.py +1 -0
  5. ccxt/abstract/bitpanda.py +0 -12
  6. ccxt/abstract/bitrue.py +3 -3
  7. ccxt/abstract/ellipx.py +25 -0
  8. ccxt/abstract/okx.py +1 -0
  9. ccxt/abstract/onetrading.py +0 -12
  10. ccxt/abstract/xt.py +5 -5
  11. ccxt/alpaca.py +2 -0
  12. ccxt/async_support/__init__.py +3 -1
  13. ccxt/async_support/alpaca.py +2 -0
  14. ccxt/async_support/base/exchange.py +1 -1
  15. ccxt/async_support/binance.py +19 -15
  16. ccxt/async_support/bingx.py +479 -146
  17. ccxt/async_support/bitbank.py +5 -0
  18. ccxt/async_support/bitbns.py +2 -0
  19. ccxt/async_support/bitfinex2.py +1 -0
  20. ccxt/async_support/bitget.py +174 -40
  21. ccxt/async_support/bitmex.py +3 -1
  22. ccxt/async_support/bitopro.py +3 -0
  23. ccxt/async_support/bitrue.py +3 -2
  24. ccxt/async_support/btcmarkets.py +5 -3
  25. ccxt/async_support/btcturk.py +19 -19
  26. ccxt/async_support/bybit.py +13 -10
  27. ccxt/async_support/cex.py +13 -4
  28. ccxt/async_support/coinbase.py +3 -2
  29. ccxt/async_support/coinex.py +1 -0
  30. ccxt/async_support/coinone.py +7 -7
  31. ccxt/async_support/coinsph.py +7 -7
  32. ccxt/async_support/coinspot.py +39 -39
  33. ccxt/async_support/cryptocom.py +36 -34
  34. ccxt/async_support/ellipx.py +1828 -0
  35. ccxt/async_support/gate.py +143 -39
  36. ccxt/async_support/hyperliquid.py +70 -11
  37. ccxt/async_support/idex.py +3 -4
  38. ccxt/async_support/kraken.py +58 -49
  39. ccxt/async_support/krakenfutures.py +3 -1
  40. ccxt/async_support/kucoin.py +1 -1
  41. ccxt/async_support/okcoin.py +2 -0
  42. ccxt/async_support/okx.py +15 -10
  43. ccxt/async_support/onetrading.py +67 -370
  44. ccxt/async_support/paradex.py +2 -0
  45. ccxt/async_support/phemex.py +16 -0
  46. ccxt/async_support/poloniex.py +3 -1
  47. ccxt/async_support/poloniexfutures.py +3 -1
  48. ccxt/async_support/vertex.py +2 -0
  49. ccxt/async_support/woo.py +69 -69
  50. ccxt/async_support/xt.py +10 -10
  51. ccxt/base/exchange.py +28 -7
  52. ccxt/binance.py +19 -15
  53. ccxt/bingx.py +479 -146
  54. ccxt/bitbank.py +5 -0
  55. ccxt/bitbns.py +2 -0
  56. ccxt/bitfinex2.py +1 -0
  57. ccxt/bitget.py +174 -40
  58. ccxt/bitmex.py +3 -1
  59. ccxt/bitopro.py +3 -0
  60. ccxt/bitrue.py +3 -2
  61. ccxt/btcmarkets.py +5 -3
  62. ccxt/btcturk.py +19 -19
  63. ccxt/bybit.py +13 -10
  64. ccxt/cex.py +13 -4
  65. ccxt/coinbase.py +3 -2
  66. ccxt/coinex.py +1 -0
  67. ccxt/coinone.py +7 -7
  68. ccxt/coinsph.py +7 -7
  69. ccxt/coinspot.py +39 -39
  70. ccxt/cryptocom.py +36 -34
  71. ccxt/ellipx.py +1828 -0
  72. ccxt/gate.py +143 -39
  73. ccxt/hyperliquid.py +70 -11
  74. ccxt/idex.py +3 -4
  75. ccxt/kraken.py +58 -49
  76. ccxt/krakenfutures.py +3 -1
  77. ccxt/kucoin.py +1 -1
  78. ccxt/okcoin.py +2 -0
  79. ccxt/okx.py +15 -10
  80. ccxt/onetrading.py +67 -370
  81. ccxt/paradex.py +2 -0
  82. ccxt/phemex.py +16 -0
  83. ccxt/poloniex.py +3 -1
  84. ccxt/poloniexfutures.py +3 -1
  85. ccxt/pro/__init__.py +1 -1
  86. ccxt/pro/bitrue.py +13 -11
  87. ccxt/pro/idex.py +15 -0
  88. ccxt/pro/probit.py +58 -68
  89. ccxt/pro/woo.py +15 -15
  90. ccxt/test/tests_async.py +29 -2
  91. ccxt/test/tests_helpers.py +0 -2
  92. ccxt/test/tests_sync.py +29 -2
  93. ccxt/vertex.py +2 -0
  94. ccxt/woo.py +69 -69
  95. ccxt/xt.py +10 -10
  96. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/METADATA +9 -8
  97. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/RECORD +100 -97
  98. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/LICENSE.txt +0 -0
  99. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/WHEEL +0 -0
  100. {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/top_level.txt +0 -0
@@ -58,6 +58,8 @@ class cryptocom(Exchange, ImplicitAPI):
58
58
  'createMarketSellOrderWithCost': False,
59
59
  'createOrder': True,
60
60
  'createOrders': True,
61
+ 'createStopOrder': True,
62
+ 'createTriggerOrder': True,
61
63
  'fetchAccounts': True,
62
64
  'fetchBalance': True,
63
65
  'fetchBidsAsks': False,
@@ -520,8 +522,8 @@ class cryptocom(Exchange, ImplicitAPI):
520
522
  # }
521
523
  # }
522
524
  #
523
- resultResponse = self.safe_value(response, 'result', {})
524
- data = self.safe_value(resultResponse, 'data', [])
525
+ resultResponse = self.safe_dict(response, 'result', {})
526
+ data = self.safe_list(resultResponse, 'data', [])
525
527
  result = []
526
528
  for i in range(0, len(data)):
527
529
  market = data[i]
@@ -538,8 +540,8 @@ class cryptocom(Exchange, ImplicitAPI):
538
540
  settle = None if spot else self.safe_currency_code(settleId)
539
541
  optionType = self.safe_string_lower(market, 'put_call')
540
542
  strike = self.safe_string(market, 'strike')
541
- marginBuyEnabled = self.safe_value(market, 'margin_buy_enabled')
542
- marginSellEnabled = self.safe_value(market, 'margin_sell_enabled')
543
+ marginBuyEnabled = self.safe_bool(market, 'margin_buy_enabled')
544
+ marginSellEnabled = self.safe_bool(market, 'margin_sell_enabled')
543
545
  expiryString = self.omit_zero(self.safe_string(market, 'expiry_timestamp_ms'))
544
546
  expiry = int(expiryString) if (expiryString is not None) else None
545
547
  symbol = base + '/' + quote
@@ -576,7 +578,7 @@ class cryptocom(Exchange, ImplicitAPI):
576
578
  'swap': swap,
577
579
  'future': future,
578
580
  'option': option,
579
- 'active': self.safe_value(market, 'tradable'),
581
+ 'active': self.safe_bool(market, 'tradable'),
580
582
  'contract': contract,
581
583
  'linear': True if (contract) else None,
582
584
  'inverse': False if (contract) else None,
@@ -662,7 +664,7 @@ class cryptocom(Exchange, ImplicitAPI):
662
664
  # }
663
665
  # }
664
666
  #
665
- result = self.safe_value(response, 'result', {})
667
+ result = self.safe_dict(response, 'result', {})
666
668
  data = self.safe_list(result, 'data', [])
667
669
  return self.parse_tickers(data, symbols)
668
670
 
@@ -753,7 +755,7 @@ class cryptocom(Exchange, ImplicitAPI):
753
755
  # }
754
756
  # }
755
757
  #
756
- data = self.safe_value(response, 'result', {})
758
+ data = self.safe_dict(response, 'result', {})
757
759
  orders = self.safe_list(data, 'data', [])
758
760
  return self.parse_orders(orders, market, since, limit)
759
761
 
@@ -809,7 +811,7 @@ class cryptocom(Exchange, ImplicitAPI):
809
811
  # }
810
812
  # }
811
813
  #
812
- result = self.safe_value(response, 'result', {})
814
+ result = self.safe_dict(response, 'result', {})
813
815
  trades = self.safe_list(result, 'data', [])
814
816
  return self.parse_trades(trades, market, since, limit)
815
817
 
@@ -876,7 +878,7 @@ class cryptocom(Exchange, ImplicitAPI):
876
878
  # }
877
879
  # }
878
880
  #
879
- result = self.safe_value(response, 'result', {})
881
+ result = self.safe_dict(response, 'result', {})
880
882
  data = self.safe_list(result, 'data', [])
881
883
  return self.parse_ohlcvs(data, market, timeframe, since, limit)
882
884
 
@@ -917,15 +919,15 @@ class cryptocom(Exchange, ImplicitAPI):
917
919
  # }
918
920
  # }
919
921
  #
920
- result = self.safe_value(response, 'result', {})
921
- data = self.safe_value(result, 'data', [])
922
+ result = self.safe_dict(response, 'result', {})
923
+ data = self.safe_list(result, 'data', [])
922
924
  orderBook = self.safe_value(data, 0)
923
925
  timestamp = self.safe_integer(orderBook, 't')
924
926
  return self.parse_order_book(orderBook, symbol, timestamp)
925
927
 
926
928
  def parse_balance(self, response) -> Balances:
927
- responseResult = self.safe_value(response, 'result', {})
928
- data = self.safe_value(responseResult, 'data', [])
929
+ responseResult = self.safe_dict(response, 'result', {})
930
+ data = self.safe_list(responseResult, 'data', [])
929
931
  positionBalances = self.safe_value(data[0], 'position_balances', [])
930
932
  result: dict = {'info': response}
931
933
  for i in range(0, len(positionBalances)):
@@ -1145,7 +1147,7 @@ class cryptocom(Exchange, ImplicitAPI):
1145
1147
  :param dict [params]: extra parameters specific to the exchange API endpoint
1146
1148
  :param str [params.timeInForce]: 'GTC', 'IOC', 'FOK' or 'PO'
1147
1149
  :param str [params.ref_price_type]: 'MARK_PRICE', 'INDEX_PRICE', 'LAST_PRICE' which trigger price type to use, default is MARK_PRICE
1148
- :param float [params.stopPrice]: price to trigger a stop order
1150
+ :param float [params.triggerPrice]: price to trigger a stop order
1149
1151
  :param float [params.stopLossPrice]: price to trigger a stop-loss trigger order
1150
1152
  :param float [params.takeProfitPrice]: price to trigger a take-profit trigger order
1151
1153
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1188,7 +1190,7 @@ class cryptocom(Exchange, ImplicitAPI):
1188
1190
  side = self.safe_string(rawOrder, 'side')
1189
1191
  amount = self.safe_value(rawOrder, 'amount')
1190
1192
  price = self.safe_value(rawOrder, 'price')
1191
- orderParams = self.safe_value(rawOrder, 'params', {})
1193
+ orderParams = self.safe_dict(rawOrder, 'params', {})
1192
1194
  orderRequest = self.create_advanced_order_request(marketId, type, side, amount, price, orderParams)
1193
1195
  ordersRequests.append(orderRequest)
1194
1196
  contigency = self.safe_string(params, 'contingency_type', 'LIST')
@@ -1510,7 +1512,7 @@ class cryptocom(Exchange, ImplicitAPI):
1510
1512
  # }
1511
1513
  # }
1512
1514
  #
1513
- data = self.safe_value(response, 'result', {})
1515
+ data = self.safe_dict(response, 'result', {})
1514
1516
  orders = self.safe_list(data, 'data', [])
1515
1517
  return self.parse_orders(orders, market, since, limit)
1516
1518
 
@@ -1576,7 +1578,7 @@ class cryptocom(Exchange, ImplicitAPI):
1576
1578
  # }
1577
1579
  # }
1578
1580
  #
1579
- result = self.safe_value(response, 'result', {})
1581
+ result = self.safe_dict(response, 'result', {})
1580
1582
  trades = self.safe_list(result, 'data', [])
1581
1583
  return self.parse_trades(trades, market, since, limit)
1582
1584
 
@@ -1675,14 +1677,14 @@ class cryptocom(Exchange, ImplicitAPI):
1675
1677
  # }
1676
1678
  # }
1677
1679
  #
1678
- data = self.safe_value(response, 'result', {})
1679
- addresses = self.safe_value(data, 'deposit_address_list', [])
1680
+ data = self.safe_dict(response, 'result', {})
1681
+ addresses = self.safe_list(data, 'deposit_address_list', [])
1680
1682
  addressesLength = len(addresses)
1681
1683
  if addressesLength == 0:
1682
1684
  raise ExchangeError(self.id + ' fetchDepositAddressesByNetwork() generating address...')
1683
1685
  result: dict = {}
1684
1686
  for i in range(0, addressesLength):
1685
- value = self.safe_value(addresses, i)
1687
+ value = self.safe_dict(addresses, i)
1686
1688
  addressString = self.safe_string(value, 'address')
1687
1689
  currencyId = self.safe_string(value, 'currency')
1688
1690
  responseCode = self.safe_currency_code(currencyId)
@@ -1769,7 +1771,7 @@ class cryptocom(Exchange, ImplicitAPI):
1769
1771
  # }
1770
1772
  # }
1771
1773
  #
1772
- data = self.safe_value(response, 'result', {})
1774
+ data = self.safe_dict(response, 'result', {})
1773
1775
  depositList = self.safe_list(data, 'deposit_list', [])
1774
1776
  return self.parse_transactions(depositList, currency, since, limit)
1775
1777
 
@@ -1826,7 +1828,7 @@ class cryptocom(Exchange, ImplicitAPI):
1826
1828
  # }
1827
1829
  # }
1828
1830
  #
1829
- data = self.safe_value(response, 'result', {})
1831
+ data = self.safe_dict(response, 'result', {})
1830
1832
  withdrawalList = self.safe_list(data, 'withdrawal_list', [])
1831
1833
  return self.parse_transactions(withdrawalList, currency, since, limit)
1832
1834
 
@@ -2225,7 +2227,7 @@ class cryptocom(Exchange, ImplicitAPI):
2225
2227
  # ]
2226
2228
  # }
2227
2229
  #
2228
- networkList = self.safe_value(fee, 'network_list')
2230
+ networkList = self.safe_list(fee, 'network_list', [])
2229
2231
  networkListLength = len(networkList)
2230
2232
  result: dict = {
2231
2233
  'info': fee,
@@ -2326,8 +2328,8 @@ class cryptocom(Exchange, ImplicitAPI):
2326
2328
  # }
2327
2329
  # }
2328
2330
  #
2329
- result = self.safe_value(response, 'result', {})
2330
- ledger = self.safe_value(result, 'data', [])
2331
+ result = self.safe_dict(response, 'result', {})
2332
+ ledger = self.safe_list(result, 'data', [])
2331
2333
  return self.parse_ledger(ledger, currency, since, limit)
2332
2334
 
2333
2335
  def parse_ledger_entry(self, item: dict, currency: Currency = None) -> LedgerEntry:
@@ -2451,9 +2453,9 @@ class cryptocom(Exchange, ImplicitAPI):
2451
2453
  # }
2452
2454
  # }
2453
2455
  #
2454
- result = self.safe_value(response, 'result', {})
2455
- masterAccount = self.safe_value(result, 'master_account', {})
2456
- accounts = self.safe_value(result, 'sub_account_list', [])
2456
+ result = self.safe_dict(response, 'result', {})
2457
+ masterAccount = self.safe_dict(result, 'master_account', {})
2458
+ accounts = self.safe_list(result, 'sub_account_list', [])
2457
2459
  accounts.append(masterAccount)
2458
2460
  return self.parse_accounts(accounts, params)
2459
2461
 
@@ -2533,8 +2535,8 @@ class cryptocom(Exchange, ImplicitAPI):
2533
2535
  # }
2534
2536
  # }
2535
2537
  #
2536
- result = self.safe_value(response, 'result', {})
2537
- data = self.safe_value(result, 'data', [])
2538
+ result = self.safe_dict(response, 'result', {})
2539
+ data = self.safe_list(result, 'data', [])
2538
2540
  settlements = self.parse_settlements(data, market)
2539
2541
  sorted = self.sort_by(settlements, 'timestamp')
2540
2542
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
@@ -2627,8 +2629,8 @@ class cryptocom(Exchange, ImplicitAPI):
2627
2629
  # }
2628
2630
  # }
2629
2631
  #
2630
- result = self.safe_value(response, 'result', {})
2631
- data = self.safe_value(result, 'data', [])
2632
+ result = self.safe_dict(response, 'result', {})
2633
+ data = self.safe_list(result, 'data', [])
2632
2634
  marketId = self.safe_string(result, 'instrument_name')
2633
2635
  rates = []
2634
2636
  for i in range(0, len(data)):
@@ -2734,8 +2736,8 @@ class cryptocom(Exchange, ImplicitAPI):
2734
2736
  # }
2735
2737
  # }
2736
2738
  #
2737
- responseResult = self.safe_value(response, 'result', {})
2738
- positions = self.safe_value(responseResult, 'data', [])
2739
+ responseResult = self.safe_dict(response, 'result', {})
2740
+ positions = self.safe_list(responseResult, 'data', [])
2739
2741
  result = []
2740
2742
  for i in range(0, len(positions)):
2741
2743
  entry = positions[i]