ccxt 4.3.88__py2.py3-none-any.whl → 4.3.90__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 (105) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ace.py +1 -0
  3. ccxt/alpaca.py +3 -2
  4. ccxt/ascendex.py +102 -116
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +1 -0
  7. ccxt/async_support/alpaca.py +3 -2
  8. ccxt/async_support/ascendex.py +102 -116
  9. ccxt/async_support/base/exchange.py +1 -1
  10. ccxt/async_support/bigone.py +1 -0
  11. ccxt/async_support/bingx.py +30 -17
  12. ccxt/async_support/bit2c.py +1 -0
  13. ccxt/async_support/bitbank.py +1 -0
  14. ccxt/async_support/bitfinex.py +1 -0
  15. ccxt/async_support/bitfinex2.py +21 -22
  16. ccxt/async_support/bitflyer.py +1 -0
  17. ccxt/async_support/bitget.py +3 -2
  18. ccxt/async_support/bitmart.py +4 -8
  19. ccxt/async_support/bitmex.py +1 -0
  20. ccxt/async_support/bitopro.py +1 -0
  21. ccxt/async_support/bitrue.py +62 -71
  22. ccxt/async_support/bitso.py +1 -0
  23. ccxt/async_support/bitstamp.py +1 -0
  24. ccxt/async_support/bitvavo.py +1 -0
  25. ccxt/async_support/blockchaincom.py +1 -0
  26. ccxt/async_support/btcalpha.py +1 -0
  27. ccxt/async_support/btcbox.py +1 -0
  28. ccxt/async_support/btcmarkets.py +1 -0
  29. ccxt/async_support/bybit.py +2 -0
  30. ccxt/async_support/cex.py +1 -0
  31. ccxt/async_support/coinbaseexchange.py +1 -0
  32. ccxt/async_support/coinbaseinternational.py +2 -1
  33. ccxt/async_support/coinex.py +1 -16
  34. ccxt/async_support/cryptocom.py +0 -12
  35. ccxt/async_support/hitbtc.py +1 -0
  36. ccxt/async_support/huobijp.py +0 -8
  37. ccxt/async_support/kraken.py +48 -48
  38. ccxt/async_support/latoken.py +1 -0
  39. ccxt/async_support/mexc.py +1 -61
  40. ccxt/async_support/okcoin.py +4 -9
  41. ccxt/async_support/okx.py +1 -8
  42. ccxt/async_support/onetrading.py +1 -0
  43. ccxt/async_support/phemex.py +1 -0
  44. ccxt/async_support/poloniexfutures.py +1 -0
  45. ccxt/async_support/probit.py +1 -0
  46. ccxt/async_support/vertex.py +1 -0
  47. ccxt/async_support/whitebit.py +5 -3
  48. ccxt/async_support/woo.py +1 -0
  49. ccxt/async_support/woofipro.py +1 -0
  50. ccxt/base/exchange.py +6 -4
  51. ccxt/bigone.py +1 -0
  52. ccxt/bingx.py +30 -17
  53. ccxt/bit2c.py +1 -0
  54. ccxt/bitbank.py +1 -0
  55. ccxt/bitfinex.py +1 -0
  56. ccxt/bitfinex2.py +21 -22
  57. ccxt/bitflyer.py +1 -0
  58. ccxt/bitget.py +3 -2
  59. ccxt/bitmart.py +4 -8
  60. ccxt/bitmex.py +1 -0
  61. ccxt/bitopro.py +1 -0
  62. ccxt/bitrue.py +62 -71
  63. ccxt/bitso.py +1 -0
  64. ccxt/bitstamp.py +1 -0
  65. ccxt/bitvavo.py +1 -0
  66. ccxt/blockchaincom.py +1 -0
  67. ccxt/btcalpha.py +1 -0
  68. ccxt/btcbox.py +1 -0
  69. ccxt/btcmarkets.py +1 -0
  70. ccxt/bybit.py +2 -0
  71. ccxt/cex.py +1 -0
  72. ccxt/coinbaseexchange.py +1 -0
  73. ccxt/coinbaseinternational.py +2 -1
  74. ccxt/coinex.py +1 -16
  75. ccxt/cryptocom.py +0 -12
  76. ccxt/hitbtc.py +1 -0
  77. ccxt/huobijp.py +0 -8
  78. ccxt/kraken.py +48 -48
  79. ccxt/latoken.py +1 -0
  80. ccxt/mexc.py +1 -61
  81. ccxt/okcoin.py +4 -9
  82. ccxt/okx.py +1 -8
  83. ccxt/onetrading.py +1 -0
  84. ccxt/phemex.py +1 -0
  85. ccxt/poloniexfutures.py +1 -0
  86. ccxt/pro/__init__.py +1 -1
  87. ccxt/pro/binance.py +280 -0
  88. ccxt/pro/bingx.py +235 -85
  89. ccxt/pro/bithumb.py +4 -0
  90. ccxt/pro/bitvavo.py +1 -0
  91. ccxt/pro/bybit.py +253 -2
  92. ccxt/pro/cex.py +1 -0
  93. ccxt/pro/coinex.py +941 -662
  94. ccxt/pro/lbank.py +1 -2
  95. ccxt/pro/okx.py +142 -2
  96. ccxt/probit.py +1 -0
  97. ccxt/vertex.py +1 -0
  98. ccxt/whitebit.py +5 -3
  99. ccxt/woo.py +1 -0
  100. ccxt/woofipro.py +1 -0
  101. {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/METADATA +4 -4
  102. {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/RECORD +105 -105
  103. {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/LICENSE.txt +0 -0
  104. {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/WHEEL +0 -0
  105. {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/top_level.txt +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.3.88'
5
+ __version__ = '4.3.90'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -1564,6 +1564,7 @@ class bigone(Exchange, ImplicitAPI):
1564
1564
  """
1565
1565
  fetches information on an order made by the user
1566
1566
  :see: https://open.big.one/docs/spot_orders.html#get-one-order
1567
+ :param str id: the order id
1567
1568
  :param str symbol: not used by bigone fetchOrder
1568
1569
  :param dict [params]: extra parameters specific to the exchange API endpoint
1569
1570
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1036,8 +1036,7 @@ class bingx(Exchange, ImplicitAPI):
1036
1036
 
1037
1037
  def parse_trade(self, trade: dict, market: Market = None) -> Trade:
1038
1038
  #
1039
- # spot
1040
- # fetchTrades
1039
+ # spot fetchTrades
1041
1040
  #
1042
1041
  # {
1043
1042
  # "id": 43148253,
@@ -1047,8 +1046,8 @@ class bingx(Exchange, ImplicitAPI):
1047
1046
  # "buyerMaker": False
1048
1047
  # }
1049
1048
  #
1050
- # spot
1051
- # fetchMyTrades
1049
+ # spot fetchMyTrades
1050
+ #
1052
1051
  # {
1053
1052
  # "symbol": "LTC-USDT",
1054
1053
  # "id": 36237072,
@@ -1063,8 +1062,7 @@ class bingx(Exchange, ImplicitAPI):
1063
1062
  # "isMaker": False
1064
1063
  # }
1065
1064
  #
1066
- # swap
1067
- # fetchTrades
1065
+ # swap fetchTrades
1068
1066
  #
1069
1067
  # {
1070
1068
  # "time": 1672025549368,
@@ -1074,8 +1072,7 @@ class bingx(Exchange, ImplicitAPI):
1074
1072
  # "quoteQty": "55723.87"
1075
1073
  # }
1076
1074
  #
1077
- # swap
1078
- # fetchMyTrades
1075
+ # swap fetchMyTrades
1079
1076
  #
1080
1077
  # {
1081
1078
  # "volume": "0.1",
@@ -1089,10 +1086,7 @@ class bingx(Exchange, ImplicitAPI):
1089
1086
  # "filledTime": "2023-07-04T20:56:01.000+0800"
1090
1087
  # }
1091
1088
  #
1092
- #
1093
- # ws
1094
- #
1095
- # spot
1089
+ # ws spot
1096
1090
  #
1097
1091
  # {
1098
1092
  # "E": 1690214529432,
@@ -1105,7 +1099,7 @@ class bingx(Exchange, ImplicitAPI):
1105
1099
  # "t": "57903921"
1106
1100
  # }
1107
1101
  #
1108
- # swap
1102
+ # ws linear swap
1109
1103
  #
1110
1104
  # {
1111
1105
  # "q": "0.0421",
@@ -1115,6 +1109,19 @@ class bingx(Exchange, ImplicitAPI):
1115
1109
  # "s": "BTC-USDT"
1116
1110
  # }
1117
1111
  #
1112
+ # ws inverse swap
1113
+ #
1114
+ # {
1115
+ # "e": "trade",
1116
+ # "E": 1722920589665,
1117
+ # "s": "BTC-USD",
1118
+ # "t": "39125001",
1119
+ # "p": "55360.0",
1120
+ # "q": "1",
1121
+ # "T": 1722920589582,
1122
+ # "m": False
1123
+ # }
1124
+ #
1118
1125
  # inverse swap fetchMyTrades
1119
1126
  #
1120
1127
  # {
@@ -2399,13 +2406,17 @@ class bingx(Exchange, ImplicitAPI):
2399
2406
  tpRequest['quantity'] = self.parse_to_numeric(self.amount_to_precision(symbol, tkQuantity))
2400
2407
  request['takeProfit'] = self.json(tpRequest)
2401
2408
  positionSide = None
2402
- if reduceOnly:
2403
- positionSide = 'SHORT' if (side == 'buy') else 'LONG'
2409
+ hedged = self.safe_bool(params, 'hedged', False)
2410
+ if hedged:
2411
+ if reduceOnly:
2412
+ positionSide = 'SHORT' if (side == 'buy') else 'LONG'
2413
+ else:
2414
+ positionSide = 'LONG' if (side == 'buy') else 'SHORT'
2404
2415
  else:
2405
- positionSide = 'LONG' if (side == 'buy') else 'SHORT'
2416
+ positionSide = 'BOTH'
2406
2417
  request['positionSide'] = positionSide
2407
2418
  request['quantity'] = amount if (market['inverse']) else self.parse_to_numeric(self.amount_to_precision(symbol, amount)) # precision not available for inverse contracts
2408
- params = self.omit(params, ['reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId'])
2419
+ params = self.omit(params, ['hedged', 'reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId'])
2409
2420
  return self.extend(request, params)
2410
2421
 
2411
2422
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
@@ -2435,6 +2446,7 @@ class bingx(Exchange, ImplicitAPI):
2435
2446
  :param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
2436
2447
  :param float [params.stopLoss.triggerPrice]: stop loss trigger price
2437
2448
  :param boolean [params.test]: *swap only* whether to use the test endpoint or not, default is False
2449
+ :param boolean [params.hedged]: *swap only* whether the order is in hedged mode or one way mode
2438
2450
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2439
2451
  """
2440
2452
  await self.load_markets()
@@ -3426,6 +3438,7 @@ class bingx(Exchange, ImplicitAPI):
3426
3438
  :see: https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20details
3427
3439
  :see: https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20details
3428
3440
  :see: https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order
3441
+ :param str id: the order id
3429
3442
  :param str symbol: unified symbol of the market the order was made in
3430
3443
  :param dict [params]: extra parameters specific to the exchange API endpoint
3431
3444
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -478,6 +478,7 @@ class bit2c(Exchange, ImplicitAPI):
478
478
  """
479
479
  fetches information on an order made by the user
480
480
  :see: https://bit2c.co.il/home/api#getoid
481
+ :param str id: the order id
481
482
  :param str symbol: unified market symbol
482
483
  :param dict [params]: extra parameters specific to the exchange API endpoint
483
484
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -699,6 +699,7 @@ class bitbank(Exchange, ImplicitAPI):
699
699
  """
700
700
  fetches information on an order made by the user
701
701
  :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-order-information
702
+ :param str id: the order id
702
703
  :param str symbol: unified symbol of the market the order was made in
703
704
  :param dict [params]: extra parameters specific to the exchange API endpoint
704
705
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1272,6 +1272,7 @@ class bitfinex(Exchange, ImplicitAPI):
1272
1272
  """
1273
1273
  fetches information on an order made by the user
1274
1274
  :see: https://docs.bitfinex.com/v1/reference/rest-auth-order-status
1275
+ :param str id: the order id
1275
1276
  :param str symbol: not used by bitfinex fetchOrder
1276
1277
  :param dict [params]: extra parameters specific to the exchange API endpoint
1277
1278
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -397,6 +397,25 @@ class bitfinex2(Exchange, ImplicitAPI):
397
397
  'withdraw': {
398
398
  'includeFee': False,
399
399
  },
400
+ 'networks': {
401
+ 'BTC': 'BITCOIN',
402
+ 'LTC': 'LITECOIN',
403
+ 'ERC20': 'ETHEREUM',
404
+ 'OMNI': 'TETHERUSO',
405
+ 'LIQUID': 'TETHERUSL',
406
+ 'TRC20': 'TETHERUSX',
407
+ 'EOS': 'TETHERUSS',
408
+ 'AVAX': 'TETHERUSDTAVAX',
409
+ 'SOL': 'TETHERUSDTSOL',
410
+ 'ALGO': 'TETHERUSDTALG',
411
+ 'BCH': 'TETHERUSDTBCH',
412
+ 'KSM': 'TETHERUSDTKSM',
413
+ 'DVF': 'TETHERUSDTDVF',
414
+ 'OMG': 'TETHERUSDTOMG',
415
+ },
416
+ 'networksById': {
417
+ 'TETHERUSE': 'ERC20',
418
+ },
400
419
  },
401
420
  'exceptions': {
402
421
  'exact': {
@@ -791,7 +810,7 @@ class bitfinex2(Exchange, ImplicitAPI):
791
810
  networkId = self.safe_string(pair, 0)
792
811
  currencyId = self.safe_string(self.safe_value(pair, 1, []), 0)
793
812
  if currencyId == cleanId:
794
- network = self.safe_network(networkId)
813
+ network = self.network_id_to_code(networkId)
795
814
  networks[network] = {
796
815
  'info': networkId,
797
816
  'id': networkId.lower(),
@@ -814,26 +833,6 @@ class bitfinex2(Exchange, ImplicitAPI):
814
833
  result[code]['networks'] = networks
815
834
  return result
816
835
 
817
- def safe_network(self, networkId):
818
- networksById: dict = {
819
- 'BITCOIN': 'BTC',
820
- 'LITECOIN': 'LTC',
821
- 'ETHEREUM': 'ERC20',
822
- 'TETHERUSE': 'ERC20',
823
- 'TETHERUSO': 'OMNI',
824
- 'TETHERUSL': 'LIQUID',
825
- 'TETHERUSX': 'TRC20',
826
- 'TETHERUSS': 'EOS',
827
- 'TETHERUSDTAVAX': 'AVAX',
828
- 'TETHERUSDTSOL': 'SOL',
829
- 'TETHERUSDTALG': 'ALGO',
830
- 'TETHERUSDTBCH': 'BCH',
831
- 'TETHERUSDTKSM': 'KSM',
832
- 'TETHERUSDTDVF': 'DVF',
833
- 'TETHERUSDTOMG': 'OMG',
834
- }
835
- return self.safe_string(networksById, networkId, networkId)
836
-
837
836
  async def fetch_balance(self, params={}) -> Balances:
838
837
  """
839
838
  query for balance and get the amount of funds available for trading or funds locked in orders
@@ -2249,7 +2248,7 @@ class bitfinex2(Exchange, ImplicitAPI):
2249
2248
  currencyId = self.safe_string(transaction, 1)
2250
2249
  code = self.safe_currency_code(currencyId, currency)
2251
2250
  networkId = self.safe_string(transaction, 2)
2252
- network = self.safe_network(networkId)
2251
+ network = self.network_id_to_code(networkId)
2253
2252
  timestamp = self.safe_integer(transaction, 5)
2254
2253
  updated = self.safe_integer(transaction, 6)
2255
2254
  status = self.parse_transaction_status(self.safe_string(transaction, 9))
@@ -687,6 +687,7 @@ class bitflyer(Exchange, ImplicitAPI):
687
687
  """
688
688
  fetches information on an order made by the user
689
689
  :see: https://lightning.bitflyer.com/docs?lang=en#list-orders
690
+ :param str id: the order id
690
691
  :param str symbol: unified symbol of the market the order was made in
691
692
  :param dict [params]: extra parameters specific to the exchange API endpoint
692
693
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -3847,7 +3847,7 @@ class bitget(Exchange, ImplicitAPI):
3847
3847
  if feeCostString is not None:
3848
3848
  # swap
3849
3849
  fee = {
3850
- 'cost': self.parse_number(Precise.string_abs(feeCostString)),
3850
+ 'cost': self.parse_number(Precise.string_neg(feeCostString)),
3851
3851
  'currency': market['settle'],
3852
3852
  }
3853
3853
  feeDetail = self.safe_value(order, 'feeDetail')
@@ -3861,7 +3861,7 @@ class bitget(Exchange, ImplicitAPI):
3861
3861
  feeObject = feeValue
3862
3862
  break
3863
3863
  fee = {
3864
- 'cost': self.parse_number(Precise.string_abs(self.safe_string(feeObject, 'totalFee'))),
3864
+ 'cost': self.parse_number(Precise.string_neg(self.safe_string(feeObject, 'totalFee'))),
3865
3865
  'currency': self.safe_currency_code(self.safe_string(feeObject, 'feeCoinCode')),
3866
3866
  }
3867
3867
  postOnly = None
@@ -4771,6 +4771,7 @@ class bitget(Exchange, ImplicitAPI):
4771
4771
  fetches information on an order made by the user
4772
4772
  :see: https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
4773
4773
  :see: https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
4774
+ :param str id: the order id
4774
4775
  :param str symbol: unified symbol of the market the order was made in
4775
4776
  :param dict [params]: extra parameters specific to the exchange API endpoint
4776
4777
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -3209,7 +3209,10 @@ class bitmart(Exchange, ImplicitAPI):
3209
3209
  parts = chain.split('-')
3210
3210
  partsLength = len(parts)
3211
3211
  networkId = self.safe_string(parts, partsLength - 1)
3212
- network = self.safe_network_code(networkId, currency)
3212
+ if networkId == self.safe_string(currency, 'name'):
3213
+ network = self.safe_string(currency, 'code')
3214
+ else:
3215
+ network = self.network_id_to_code(networkId)
3213
3216
  self.check_address(address)
3214
3217
  return {
3215
3218
  'info': depositAddress,
@@ -3219,13 +3222,6 @@ class bitmart(Exchange, ImplicitAPI):
3219
3222
  'network': network,
3220
3223
  }
3221
3224
 
3222
- def safe_network_code(self, networkId, currency=None):
3223
- name = self.safe_string(currency, 'name')
3224
- if networkId == name:
3225
- code = self.safe_string(currency, 'code')
3226
- return code
3227
- return self.network_id_to_code(networkId)
3228
-
3229
3225
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
3230
3226
  """
3231
3227
  make a withdrawal
@@ -861,6 +861,7 @@ class bitmex(Exchange, ImplicitAPI):
861
861
  """
862
862
  fetches information on an order made by the user
863
863
  :see: https://www.bitmex.com/api/explorer/#not /Order/Order_getOrders
864
+ :param str id: the order id
864
865
  :param str symbol: unified symbol of the market the order was made in
865
866
  :param dict [params]: extra parameters specific to the exchange API endpoint
866
867
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1118,6 +1118,7 @@ class bitopro(Exchange, ImplicitAPI):
1118
1118
  """
1119
1119
  fetches information on an order made by the user
1120
1120
  :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_an_order_data.md
1121
+ :param str id: the order id
1121
1122
  :param str symbol: unified symbol of the market the order was made in
1122
1123
  :param dict [params]: extra parameters specific to the exchange API endpoint
1123
1124
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -356,6 +356,67 @@ class bitrue(Exchange, ImplicitAPI):
356
356
  'networks': {
357
357
  'ERC20': 'ETH',
358
358
  'TRC20': 'TRX',
359
+ 'AETERNITY': 'Aeternity',
360
+ 'AION': 'AION',
361
+ 'ALGO': 'Algorand',
362
+ 'ASK': 'ASK',
363
+ 'ATOM': 'ATOM',
364
+ 'AVAXC': 'AVAX C-Chain',
365
+ 'BCH': 'BCH',
366
+ 'BEP2': 'BEP2',
367
+ 'BEP20': 'BEP20',
368
+ 'Bitcoin': 'Bitcoin',
369
+ 'BRP20': 'BRP20',
370
+ 'ADA': 'Cardano',
371
+ 'CASINOCOIN': 'CasinoCoin',
372
+ 'CASINOCOIN-XRPL': 'CasinoCoin XRPL',
373
+ 'CONTENTOS': 'Contentos',
374
+ 'DASH': 'Dash',
375
+ 'DECOIN': 'Decoin',
376
+ 'DFI': 'DeFiChain',
377
+ 'DGB': 'DGB',
378
+ 'DIVI': 'Divi',
379
+ 'DOGE': 'dogecoin',
380
+ 'EOS': 'EOS',
381
+ 'ETC': 'ETC',
382
+ 'FILECOIN': 'Filecoin',
383
+ 'FREETON': 'FREETON',
384
+ 'HBAR': 'HBAR',
385
+ 'HEDERA': 'Hedera Hashgraph',
386
+ 'HRC20': 'HRC20',
387
+ 'ICON': 'ICON',
388
+ 'ICP': 'ICP',
389
+ 'IGNIS': 'Ignis',
390
+ 'INTERNETCOMPUTER': 'Internet Computer',
391
+ 'IOTA': 'IOTA',
392
+ 'KAVA': 'KAVA',
393
+ 'KSM': 'KSM',
394
+ 'LTC': 'LiteCoin',
395
+ 'LUNA': 'Luna',
396
+ 'MATIC': 'MATIC',
397
+ 'MOBILECOIN': 'Mobile Coin',
398
+ 'MONACOIN': 'MonaCoin',
399
+ 'XMR': 'Monero',
400
+ 'NEM': 'NEM',
401
+ 'NEP5': 'NEP5',
402
+ 'OMNI': 'OMNI',
403
+ 'PAC': 'PAC',
404
+ 'DOT': 'Polkadot',
405
+ 'RAVEN': 'Ravencoin',
406
+ 'SAFEX': 'Safex',
407
+ 'SOL': 'SOLANA',
408
+ 'SGB': 'Songbird',
409
+ 'XML': 'Stellar Lumens',
410
+ 'XYM': 'Symbol',
411
+ 'XTZ': 'Tezos',
412
+ 'theta': 'theta',
413
+ 'THETA': 'THETA',
414
+ 'VECHAIN': 'VeChain',
415
+ 'WANCHAIN': 'Wanchain',
416
+ 'XINFIN': 'XinFin Network',
417
+ 'XRP': 'XRP',
418
+ 'XRPL': 'XRPL',
419
+ 'ZIL': 'ZIL',
359
420
  },
360
421
  'defaultType': 'spot',
361
422
  'timeframes': {
@@ -522,77 +583,6 @@ class bitrue(Exchange, ImplicitAPI):
522
583
  #
523
584
  return self.safe_integer(response, 'serverTime')
524
585
 
525
- def safe_network(self, networkId):
526
- uppercaseNetworkId = networkId.upper()
527
- networksById: dict = {
528
- 'Aeternity': 'Aeternity',
529
- 'AION': 'AION',
530
- 'Algorand': 'Algorand',
531
- 'ASK': 'ASK',
532
- 'ATOM': 'ATOM',
533
- 'AVAX C-Chain': 'AVAX C-Chain',
534
- 'bch': 'bch',
535
- 'BCH': 'BCH',
536
- 'BEP2': 'BEP2',
537
- 'BEP20': 'BEP20',
538
- 'Bitcoin': 'Bitcoin',
539
- 'BRP20': 'BRP20',
540
- 'Cardano': 'ADA',
541
- 'CasinoCoin': 'CasinoCoin',
542
- 'CasinoCoin XRPL': 'CasinoCoin XRPL',
543
- 'Contentos': 'Contentos',
544
- 'Dash': 'Dash',
545
- 'Decoin': 'Decoin',
546
- 'DeFiChain': 'DeFiChain',
547
- 'DGB': 'DGB',
548
- 'Divi': 'Divi',
549
- 'dogecoin': 'DOGE',
550
- 'EOS': 'EOS',
551
- 'ERC20': 'ERC20',
552
- 'ETC': 'ETC',
553
- 'Filecoin': 'Filecoin',
554
- 'FREETON': 'FREETON',
555
- 'HBAR': 'HBAR',
556
- 'Hedera Hashgraph': 'Hedera Hashgraph',
557
- 'HRC20': 'HRC20',
558
- 'ICON': 'ICON',
559
- 'ICP': 'ICP',
560
- 'Ignis': 'Ignis',
561
- 'Internet Computer': 'Internet Computer',
562
- 'IOTA': 'IOTA',
563
- 'KAVA': 'KAVA',
564
- 'KSM': 'KSM',
565
- 'LiteCoin': 'LiteCoin',
566
- 'Luna': 'Luna',
567
- 'MATIC': 'MATIC',
568
- 'Mobile Coin': 'Mobile Coin',
569
- 'MonaCoin': 'MonaCoin',
570
- 'Monero': 'Monero',
571
- 'NEM': 'NEM',
572
- 'NEP5': 'NEP5',
573
- 'OMNI': 'OMNI',
574
- 'PAC': 'PAC',
575
- 'Polkadot': 'Polkadot',
576
- 'Ravencoin': 'Ravencoin',
577
- 'Safex': 'Safex',
578
- 'SOLANA': 'SOL',
579
- 'Songbird': 'Songbird',
580
- 'Stellar Lumens': 'Stellar Lumens',
581
- 'Symbol': 'Symbol',
582
- 'Tezos': 'XTZ',
583
- 'theta': 'theta',
584
- 'THETA': 'THETA',
585
- 'TRC20': 'TRC20',
586
- 'VeChain': 'VeChain',
587
- 'VECHAIN': 'VECHAIN',
588
- 'Wanchain': 'Wanchain',
589
- 'XinFin Network': 'XinFin Network',
590
- 'XRP': 'XRP',
591
- 'XRPL': 'XRPL',
592
- 'ZIL': 'ZIL',
593
- }
594
- return self.safe_string_2(networksById, networkId, uppercaseNetworkId, networkId)
595
-
596
586
  async def fetch_currencies(self, params={}) -> Currencies:
597
587
  """
598
588
  fetches all available currencies on an exchange
@@ -1942,6 +1932,7 @@ class bitrue(Exchange, ImplicitAPI):
1942
1932
  :see: https://github.com/Bitrue-exchange/Spot-official-api-docs#query-order-user_data
1943
1933
  :see: https://www.bitrue.com/api-docs#query-order-user_data-hmac-sha256
1944
1934
  :see: https://www.bitrue.com/api_docs_includes_file/delivery.html#query-order-user_data-hmac-sha256
1935
+ :param str id: the order id
1945
1936
  :param str symbol: unified symbol of the market the order was made in
1946
1937
  :param dict [params]: extra parameters specific to the exchange API endpoint
1947
1938
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1129,6 +1129,7 @@ class bitso(Exchange, ImplicitAPI):
1129
1129
  """
1130
1130
  fetches information on an order made by the user
1131
1131
  :see: https://docs.bitso.com/bitso-api/docs/look-up-orders
1132
+ :param str id: the order id
1132
1133
  :param str symbol: not used by bitso fetchOrder
1133
1134
  :param dict [params]: extra parameters specific to the exchange API endpoint
1134
1135
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1466,6 +1466,7 @@ class bitstamp(Exchange, ImplicitAPI):
1466
1466
  """
1467
1467
  fetches information on an order made by the user
1468
1468
  :see: https://www.bitstamp.net/api/#tag/Orders/operation/GetOrderStatus
1469
+ :param str id: the order id
1469
1470
  :param str symbol: unified symbol of the market the order was made in
1470
1471
  :param dict [params]: extra parameters specific to the exchange API endpoint
1471
1472
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1255,6 +1255,7 @@ class bitvavo(Exchange, ImplicitAPI):
1255
1255
  """
1256
1256
  fetches information on an order made by the user
1257
1257
  :see: https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1order/get
1258
+ :param str id: the order id
1258
1259
  :param str symbol: unified symbol of the market the order was made in
1259
1260
  :param dict [params]: extra parameters specific to the exchange API endpoint
1260
1261
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1036,6 +1036,7 @@ class blockchaincom(Exchange, ImplicitAPI):
1036
1036
  """
1037
1037
  fetches information on an order made by the user
1038
1038
  :see: https://api.blockchain.com/v3/#getorderbyid
1039
+ :param str id: the order id
1039
1040
  :param str symbol: not used by blockchaincom fetchOrder
1040
1041
  :param dict [params]: extra parameters specific to the exchange API endpoint
1041
1042
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -760,6 +760,7 @@ class btcalpha(Exchange, ImplicitAPI):
760
760
  """
761
761
  :see: https://btc-alpha.github.io/api-docs/#retrieve-single-order
762
762
  fetches information on an order made by the user
763
+ :param str id: the order id
763
764
  :param str symbol: not used by btcalpha fetchOrder
764
765
  :param dict [params]: extra parameters specific to the exchange API endpoint
765
766
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -549,6 +549,7 @@ class btcbox(Exchange, ImplicitAPI):
549
549
  """
550
550
  fetches information on an order made by the user
551
551
  :see: https://blog.btcbox.jp/en/archives/8762#toc16
552
+ :param str id: the order id
552
553
  :param str symbol: unified symbol of the market the order was made in
553
554
  :param dict [params]: extra parameters specific to the exchange API endpoint
554
555
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1018,6 +1018,7 @@ class btcmarkets(Exchange, ImplicitAPI):
1018
1018
  """
1019
1019
  fetches information on an order made by the user
1020
1020
  :see: https://docs.btcmarkets.net/v3/#operation/getOrderById
1021
+ :param str id: the order id
1021
1022
  :param str symbol: not used by btcmarkets fetchOrder
1022
1023
  :param dict [params]: extra parameters specific to the exchange API endpoint
1023
1024
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -4494,6 +4494,7 @@ class bybit(Exchange, ImplicitAPI):
4494
4494
  """
4495
4495
  fetches information on an order made by the user *classic accounts only*
4496
4496
  :see: https://bybit-exchange.github.io/docs/v5/order/order-list
4497
+ :param str id: the order id
4497
4498
  :param str symbol: unified symbol of the market the order was made in
4498
4499
  :param dict [params]: extra parameters specific to the exchange API endpoint
4499
4500
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -4521,6 +4522,7 @@ class bybit(Exchange, ImplicitAPI):
4521
4522
  """
4522
4523
  *classic accounts only/ spot not supported* fetches information on an order made by the user *classic accounts only*
4523
4524
  :see: https://bybit-exchange.github.io/docs/v5/order/order-list
4525
+ :param str id: the order id
4524
4526
  :param str symbol: unified symbol of the market the order was made in
4525
4527
  :param dict [params]: extra parameters specific to the exchange API endpoint
4526
4528
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
ccxt/async_support/cex.py CHANGED
@@ -1149,6 +1149,7 @@ class cex(Exchange, ImplicitAPI):
1149
1149
  """
1150
1150
  :see: https://docs.cex.io/?python#get-order-details
1151
1151
  fetches information on an order made by the user
1152
+ :param str id: the order id
1152
1153
  :param str symbol: not used by cex fetchOrder
1153
1154
  :param dict [params]: extra parameters specific to the exchange API endpoint
1154
1155
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1047,6 +1047,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
1047
1047
  """
1048
1048
  :see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorder
1049
1049
  fetches information on an order made by the user
1050
+ :param str id: the order id
1050
1051
  :param str symbol: not used by coinbaseexchange fetchOrder
1051
1052
  :param dict [params]: extra parameters specific to the exchange API endpoint
1052
1053
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -754,11 +754,12 @@ class coinbaseinternational(Exchange, ImplicitAPI):
754
754
  currencyId = self.safe_string(network, 'asset_name')
755
755
  currencyCode = self.safe_currency_code(currencyId)
756
756
  networkId = self.safe_string(network, 'network_arn_id')
757
+ networkIdForCode = self.safe_string_n(network, ['network_name', 'display_name', 'network_arn_id'], '')
757
758
  return self.safe_network({
758
759
  'info': network,
759
760
  'id': networkId,
760
761
  'name': self.safe_string(network, 'display_name'),
761
- 'network': self.network_id_to_code(self.safe_string_n(network, ['network_name', 'display_name', 'network_arn_id'], ''), currencyCode),
762
+ 'network': self.network_id_to_code(networkIdForCode, currencyCode),
762
763
  'active': None,
763
764
  'deposit': None,
764
765
  'withdraw': None,
@@ -3559,24 +3559,9 @@ class coinex(Exchange, ImplicitAPI):
3559
3559
  options = self.safe_dict(self.options, 'fetchDepositAddress', {})
3560
3560
  fillResponseFromRequest = self.safe_bool(options, 'fillResponseFromRequest', True)
3561
3561
  if fillResponseFromRequest:
3562
- depositAddress['network'] = self.safe_network_code(network, currency)
3562
+ depositAddress['network'] = self.network_id_to_code(network, currency).upper()
3563
3563
  return depositAddress
3564
3564
 
3565
- def safe_network(self, networkId, currency: Currency = None):
3566
- networks = self.safe_value(currency, 'networks', {})
3567
- networksCodes = list(networks.keys())
3568
- networksCodesLength = len(networksCodes)
3569
- if networkId is None and networksCodesLength == 1:
3570
- return networks[networksCodes[0]]
3571
- return {
3572
- 'id': networkId,
3573
- 'network': None if (networkId is None) else networkId.upper(),
3574
- }
3575
-
3576
- def safe_network_code(self, networkId, currency: Currency = None):
3577
- network = self.safe_network(networkId, currency)
3578
- return network['network']
3579
-
3580
3565
  def parse_deposit_address(self, depositAddress, currency: Currency = None):
3581
3566
  #
3582
3567
  # {
@@ -1673,18 +1673,6 @@ class cryptocom(Exchange, ImplicitAPI):
1673
1673
  keys = list(depositAddresses.keys())
1674
1674
  return depositAddresses[keys[0]]
1675
1675
 
1676
- def safe_network(self, networkId):
1677
- networksById: dict = {
1678
- 'BTC': 'BTC',
1679
- 'ETH': 'ETH',
1680
- 'SOL': 'SOL',
1681
- 'BNB': 'BNB',
1682
- 'CRONOS': 'CRONOS',
1683
- 'MATIC': 'MATIC',
1684
- 'OP': 'OP',
1685
- }
1686
- return self.safe_string(networksById, networkId, networkId)
1687
-
1688
1676
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1689
1677
  """
1690
1678
  fetch all deposits made to an account
@@ -1371,6 +1371,7 @@ class hitbtc(Exchange, ImplicitAPI):
1371
1371
  statuses: dict = {
1372
1372
  'PENDING': 'pending',
1373
1373
  'FAILED': 'failed',
1374
+ 'ROLLED_BACK': 'failed',
1374
1375
  'SUCCESS': 'ok',
1375
1376
  }
1376
1377
  return self.safe_string(statuses, status, status)