ccxt 4.4.69__py2.py3-none-any.whl → 4.4.71__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 (65) hide show
  1. ccxt/__init__.py +1 -3
  2. ccxt/abstract/bingx.py +1 -0
  3. ccxt/abstract/bitmart.py +1 -0
  4. ccxt/abstract/bybit.py +4 -0
  5. ccxt/abstract/myokx.py +3 -0
  6. ccxt/abstract/okx.py +3 -0
  7. ccxt/abstract/poloniex.py +36 -0
  8. ccxt/abstract/tradeogre.py +1 -1
  9. ccxt/async_support/__init__.py +1 -3
  10. ccxt/async_support/base/exchange.py +3 -3
  11. ccxt/async_support/binance.py +107 -102
  12. ccxt/async_support/bingx.py +64 -42
  13. ccxt/async_support/bitget.py +47 -265
  14. ccxt/async_support/bitmart.py +12 -1
  15. ccxt/async_support/bitopro.py +1 -0
  16. ccxt/async_support/bitrue.py +1 -0
  17. ccxt/async_support/bybit.py +7 -0
  18. ccxt/async_support/cex.py +1 -0
  19. ccxt/async_support/coinbase.py +23 -4
  20. ccxt/async_support/coinbaseexchange.py +1 -0
  21. ccxt/async_support/deribit.py +1 -0
  22. ccxt/async_support/hashkey.py +4 -2
  23. ccxt/async_support/hyperliquid.py +16 -7
  24. ccxt/async_support/kraken.py +77 -5
  25. ccxt/async_support/kucoin.py +4 -2
  26. ccxt/async_support/mexc.py +8 -4
  27. ccxt/async_support/okx.py +62 -46
  28. ccxt/async_support/poloniex.py +1263 -85
  29. ccxt/async_support/tradeogre.py +20 -4
  30. ccxt/async_support/whitebit.py +4 -2
  31. ccxt/base/exchange.py +23 -4
  32. ccxt/base/types.py +28 -0
  33. ccxt/binance.py +107 -102
  34. ccxt/bingx.py +64 -42
  35. ccxt/bitget.py +47 -265
  36. ccxt/bitmart.py +12 -1
  37. ccxt/bitopro.py +1 -0
  38. ccxt/bitrue.py +1 -0
  39. ccxt/bybit.py +7 -0
  40. ccxt/cex.py +1 -0
  41. ccxt/coinbase.py +23 -4
  42. ccxt/coinbaseexchange.py +1 -0
  43. ccxt/deribit.py +1 -0
  44. ccxt/hashkey.py +4 -2
  45. ccxt/hyperliquid.py +16 -7
  46. ccxt/kraken.py +77 -5
  47. ccxt/kucoin.py +4 -2
  48. ccxt/mexc.py +8 -4
  49. ccxt/okx.py +62 -46
  50. ccxt/poloniex.py +1262 -85
  51. ccxt/pro/__init__.py +1 -3
  52. ccxt/pro/binance.py +102 -102
  53. ccxt/pro/bingx.py +62 -51
  54. ccxt/pro/bitget.py +28 -3
  55. ccxt/pro/bybit.py +81 -37
  56. ccxt/test/tests_async.py +4 -3
  57. ccxt/test/tests_sync.py +4 -3
  58. ccxt/tradeogre.py +20 -4
  59. ccxt/whitebit.py +4 -2
  60. {ccxt-4.4.69.dist-info → ccxt-4.4.71.dist-info}/METADATA +6 -9
  61. {ccxt-4.4.69.dist-info → ccxt-4.4.71.dist-info}/RECORD +64 -65
  62. ccxt/abstract/poloniexfutures.py +0 -48
  63. {ccxt-4.4.69.dist-info → ccxt-4.4.71.dist-info}/LICENSE.txt +0 -0
  64. {ccxt-4.4.69.dist-info → ccxt-4.4.71.dist-info}/WHEEL +0 -0
  65. {ccxt-4.4.69.dist-info → ccxt-4.4.71.dist-info}/top_level.txt +0 -0
ccxt/bybit.py CHANGED
@@ -266,6 +266,8 @@ class bybit(Exchange, ImplicitAPI):
266
266
  # institutional lending
267
267
  'v5/ins-loan/product-infos': 5,
268
268
  'v5/ins-loan/ensure-tokens-convert': 5,
269
+ # earn
270
+ 'v5/earn/product': 5,
269
271
  },
270
272
  },
271
273
  'private': {
@@ -424,6 +426,9 @@ class bybit(Exchange, ImplicitAPI):
424
426
  'v5/broker/earnings-info': 5,
425
427
  'v5/broker/account-info': 5,
426
428
  'v5/broker/asset/query-sub-member-deposit-record': 10,
429
+ # earn
430
+ 'v5/earn/order': 5,
431
+ 'v5/earn/position': 5,
427
432
  },
428
433
  'post': {
429
434
  # spot
@@ -559,6 +564,8 @@ class bybit(Exchange, ImplicitAPI):
559
564
  'v5/broker/award/info': 5,
560
565
  'v5/broker/award/distribute-award': 5,
561
566
  'v5/broker/award/distribution-record': 5,
567
+ # earn
568
+ 'v5/earn/place-order': 5,
562
569
  },
563
570
  },
564
571
  },
ccxt/cex.py CHANGED
@@ -38,6 +38,7 @@ class cex(Exchange, ImplicitAPI):
38
38
  'cancelAllOrders': True,
39
39
  'cancelOrder': True,
40
40
  'createOrder': True,
41
+ 'createReduceOnlyOrder': False,
41
42
  'createStopOrder': True,
42
43
  'createTriggerOrder': True,
43
44
  'fetchAccounts': True,
ccxt/coinbase.py CHANGED
@@ -335,6 +335,7 @@ class coinbase(Exchange, ImplicitAPI):
335
335
  'INSUFFICIENT_FUND': BadRequest,
336
336
  'PERMISSION_DENIED': PermissionDenied,
337
337
  'INVALID_ARGUMENT': BadRequest,
338
+ 'PREVIEW_STOP_PRICE_ABOVE_LAST_TRADE_PRICE': InvalidOrder,
338
339
  },
339
340
  'broad': {
340
341
  'request timestamp expired': InvalidNonce, # {"errors":[{"id":"authentication_error","message":"request timestamp expired"}]}
@@ -4863,19 +4864,37 @@ class coinbase(Exchange, ImplicitAPI):
4863
4864
  # ]
4864
4865
  # }
4865
4866
  # or
4866
- # {
4867
+ # {
4868
+ # "success": False,
4869
+ # "error_response": {
4867
4870
  # "error": "UNKNOWN_FAILURE_REASON",
4868
4871
  # "message": "",
4869
4872
  # "error_details": "",
4870
- # "preview_failure_reason": "PREVIEW_STOP_PRICE_BELOW_LAST_TRADE_PRICE"
4871
- # }
4873
+ # "preview_failure_reason": "PREVIEW_STOP_PRICE_ABOVE_LAST_TRADE_PRICE"
4874
+ # },
4875
+ # "order_configuration": {
4876
+ # "stop_limit_stop_limit_gtc": {
4877
+ # "base_size": "0.0001",
4878
+ # "limit_price": "2000",
4879
+ # "stop_price": "2005",
4880
+ # "stop_direction": "STOP_DIRECTION_STOP_DOWN",
4881
+ # "reduce_only": False
4882
+ # }
4883
+ # }
4884
+ # }
4872
4885
  #
4873
4886
  errorCode = self.safe_string(response, 'error')
4874
4887
  if errorCode is not None:
4875
- errorMessage = self.safe_string_2(response, 'error_description', 'preview_failure_reason')
4888
+ errorMessage = self.safe_string_2(response, 'error_description', 'error')
4876
4889
  self.throw_exactly_matched_exception(self.exceptions['exact'], errorCode, feedback)
4877
4890
  self.throw_broadly_matched_exception(self.exceptions['broad'], errorMessage, feedback)
4878
4891
  raise ExchangeError(feedback)
4892
+ errorResponse = self.safe_dict(response, 'error_response')
4893
+ if errorResponse is not None:
4894
+ errorMessageInner = self.safe_string_2(errorResponse, 'preview_failure_reason', 'preview_failure_reason')
4895
+ self.throw_exactly_matched_exception(self.exceptions['exact'], errorMessageInner, feedback)
4896
+ self.throw_broadly_matched_exception(self.exceptions['broad'], errorMessageInner, feedback)
4897
+ raise ExchangeError(feedback)
4879
4898
  errors = self.safe_list(response, 'errors')
4880
4899
  if errors is not None:
4881
4900
  if isinstance(errors, list):
ccxt/coinbaseexchange.py CHANGED
@@ -43,6 +43,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
43
43
  'cancelOrder': True,
44
44
  'createDepositAddress': True,
45
45
  'createOrder': True,
46
+ 'createReduceOnlyOrder': False,
46
47
  'createStopLimitOrder': True,
47
48
  'createStopMarketOrder': True,
48
49
  'createStopOrder': True,
ccxt/deribit.py CHANGED
@@ -50,6 +50,7 @@ class deribit(Exchange, ImplicitAPI):
50
50
  'cancelOrders': False,
51
51
  'createDepositAddress': True,
52
52
  'createOrder': True,
53
+ 'createReduceOnlyOrder': True,
53
54
  'createStopLimitOrder': True,
54
55
  'createStopMarketOrder': True,
55
56
  'createStopOrder': True,
ccxt/hashkey.py CHANGED
@@ -2399,8 +2399,10 @@ class hashkey(Exchange, ImplicitAPI):
2399
2399
  market = self.market(symbol)
2400
2400
  if not market['spot']:
2401
2401
  raise NotSupported(self.id + ' createMarketBuyOrderWithCost() is supported for spot markets only')
2402
- params['cost'] = cost
2403
- return self.create_order(symbol, 'market', 'buy', cost, None, params)
2402
+ req = {
2403
+ 'cost': cost,
2404
+ }
2405
+ return self.create_order(symbol, 'market', 'buy', cost, None, self.extend(req, params))
2404
2406
 
2405
2407
  def create_spot_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}) -> Order:
2406
2408
  """
ccxt/hyperliquid.py CHANGED
@@ -1756,11 +1756,12 @@ class hyperliquid(Exchange, ImplicitAPI):
1756
1756
  isTrigger = (stopLossPrice or takeProfitPrice)
1757
1757
  reduceOnly = self.safe_bool(orderParams, 'reduceOnly', False)
1758
1758
  orderParams = self.omit(orderParams, ['slippage', 'timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'clientOrderId', 'client_id', 'postOnly', 'reduceOnly'])
1759
- px = str(price)
1759
+ px = self.number_to_string(price)
1760
1760
  if isMarket:
1761
- px = str(Precise.string_mul(price), Precise.string_add('1', slippage)) if (isBuy) else str(Precise.string_mul(price), Precise.string_sub('1', slippage))
1761
+ px = Precise.string_mul(px, Precise.string_add('1', slippage)) if (isBuy) else Precise.string_mul(px, Precise.string_sub('1', slippage))
1762
+ px = self.price_to_precision(symbol, px)
1762
1763
  else:
1763
- px = self.price_to_precision(symbol, str(price))
1764
+ px = self.price_to_precision(symbol, px)
1764
1765
  sz = self.amount_to_precision(symbol, amount)
1765
1766
  orderType: dict = {}
1766
1767
  if isTrigger:
@@ -2242,6 +2243,10 @@ class hyperliquid(Exchange, ImplicitAPI):
2242
2243
  side = 'sell' if (side == 'A') else 'buy'
2243
2244
  totalAmount = self.safe_string_2(entry, 'origSz', 'totalSz')
2244
2245
  remaining = self.safe_string(entry, 'sz')
2246
+ tif = self.safe_string_upper(entry, 'tif')
2247
+ postOnly = None
2248
+ if tif is not None:
2249
+ postOnly = (tif == 'ALO')
2245
2250
  return self.safe_order({
2246
2251
  'info': order,
2247
2252
  'id': self.safe_string(entry, 'oid'),
@@ -2252,8 +2257,8 @@ class hyperliquid(Exchange, ImplicitAPI):
2252
2257
  'lastUpdateTimestamp': self.safe_integer(order, 'statusTimestamp'),
2253
2258
  'symbol': symbol,
2254
2259
  'type': self.parse_order_type(self.safe_string_lower(entry, 'orderType')),
2255
- 'timeInForce': self.safe_string_upper(entry, 'tif'),
2256
- 'postOnly': None,
2260
+ 'timeInForce': tif,
2261
+ 'postOnly': postOnly,
2257
2262
  'reduceOnly': self.safe_bool(entry, 'reduceOnly'),
2258
2263
  'side': side,
2259
2264
  'price': self.safe_string(entry, 'limitPx'),
@@ -2371,6 +2376,10 @@ class hyperliquid(Exchange, ImplicitAPI):
2371
2376
  if side is not None:
2372
2377
  side = 'sell' if (side == 'A') else 'buy'
2373
2378
  fee = self.safe_string(trade, 'fee')
2379
+ takerOrMaker = None
2380
+ crossed = self.safe_bool(trade, 'crossed')
2381
+ if crossed is not None:
2382
+ takerOrMaker = 'taker' if crossed else 'maker'
2374
2383
  return self.safe_trade({
2375
2384
  'info': trade,
2376
2385
  'timestamp': timestamp,
@@ -2380,7 +2389,7 @@ class hyperliquid(Exchange, ImplicitAPI):
2380
2389
  'order': self.safe_string(trade, 'oid'),
2381
2390
  'type': None,
2382
2391
  'side': side,
2383
- 'takerOrMaker': None,
2392
+ 'takerOrMaker': takerOrMaker,
2384
2393
  'price': price,
2385
2394
  'amount': amount,
2386
2395
  'cost': None,
@@ -2927,7 +2936,7 @@ class hyperliquid(Exchange, ImplicitAPI):
2927
2936
  'tagTo': None,
2928
2937
  'tagFrom': None,
2929
2938
  'type': None,
2930
- 'amount': self.safe_integer(delta, 'usdc'),
2939
+ 'amount': self.safe_number(delta, 'usdc'),
2931
2940
  'currency': None,
2932
2941
  'status': self.safe_string(transaction, 'status'),
2933
2942
  'updated': None,
ccxt/kraken.py CHANGED
@@ -243,13 +243,13 @@ class kraken(Exchange, ImplicitAPI):
243
243
  },
244
244
  },
245
245
  'commonCurrencies': {
246
+ # about X & Z prefixes and .S & .M suffixes, see comment under fetchCurrencies
246
247
  'LUNA': 'LUNC',
247
248
  'LUNA2': 'LUNA',
248
249
  'REPV2': 'REP',
249
250
  'REP': 'REPV1',
250
251
  'UST': 'USTC',
251
252
  'XBT': 'BTC',
252
- 'XBT.M': 'BTC.M', # https://support.kraken.com/hc/en-us/articles/360039879471-What-is-Asset-S-and-Asset-M-
253
253
  'XDG': 'DOGE',
254
254
  },
255
255
  'options': {
@@ -780,9 +780,48 @@ class kraken(Exchange, ImplicitAPI):
780
780
  # {
781
781
  # "error": [],
782
782
  # "result": {
783
- # "BCH": {
783
+ # "ATOM": {
784
784
  # "aclass": "currency",
785
- # "altname": "BCH",
785
+ # "altname": "ATOM",
786
+ # "collateral_value": "0.7",
787
+ # "decimals": 8,
788
+ # "display_decimals": 6,
789
+ # "margin_rate": 0.02,
790
+ # "status": "enabled",
791
+ # },
792
+ # "ATOM.S": {
793
+ # "aclass": "currency",
794
+ # "altname": "ATOM.S",
795
+ # "decimals": 8,
796
+ # "display_decimals": 6,
797
+ # "status": "enabled",
798
+ # },
799
+ # "XXBT": {
800
+ # "aclass": "currency",
801
+ # "altname": "XBT",
802
+ # "decimals": 10,
803
+ # "display_decimals": 5,
804
+ # "margin_rate": 0.01,
805
+ # "status": "enabled",
806
+ # },
807
+ # "XETH": {
808
+ # "aclass": "currency",
809
+ # "altname": "ETH",
810
+ # "decimals": 10,
811
+ # "display_decimals": 5
812
+ # "margin_rate": 0.02,
813
+ # "status": "enabled",
814
+ # },
815
+ # "XBT.M": {
816
+ # "aclass": "currency",
817
+ # "altname": "XBT.M",
818
+ # "decimals": 10,
819
+ # "display_decimals": 5
820
+ # "status": "enabled",
821
+ # },
822
+ # "ETH.M": {
823
+ # "aclass": "currency",
824
+ # "altname": "ETH.M",
786
825
  # "decimals": 10,
787
826
  # "display_decimals": 5
788
827
  # "status": "enabled",
@@ -801,7 +840,27 @@ class kraken(Exchange, ImplicitAPI):
801
840
  # see: https://support.kraken.com/hc/en-us/articles/201893608-What-are-the-withdrawal-fees-
802
841
  # to add support for multiple withdrawal/deposit methods and
803
842
  # differentiated fees for each particular method
843
+ #
844
+ # Notes about abbreviations:
845
+ # Z and X prefixes: https://support.kraken.com/hc/en-us/articles/360001206766-Bitcoin-currency-code-XBT-vs-BTC
846
+ # S and M suffixes: https://support.kraken.com/hc/en-us/articles/360039879471-What-is-Asset-S-and-Asset-M-
847
+ #
804
848
  code = self.safe_currency_code(id)
849
+ # the below can not be reliable done in `safeCurrencyCode`, so we have to do it here
850
+ if id.find('.') < 0:
851
+ altName = self.safe_string(currency, 'altname')
852
+ # handle cases like below:
853
+ #
854
+ # id | altname
855
+ # ---------------
856
+ # XXBT | XBT
857
+ # ZUSD | USD
858
+ if id != altName and (id.startswith('X') or id.startswith('Z')):
859
+ code = self.safe_currency_code(altName)
860
+ # also, add map in commonCurrencies:
861
+ self.commonCurrencies[id] = code
862
+ else:
863
+ code = self.safe_currency_code(id)
805
864
  precision = self.parse_number(self.parse_precision(self.safe_string(currency, 'decimals')))
806
865
  # assumes all currencies are active except those listed above
807
866
  active = self.safe_string(currency, 'status') == 'enabled'
@@ -829,6 +888,17 @@ class kraken(Exchange, ImplicitAPI):
829
888
  }
830
889
  return result
831
890
 
891
+ def safe_currency_code(self, currencyId: Str, currency: Currency = None) -> Str:
892
+ if currencyId is None:
893
+ return currencyId
894
+ if currencyId.find('.') > 0:
895
+ # if ID contains .M, .S or .F, then it can't contain X or Z prefix. in such case, ID equals to ALTNAME
896
+ parts = currencyId.split('.')
897
+ firstPart = self.safe_string(parts, 0)
898
+ secondPart = self.safe_string(parts, 1)
899
+ return super(kraken, self).safe_currency_code(firstPart, currency) + '.' + secondPart
900
+ return super(kraken, self).safe_currency_code(currencyId, currency)
901
+
832
902
  def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
833
903
  """
834
904
  fetch the trading fees for a market
@@ -1492,8 +1562,10 @@ class kraken(Exchange, ImplicitAPI):
1492
1562
  """
1493
1563
  self.load_markets()
1494
1564
  # only buy orders are supported by the endpoint
1495
- params['cost'] = cost
1496
- return self.create_order(symbol, 'market', side, cost, None, params)
1565
+ req = {
1566
+ 'cost': cost,
1567
+ }
1568
+ return self.create_order(symbol, 'market', side, cost, None, self.extend(req, params))
1497
1569
 
1498
1570
  def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
1499
1571
  """
ccxt/kucoin.py CHANGED
@@ -2271,8 +2271,10 @@ class kucoin(Exchange, ImplicitAPI):
2271
2271
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2272
2272
  """
2273
2273
  self.load_markets()
2274
- params['cost'] = cost
2275
- return self.create_order(symbol, 'market', side, cost, None, params)
2274
+ req = {
2275
+ 'cost': cost,
2276
+ }
2277
+ return self.create_order(symbol, 'market', side, cost, None, self.extend(req, params))
2276
2278
 
2277
2279
  def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
2278
2280
  """
ccxt/mexc.py CHANGED
@@ -2195,8 +2195,10 @@ class mexc(Exchange, ImplicitAPI):
2195
2195
  market = self.market(symbol)
2196
2196
  if not market['spot']:
2197
2197
  raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot orders only')
2198
- params['cost'] = cost
2199
- return self.create_order(symbol, 'market', 'buy', 0, None, params)
2198
+ req = {
2199
+ 'cost': cost,
2200
+ }
2201
+ return self.create_order(symbol, 'market', 'buy', 0, None, self.extend(req, params))
2200
2202
 
2201
2203
  def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
2202
2204
  """
@@ -2213,8 +2215,10 @@ class mexc(Exchange, ImplicitAPI):
2213
2215
  market = self.market(symbol)
2214
2216
  if not market['spot']:
2215
2217
  raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot orders only')
2216
- params['cost'] = cost
2217
- return self.create_order(symbol, 'market', 'sell', 0, None, params)
2218
+ req = {
2219
+ 'cost': cost,
2220
+ }
2221
+ return self.create_order(symbol, 'market', 'sell', 0, None, self.extend(req, params))
2218
2222
 
2219
2223
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
2220
2224
  """
ccxt/okx.py CHANGED
@@ -332,7 +332,9 @@ class okx(Exchange, ImplicitAPI):
332
332
  'trade/easy-convert-currency-list': 20,
333
333
  'trade/easy-convert-history': 20,
334
334
  'trade/one-click-repay-currency-list': 20,
335
+ 'trade/one-click-repay-currency-list-v2': 20,
335
336
  'trade/one-click-repay-history': 20,
337
+ 'trade/one-click-repay-history-v2': 20,
336
338
  'trade/account-rate-limit': 1,
337
339
  # asset
338
340
  'asset/currencies': 5 / 3,
@@ -489,6 +491,7 @@ class okx(Exchange, ImplicitAPI):
489
491
  'trade/cancel-advance-algos': 1,
490
492
  'trade/easy-convert': 20,
491
493
  'trade/one-click-repay': 20,
494
+ 'trade/one-click-repay-v2': 20,
492
495
  'trade/mass-cancel': 4,
493
496
  'trade/cancel-all-after': 10,
494
497
  # asset
@@ -1009,71 +1012,64 @@ class okx(Exchange, ImplicitAPI):
1009
1012
  'networks': {
1010
1013
  'BTC': 'Bitcoin',
1011
1014
  'BTCLN': 'Lightning',
1015
+ 'BTCLIGHTNING': 'Lightning',
1012
1016
  'BEP20': 'BSC',
1017
+ 'BRC20': 'BRC20',
1013
1018
  'ERC20': 'ERC20',
1014
1019
  'TRC20': 'TRC20',
1015
1020
  'CRC20': 'Crypto',
1016
- # sorted
1017
1021
  'ACA': 'Acala',
1018
1022
  'ALGO': 'Algorand',
1019
- 'BHP': 'BHP',
1020
1023
  'APT': 'Aptos',
1024
+ 'SCROLL': 'Scroll',
1021
1025
  'ARBONE': 'Arbitrum One',
1022
1026
  'AVAXC': 'Avalanche C-Chain',
1023
1027
  'AVAXX': 'Avalanche X-Chain',
1024
- 'ARK': 'ARK',
1028
+ 'BASE': 'Base',
1029
+ 'SUI': 'SUI',
1030
+ 'ZKSYNCERA': 'zkSync Era',
1031
+ 'LINEA': 'Linea',
1025
1032
  'AR': 'Arweave',
1026
1033
  'ASTR': 'Astar',
1027
1034
  'BCH': 'BitcoinCash',
1028
1035
  'BSV': 'Bitcoin SV',
1029
- 'BTM': 'Bytom',
1030
1036
  'ADA': 'Cardano',
1031
1037
  'CSPR': 'Casper',
1032
1038
  'CELO': 'CELO',
1033
1039
  'XCH': 'Chia',
1034
- 'CHZ': 'Chiliz',
1040
+ # 'CHZ': 'Chiliz', TBD: Chiliz 2.0 Chain vs Chiliz Chain
1035
1041
  'ATOM': 'Cosmos',
1036
- 'TRUE': 'TrueChain',
1037
- 'DCR': 'Decred',
1038
1042
  'DGB': 'Digibyte',
1039
1043
  'DOGE': 'Dogecoin',
1040
- 'XEC': 'XEC',
1041
1044
  'EGLD': 'Elrond',
1045
+ 'CFX': 'Conflux', # CFX_EVM is different
1042
1046
  'EOS': 'EOS',
1047
+ 'CORE': 'CORE',
1043
1048
  'ETC': 'Ethereum Classic',
1044
1049
  'ETHW': 'EthereumPow',
1045
- 'FTM': 'Fantom',
1050
+ # 'FTM': 'Fantom', 'Sonic' TBD
1046
1051
  'FIL': 'Filecoin',
1047
- 'FLOW': 'FLOW',
1048
- 'FSN': 'Fusion',
1049
1052
  'ONE': 'Harmony',
1050
1053
  'HBAR': 'Hedera',
1051
- 'HNT': 'Helium',
1052
- 'ZEN': 'Horizen',
1053
1054
  'ICX': 'ICON',
1054
1055
  'ICP': 'Dfinity',
1055
1056
  'IOST': 'IOST',
1056
1057
  'IOTA': 'MIOTA',
1057
- 'KDA': 'Kadena',
1058
- 'KAR': 'KAR',
1059
1058
  'KLAY': 'Klaytn',
1060
1059
  'KSM': 'Kusama',
1061
1060
  'LSK': 'Lisk',
1062
1061
  'LTC': 'Litecoin',
1063
1062
  'METIS': 'Metis',
1064
1063
  'MINA': 'Mina',
1065
- 'XMR': 'Monero',
1066
1064
  'GLRM': 'Moonbeam',
1067
1065
  'MOVR': 'Moonriver',
1068
1066
  'NANO': 'Nano',
1069
1067
  'NEAR': 'NEAR',
1070
- 'NAS': 'Nebulas',
1071
- 'NEM': 'New Economy Movement',
1072
1068
  'NULS': 'NULS',
1073
1069
  'OASYS': 'OASYS',
1074
- 'OKC': 'OKC',
1075
1070
  'ONT': 'Ontology',
1076
1071
  'OPTIMISM': 'Optimism',
1072
+ # 'OP': 'Optimism', or Optimism(V2), TBD
1077
1073
  'LAT': 'PlatON',
1078
1074
  'DOT': 'Polkadot',
1079
1075
  'MATIC': 'Polygon',
@@ -1086,35 +1082,54 @@ class okx(Exchange, ImplicitAPI):
1086
1082
  'XTZ': 'Tezos',
1087
1083
  'TON': 'TON',
1088
1084
  'THETA': 'Theta',
1089
- 'VSYS': 'VSYSTEMS',
1090
- 'WAVES': 'WAVES',
1091
1085
  'WAX': 'Wax',
1092
- 'ZEC': 'Zcash',
1093
1086
  'ZIL': 'Zilliqa',
1094
- 'ZKSYNC': 'ZKSYNC',
1095
- 'OMNI': 'Omni',
1096
- # 'NEON3': 'N3', # tbd
1097
- # undetermined : "CELO-TOKEN", "Digital Cash", Khala
1098
- # todo: uncomment below after consensus
1099
- # 'AELF': 'AELF',
1100
- # 'BITCOINDIAMOND': 'Bitcoin Diamond',
1101
- # 'BITCOINGOLD': 'BitcoinGold',
1102
- # 'YOYOW': 'YOYOW',
1103
- # 'QTUM': 'Quantum',
1104
- # 'INTCHAIN': 'INTCHAIN',
1105
- # 'YOUCHAIN': 'YOUCHAIN',
1106
- # 'RONIN': 'Ronin',
1107
- # 'OEC': 'OEC',
1108
- # 'WAYIKICHAIN': 'WGRT',
1109
- # 'MDNA': 'DNA',
1110
- # 'STEP': 'Step Network',
1111
- # 'EMINER': 'Eminer',
1112
- # 'CYBERMILES': 'CyberMiles',
1113
- # 'HYPERCASH': 'HyperCash',
1114
- # 'CONFLUX': 'Conflux',
1115
- # 'CORTEX': 'Cortex',
1116
- # 'TERRA': 'Terra',
1117
- # 'TERRACLASSIC': 'Terra Classic',
1087
+ # non-supported known network: CRP. KAVA, TAIKO, BOB, GNO, BLAST, RSK, SEI, MANTLE, HYPE, RUNE, OSMO, XIN, WEMIX, HT, FSN, NEO, TLOS, CANTO, SCRT, AURORA, XMR
1088
+ # others:
1089
+ # "OKTC",
1090
+ # "X Layer",
1091
+ # "Polygon(Bridged)",
1092
+ # "BTCK-OKTC",
1093
+ # "ETHK-OKTC",
1094
+ # "Starknet",
1095
+ # "LTCK-OKTC",
1096
+ # "XRPK-OKTC",
1097
+ # "BCHK-OKTC",
1098
+ # "ETCK-OKTC",
1099
+ # "Endurance Smart Chain",
1100
+ # "Berachain",
1101
+ # "CELO-TOKEN",
1102
+ # "CFX_EVM",
1103
+ # "Cortex",
1104
+ # "DAIK-OKTC",
1105
+ # "Dora Vota Mainnet",
1106
+ # "DOTK-OKTC",
1107
+ # "DYDX",
1108
+ # "AELF",
1109
+ # "Enjin Relay Chain",
1110
+ # "FEVM",
1111
+ # "FILK-OKTC",
1112
+ # "Flare",
1113
+ # "Gravity Alpha Mainnet",
1114
+ # "INJ",
1115
+ # "Story",
1116
+ # "LINKK-OKTC",
1117
+ # "Terra",
1118
+ # "Terra Classic",
1119
+ # "Terra Classic(USTC)",
1120
+ # "MERLIN Network",
1121
+ # "Layer 3",
1122
+ # "PI",
1123
+ # "Ronin",
1124
+ # "Quantum",
1125
+ # "SHIBK-OKTC",
1126
+ # "SUSHIK-OKTC",
1127
+ # "Celestia",
1128
+ # "TRXK-OKTC",
1129
+ # "UNIK-OKTC",
1130
+ # "Venom",
1131
+ # "WBTCK-OKTC",
1132
+ # "ZetaChain",
1118
1133
  },
1119
1134
  'fetchOpenInterestHistory': {
1120
1135
  'timeframes': {
@@ -3043,6 +3058,7 @@ class okx(Exchange, ImplicitAPI):
3043
3058
  :param str [params.trailingPercent]: the percent to trail away from the current market price
3044
3059
  :param str [params.tpOrdKind]: 'condition' or 'limit', the default is 'condition'
3045
3060
  :param bool [params.hedged]: *swap and future only* True for hedged mode, False for one way mode
3061
+ :param str [params.marginMode]: 'cross' or 'isolated', the default is 'cross'
3046
3062
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
3047
3063
  """
3048
3064
  self.load_markets()