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
@@ -1564,14 +1564,6 @@ class huobijp(Exchange, ImplicitAPI):
1564
1564
  def currency_to_precision(self, code, fee, networkCode=None):
1565
1565
  return self.decimal_to_precision(fee, 0, self.currencies[code]['precision'], self.precisionMode)
1566
1566
 
1567
- def safe_network(self, networkId):
1568
- lastCharacterIndex = len(networkId) - 1
1569
- lastCharacter = networkId[lastCharacterIndex]
1570
- if lastCharacter == '1':
1571
- networkId = networkId[0:lastCharacterIndex]
1572
- networksById: dict = {}
1573
- return self.safe_string(networksById, networkId, networkId)
1574
-
1575
1567
  def parse_deposit_address(self, depositAddress, currency: Currency = None):
1576
1568
  #
1577
1569
  # {
@@ -258,100 +258,100 @@ class kraken(Exchange, ImplicitAPI):
258
258
  'TRX': 'TRC20',
259
259
  },
260
260
  'depositMethods': {
261
- '1INCH': '1inch(1INCH)',
261
+ '1INCH': '1inch' + ' ' + '(1INCH)',
262
262
  'AAVE': 'Aave',
263
263
  'ADA': 'ADA',
264
264
  'ALGO': 'Algorand',
265
- 'ANKR': 'ANKR(ANKR)',
266
- 'ANT': 'Aragon(ANT)',
265
+ 'ANKR': 'ANKR' + ' ' + '(ANKR)',
266
+ 'ANT': 'Aragon' + ' ' + '(ANT)',
267
267
  'ATOM': 'Cosmos',
268
- 'AXS': 'Axie Infinity Shards(AXS)',
269
- 'BADGER': 'Bager DAO(BADGER)',
270
- 'BAL': 'Balancer(BAL)',
271
- 'BAND': 'Band Protocol(BAND)',
268
+ 'AXS': 'Axie Infinity Shards' + ' ' + '(AXS)',
269
+ 'BADGER': 'Bager DAO' + ' ' + '(BADGER)',
270
+ 'BAL': 'Balancer' + ' ' + '(BAL)',
271
+ 'BAND': 'Band Protocol' + ' ' + '(BAND)',
272
272
  'BAT': 'BAT',
273
273
  'BCH': 'Bitcoin Cash',
274
- 'BNC': 'Bifrost(BNC)',
275
- 'BNT': 'Bancor(BNT)',
274
+ 'BNC': 'Bifrost' + ' ' + '(BNC)',
275
+ 'BNT': 'Bancor' + ' ' + '(BNT)',
276
276
  'BTC': 'Bitcoin',
277
- 'CHZ': 'Chiliz(CHZ)',
278
- 'COMP': 'Compound(COMP)',
279
- 'CQT': '\tCovalent Query Token(CQT)',
280
- 'CRV': 'Curve DAO Token(CRV)',
281
- 'CTSI': 'Cartesi(CTSI)',
277
+ 'CHZ': 'Chiliz' + ' ' + '(CHZ)',
278
+ 'COMP': 'Compound' + ' ' + '(COMP)',
279
+ 'CQT': '\tCovalent Query Token' + ' ' + '(CQT)',
280
+ 'CRV': 'Curve DAO Token' + ' ' + '(CRV)',
281
+ 'CTSI': 'Cartesi' + ' ' + '(CTSI)',
282
282
  'DAI': 'Dai',
283
283
  'DASH': 'Dash',
284
284
  'DOGE': 'Dogecoin',
285
285
  'DOT': 'Polkadot',
286
- 'DYDX': 'dYdX(DYDX)',
287
- 'ENJ': 'Enjin Coin(ENJ)',
286
+ 'DYDX': 'dYdX' + ' ' + '(DYDX)',
287
+ 'ENJ': 'Enjin Coin' + ' ' + '(ENJ)',
288
288
  'EOS': 'EOS',
289
- 'ETC': 'Ether Classic(Hex)',
290
- 'ETH': 'Ether(Hex)',
289
+ 'ETC': 'Ether Classic' + ' ' + '(Hex)',
290
+ 'ETH': 'Ether' + ' ' + '(Hex)',
291
291
  'EWT': 'Energy Web Token',
292
292
  'FEE': 'Kraken Fee Credit',
293
293
  'FIL': 'Filecoin',
294
294
  'FLOW': 'Flow',
295
- 'GHST': 'Aavegotchi(GHST)',
295
+ 'GHST': 'Aavegotchi' + ' ' + '(GHST)',
296
296
  'GNO': 'GNO',
297
297
  'GRT': 'GRT',
298
298
  'ICX': 'Icon',
299
- 'INJ': 'Injective Protocol(INJ)',
300
- 'KAR': 'Karura(KAR)',
299
+ 'INJ': 'Injective Protocol' + ' ' + '(INJ)',
300
+ 'KAR': 'Karura' + ' ' + '(KAR)',
301
301
  'KAVA': 'Kava',
302
- 'KEEP': 'Keep Token(KEEP)',
303
- 'KNC': 'Kyber Network(KNC)',
302
+ 'KEEP': 'Keep Token' + ' ' + '(KEEP)',
303
+ 'KNC': 'Kyber Network' + ' ' + '(KNC)',
304
304
  'KSM': 'Kusama',
305
305
  'LINK': 'Link',
306
- 'LPT': 'Livepeer Token(LPT)',
307
- 'LRC': 'Loopring(LRC)',
306
+ 'LPT': 'Livepeer Token' + ' ' + '(LPT)',
307
+ 'LRC': 'Loopring' + ' ' + '(LRC)',
308
308
  'LSK': 'Lisk',
309
309
  'LTC': 'Litecoin',
310
310
  'MANA': 'MANA',
311
- 'MATIC': 'Polygon(MATIC)',
311
+ 'MATIC': 'Polygon' + ' ' + '(MATIC)',
312
312
  'MINA': 'Mina', # inspected from webui
313
- 'MIR': 'Mirror Protocol(MIR)',
314
- 'MKR': 'Maker(MKR)',
313
+ 'MIR': 'Mirror Protocol' + ' ' + '(MIR)',
314
+ 'MKR': 'Maker' + ' ' + '(MKR)',
315
315
  'MLN': 'MLN',
316
- 'MOVR': 'Moonriver(MOVR)',
316
+ 'MOVR': 'Moonriver' + ' ' + '(MOVR)',
317
317
  'NANO': 'NANO',
318
318
  'OCEAN': 'OCEAN',
319
- 'OGN': 'Origin Protocol(OGN)',
319
+ 'OGN': 'Origin Protocol' + ' ' + '(OGN)',
320
320
  'OMG': 'OMG',
321
- 'OXT': 'Orchid(OXT)',
322
- 'OXY': 'Oxygen(OXY)',
323
- 'PAXG': 'PAX(Gold)',
324
- 'PERP': 'Perpetual Protocol(PERP)',
325
- 'PHA': 'Phala(PHA)',
321
+ 'OXT': 'Orchid' + ' ' + '(OXT)',
322
+ 'OXY': 'Oxygen' + ' ' + '(OXY)',
323
+ 'PAXG': 'PAX' + ' ' + '(Gold)',
324
+ 'PERP': 'Perpetual Protocol' + ' ' + '(PERP)',
325
+ 'PHA': 'Phala' + ' ' + '(PHA)',
326
326
  'QTUM': 'QTUM',
327
- 'RARI': 'Rarible(RARI)',
328
- 'RAY': 'Raydium(RAY)',
329
- 'REN': 'Ren Protocol(REN)',
327
+ 'RARI': 'Rarible' + ' ' + '(RARI)',
328
+ 'RAY': 'Raydium' + ' ' + '(RAY)',
329
+ 'REN': 'Ren Protocol' + ' ' + '(REN)',
330
330
  'REP': 'REPv2',
331
331
  'REPV1': 'REP',
332
- 'SAND': 'The Sandbox(SAND)',
332
+ 'SAND': 'The Sandbox' + ' ' + '(SAND)',
333
333
  'SC': 'Siacoin',
334
- 'SDN': 'Shiden(SDN)',
334
+ 'SDN': 'Shiden' + ' ' + '(SDN)',
335
335
  'SOL': 'Solana', # their deposit method api doesn't work for SOL - was guessed
336
- 'SNX': 'Synthetix Network(SNX)',
336
+ 'SNX': 'Synthetix Network' + ' ' + '(SNX)',
337
337
  'SRM': 'Serum', # inspected from webui
338
- 'STORJ': 'Storj(STORJ)',
339
- 'SUSHI': 'Sushiswap(SUSHI)',
338
+ 'STORJ': 'Storj' + ' ' + '(STORJ)',
339
+ 'SUSHI': 'Sushiswap' + ' ' + '(SUSHI)',
340
340
  'TBTC': 'tBTC',
341
341
  'TRX': 'Tron',
342
342
  'UNI': 'UNI',
343
343
  'USDC': 'USDC',
344
- 'USDT': 'Tether USD(ERC20)',
345
- 'USDT-TRC20': 'Tether USD(TRC20)',
344
+ 'USDT': 'Tether USD' + ' ' + '(ERC20)',
345
+ 'USDT-TRC20': 'Tether USD' + ' ' + '(TRC20)',
346
346
  'WAVES': 'Waves',
347
- 'WBTC': 'Wrapped Bitcoin(WBTC)',
347
+ 'WBTC': 'Wrapped Bitcoin' + ' ' + '(WBTC)',
348
348
  'XLM': 'Stellar XLM',
349
349
  'XMR': 'Monero',
350
350
  'XRP': 'Ripple XRP',
351
351
  'XTZ': 'XTZ',
352
352
  'YFI': 'YFI',
353
- 'ZEC': 'Zcash(Transparent)',
354
- 'ZRX': '0x(ZRX)',
353
+ 'ZEC': 'Zcash' + ' ' + '(Transparent)',
354
+ 'ZRX': '0x' + ' ' + '(ZRX)',
355
355
  },
356
356
  'withdrawMethods': { # keeping it here because deposit and withdraw return different networks codes
357
357
  'Lightning': 'Lightning',
@@ -1465,6 +1465,7 @@ class latoken(Exchange, ImplicitAPI):
1465
1465
  statuses: dict = {
1466
1466
  'TRANSACTION_STATUS_CONFIRMED': 'ok',
1467
1467
  'TRANSACTION_STATUS_EXECUTED': 'ok',
1468
+ 'TRANSACTION_STATUS_CHECKING': 'pending',
1468
1469
  'TRANSACTION_STATUS_CANCELLED': 'canceled',
1469
1470
  }
1470
1471
  return self.safe_string(statuses, status, status)
@@ -577,7 +577,7 @@ class mexc(Exchange, ImplicitAPI):
577
577
  'POKT': 'POKT',
578
578
  'QKC': 'QKC',
579
579
  'QTUM': 'QTUM',
580
- 'RAP20': 'RAP20(Rangers Mainnet)',
580
+ 'RAP20': 'RAP20' + ' ' + '(Rangers Mainnet)',
581
581
  'REI': 'REI',
582
582
  'RSK': 'RBTC',
583
583
  'RVN': 'Ravencoin(RVN)',
@@ -727,69 +727,9 @@ class mexc(Exchange, ImplicitAPI):
727
727
  # OKB <> OKT(for usdt it's exception) for OKC, PMEER, FLARE, STRD, ZEL, FUND, "NONE", CRING, FREETON, QTZ (probably unique network is meant), HT, BSC(RACAV1), BSC(RACAV2), AMBROSUS, BAJUN, NOM. their individual info is at https://www.mexc.com/api/platform/asset/spot/{COINNAME}
728
728
  },
729
729
  'networksById': {
730
- 'Aleph Zero(AZERO)': 'AZERO',
731
- 'Alephium(ALPH)': 'ALPH',
732
- 'Algorand(ALGO)': 'ALGO',
733
- 'APTOS(APT)': 'APT',
734
- 'Arbitrum One(ARB)': 'ARB',
735
- 'Avalanche C Chain(AVAX CCHAIN)': 'AVAXC',
736
- 'Avalanche X Chain(AVAX XCHAIN)': 'AVAXX',
737
- 'BEP20(BSC)': 'BSC',
738
- 'Bitcoin Cash(BCH)': 'BCH',
739
- 'Bitcoin SV(BSV)': 'BSV',
740
- 'Bitcoin(BTC)': 'BTC',
741
- 'Bittensor(TAO)': 'TAO',
742
- 'BNB Beacon Chain(BEP2)': 'BEP2',
743
730
  'BNB Smart Chain(BEP20-RACAV1)': 'BSC',
744
731
  'BNB Smart Chain(BEP20-RACAV2)': 'BSC',
745
732
  'BNB Smart Chain(BEP20)': 'BSC',
746
- 'Cardano(ADA)': 'ADA',
747
- 'Celestia(TIA)': 'TIA',
748
- 'Chia(XCH)': 'XCH',
749
- 'Chiliz Chain(CHZ2)': 'CHZ2',
750
- 'Chiliz Legacy Chain(CHZ)': 'CHZ',
751
- 'Clore.ai(CLORE)': 'CLORE',
752
- 'Cosmos(ATOM)': 'ATOM',
753
- 'Dogechain(DC)': 'DC',
754
- 'Dogecoin(DOGE)': 'DOGE',
755
- 'Dymension(DYM)': 'DYM',
756
- 'Dynex(DNX)': 'DNX',
757
- 'Elysium(LAVA)': 'LAVA',
758
- 'Ethereum Classic(ETC)': 'ETC',
759
- 'Ethereum(ERC20)': 'ERC20',
760
- 'Fantom(FTM)': 'FTM',
761
- 'Hedera(HBAR)': 'HBAR',
762
- 'Index Chain': 'INDEX',
763
- 'Internet Computer(ICP)': 'ICP',
764
- 'Kaspa(KAS)': 'KAS',
765
- 'Klaytn(KLAY)': 'KLAY',
766
- 'Litecoin(LTC)': 'LTC',
767
- 'Mantle(MNT)': 'MNT',
768
- 'Mcoin Network': 'MCOIN',
769
- 'Meter(MTRG)': 'MTRG',
770
- 'Monero(XMR)': 'XMR',
771
- 'NEAR Protocol(NEAR)': 'NEAR',
772
- 'Neoxa Network': 'NEOXA',
773
- 'Neurai(XNA)': 'XNA',
774
- 'Omega Network(OMN)': 'OMN',
775
- 'Optimism(OP)': 'OPTIMISM',
776
- 'Polkadot(DOT)': 'DOT',
777
- 'Polygon(MATIC)': 'MATIC',
778
- 'RAP20(Rangers Mainnet)': 'RAP20',
779
- 'Ravencoin(RVN)': 'RVN',
780
- 'Ripple(XRP)': 'XRP',
781
- 'Satoxcoin(SATOX)': 'SATOX',
782
- 'Solana(SOL)': 'SOL',
783
- 'Starknet(STARK)': 'STARK',
784
- 'Stellar(XLM)': 'XLM',
785
- 'Terra(LUNA)': 'LUNA',
786
- 'Toncoin(TON)': 'TON',
787
- 'Tron(TRC20)': 'TRC20',
788
- 'UGAS(Ultrain)': 'UGAS',
789
- 'VeChain(VET)': 'VET',
790
- 'Vexanium(VEX)': 'VEX',
791
- 'XPR Network': 'XPR',
792
- 'Zilliqa(ZIL)': 'ZIL',
793
733
  # TODO: uncomment below after deciding unified name
794
734
  # 'PEPE COIN BSC':
795
735
  # 'SMART BLOCKCHAIN':
@@ -598,6 +598,9 @@ class okcoin(Exchange, ImplicitAPI):
598
598
  'defaultNetwork': 'ERC20',
599
599
  'networks': {
600
600
  'ERC20': 'Ethereum',
601
+ 'BTC': 'Bitcoin',
602
+ 'OMNI': 'Omni',
603
+ 'TRC20': 'TRON',
601
604
  },
602
605
  },
603
606
  'commonCurrencies': {
@@ -725,14 +728,6 @@ class okcoin(Exchange, ImplicitAPI):
725
728
  'info': market,
726
729
  })
727
730
 
728
- def safe_network(self, networkId):
729
- networksById: dict = {
730
- 'Bitcoin': 'BTC',
731
- 'Omni': 'OMNI',
732
- 'TRON': 'TRC20',
733
- }
734
- return self.safe_string(networksById, networkId, networkId)
735
-
736
731
  async def fetch_currencies(self, params={}) -> Currencies:
737
732
  """
738
733
  fetches all available currencies on an exchange
@@ -772,7 +767,7 @@ class okcoin(Exchange, ImplicitAPI):
772
767
  if (networkId is not None) and (networkId.find('-') >= 0):
773
768
  parts = networkId.split('-')
774
769
  chainPart = self.safe_string(parts, 1, networkId)
775
- networkCode = self.safe_network(chainPart)
770
+ networkCode = self.network_id_to_code(chainPart)
776
771
  precision = self.parse_precision(self.safe_string(chain, 'wdTickSz'))
777
772
  if maxPrecision is None:
778
773
  maxPrecision = precision
ccxt/async_support/okx.py CHANGED
@@ -1063,6 +1063,7 @@ class okx(Exchange, ImplicitAPI):
1063
1063
  'ZEC': 'Zcash',
1064
1064
  'ZIL': 'Zilliqa',
1065
1065
  'ZKSYNC': 'ZKSYNC',
1066
+ 'OMNI': 'Omni',
1066
1067
  # 'NEON3': 'N3', # tbd
1067
1068
  # undetermined : "CELO-TOKEN", "Digital Cash", Khala
1068
1069
  # todo: uncomment below after consensus
@@ -1589,14 +1590,6 @@ class okx(Exchange, ImplicitAPI):
1589
1590
  dataResponse = self.safe_list(response, 'data', [])
1590
1591
  return self.parse_markets(dataResponse)
1591
1592
 
1592
- def safe_network(self, networkId):
1593
- networksById: dict = {
1594
- 'Bitcoin': 'BTC',
1595
- 'Omni': 'OMNI',
1596
- 'TRON': 'TRC20',
1597
- }
1598
- return self.safe_string(networksById, networkId, networkId)
1599
-
1600
1593
  async def fetch_currencies(self, params={}) -> Currencies:
1601
1594
  """
1602
1595
  fetches all available currencies on an exchange
@@ -1577,6 +1577,7 @@ class onetrading(Exchange, ImplicitAPI):
1577
1577
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
1578
1578
  """
1579
1579
  fetches information on an order made by the user
1580
+ :param str id: the order id
1580
1581
  :param str symbol: not used by onetrading fetchOrder
1581
1582
  :param dict [params]: extra parameters specific to the exchange API endpoint
1582
1583
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2800,6 +2800,7 @@ class phemex(Exchange, ImplicitAPI):
2800
2800
  """
2801
2801
  :see: https://phemex-docs.github.io/#query-orders-by-ids
2802
2802
  fetches information on an order made by the user
2803
+ :param str id: the order id
2803
2804
  :param str symbol: unified symbol of the market the order was made in
2804
2805
  :param dict [params]: extra parameters specific to the exchange API endpoint
2805
2806
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1340,6 +1340,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1340
1340
  fetches information on an order made by the user
1341
1341
  :see: https://api-docs.poloniex.com/futures/api/orders#get-details-of-a-single-order
1342
1342
  :see: https://api-docs.poloniex.com/futures/api/orders#get-single-order-by-clientoid
1343
+ :param str id: the order id
1343
1344
  :param str symbol: unified symbol of the market the order was made in
1344
1345
  :param dict [params]: extra parameters specific to the exchange API endpoint
1345
1346
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1028,6 +1028,7 @@ class probit(Exchange, ImplicitAPI):
1028
1028
  """
1029
1029
  :see: https://docs-en.probit.com/reference/order-3
1030
1030
  fetches information on an order made by the user
1031
+ :param str id: the order id
1031
1032
  :param str symbol: unified symbol of the market the order was made in
1032
1033
  :param dict [params]: extra parameters specific to the exchange API endpoint
1033
1034
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1886,6 +1886,7 @@ class vertex(Exchange, ImplicitAPI):
1886
1886
  """
1887
1887
  fetches information on an order made by the user
1888
1888
  :see: https://docs.vertexprotocol.com/developer-resources/api/gateway/queries/order
1889
+ :param str id: the order id
1889
1890
  :param str symbol: unified symbol of the market the order was made in
1890
1891
  :param dict [params]: extra parameters specific to the exchange API endpoint
1891
1892
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -2472,9 +2472,11 @@ class whitebit(Exchange, ImplicitAPI):
2472
2472
  if hasErrorStatus:
2473
2473
  errorInfo = status
2474
2474
  else:
2475
- errorObject = self.safe_value(response, 'errors')
2476
- if errorObject is not None:
2477
- errorKey = list(errorObject.keys())[0]
2475
+ errorObject = self.safe_dict(response, 'errors', {})
2476
+ errorKeys = list(errorObject.keys())
2477
+ errorsLength = len(errorKeys)
2478
+ if errorsLength > 0:
2479
+ errorKey = errorKeys[0]
2478
2480
  errorMessageArray = self.safe_value(errorObject, errorKey, [])
2479
2481
  errorMessageLength = len(errorMessageArray)
2480
2482
  errorInfo = errorMessageArray[0] if (errorMessageLength > 0) else body
ccxt/async_support/woo.py CHANGED
@@ -1276,6 +1276,7 @@ class woo(Exchange, ImplicitAPI):
1276
1276
  :see: https://docs.woo.org/#get-algo-order
1277
1277
  :see: https://docs.woo.org/#get-order
1278
1278
  fetches information on an order made by the user
1279
+ :param str id: the order id
1279
1280
  :param str symbol: unified symbol of the market the order was made in
1280
1281
  :param dict [params]: extra parameters specific to the exchange API endpoint
1281
1282
  :param boolean [params.stop]: whether the order is a stop/algo order
@@ -1619,6 +1619,7 @@ class woofipro(Exchange, ImplicitAPI):
1619
1619
  :see: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-order-by-order_id
1620
1620
  :see: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-order-by-client_order_id
1621
1621
  fetches information on an order made by the user
1622
+ :param str id: the order id
1622
1623
  :param str symbol: unified symbol of the market the order was made in
1623
1624
  :param dict [params]: extra parameters specific to the exchange API endpoint
1624
1625
  :param boolean [params.trigger]: whether the order is a stop/algo order
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.88'
7
+ __version__ = '4.3.90'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -820,11 +820,13 @@ class Exchange(object):
820
820
 
821
821
  @staticmethod
822
822
  def get_object_value_from_key_list(dictionary_or_list, key_list):
823
+ isDataArray = isinstance(dictionary_or_list, list)
824
+ isDataDict = isinstance(dictionary_or_list, dict)
823
825
  for key in key_list:
824
- if isinstance(key, str):
826
+ if isDataDict:
825
827
  if key in dictionary_or_list and dictionary_or_list[key] is not None and dictionary_or_list[key] != '':
826
828
  return dictionary_or_list[key]
827
- elif key is not None:
829
+ elif isDataArray and not isinstance(key, str):
828
830
  if (key < len(dictionary_or_list)) and (dictionary_or_list[key] is not None) and (dictionary_or_list[key] != ''):
829
831
  return dictionary_or_list[key]
830
832
  return None
@@ -1014,7 +1016,7 @@ class Exchange(object):
1014
1016
  if isinstance(params, dict):
1015
1017
  for key in params:
1016
1018
  _encode_params(params[key], key)
1017
- return _urlencode.urlencode(result)
1019
+ return _urlencode.urlencode(result, quote_via=_urlencode.quote)
1018
1020
 
1019
1021
  @staticmethod
1020
1022
  def rawencode(params={}):
ccxt/bigone.py CHANGED
@@ -1563,6 +1563,7 @@ class bigone(Exchange, ImplicitAPI):
1563
1563
  """
1564
1564
  fetches information on an order made by the user
1565
1565
  :see: https://open.big.one/docs/spot_orders.html#get-one-order
1566
+ :param str id: the order id
1566
1567
  :param str symbol: not used by bigone fetchOrder
1567
1568
  :param dict [params]: extra parameters specific to the exchange API endpoint
1568
1569
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
ccxt/bingx.py CHANGED
@@ -1035,8 +1035,7 @@ class bingx(Exchange, ImplicitAPI):
1035
1035
 
1036
1036
  def parse_trade(self, trade: dict, market: Market = None) -> Trade:
1037
1037
  #
1038
- # spot
1039
- # fetchTrades
1038
+ # spot fetchTrades
1040
1039
  #
1041
1040
  # {
1042
1041
  # "id": 43148253,
@@ -1046,8 +1045,8 @@ class bingx(Exchange, ImplicitAPI):
1046
1045
  # "buyerMaker": False
1047
1046
  # }
1048
1047
  #
1049
- # spot
1050
- # fetchMyTrades
1048
+ # spot fetchMyTrades
1049
+ #
1051
1050
  # {
1052
1051
  # "symbol": "LTC-USDT",
1053
1052
  # "id": 36237072,
@@ -1062,8 +1061,7 @@ class bingx(Exchange, ImplicitAPI):
1062
1061
  # "isMaker": False
1063
1062
  # }
1064
1063
  #
1065
- # swap
1066
- # fetchTrades
1064
+ # swap fetchTrades
1067
1065
  #
1068
1066
  # {
1069
1067
  # "time": 1672025549368,
@@ -1073,8 +1071,7 @@ class bingx(Exchange, ImplicitAPI):
1073
1071
  # "quoteQty": "55723.87"
1074
1072
  # }
1075
1073
  #
1076
- # swap
1077
- # fetchMyTrades
1074
+ # swap fetchMyTrades
1078
1075
  #
1079
1076
  # {
1080
1077
  # "volume": "0.1",
@@ -1088,10 +1085,7 @@ class bingx(Exchange, ImplicitAPI):
1088
1085
  # "filledTime": "2023-07-04T20:56:01.000+0800"
1089
1086
  # }
1090
1087
  #
1091
- #
1092
- # ws
1093
- #
1094
- # spot
1088
+ # ws spot
1095
1089
  #
1096
1090
  # {
1097
1091
  # "E": 1690214529432,
@@ -1104,7 +1098,7 @@ class bingx(Exchange, ImplicitAPI):
1104
1098
  # "t": "57903921"
1105
1099
  # }
1106
1100
  #
1107
- # swap
1101
+ # ws linear swap
1108
1102
  #
1109
1103
  # {
1110
1104
  # "q": "0.0421",
@@ -1114,6 +1108,19 @@ class bingx(Exchange, ImplicitAPI):
1114
1108
  # "s": "BTC-USDT"
1115
1109
  # }
1116
1110
  #
1111
+ # ws inverse swap
1112
+ #
1113
+ # {
1114
+ # "e": "trade",
1115
+ # "E": 1722920589665,
1116
+ # "s": "BTC-USD",
1117
+ # "t": "39125001",
1118
+ # "p": "55360.0",
1119
+ # "q": "1",
1120
+ # "T": 1722920589582,
1121
+ # "m": False
1122
+ # }
1123
+ #
1117
1124
  # inverse swap fetchMyTrades
1118
1125
  #
1119
1126
  # {
@@ -2398,13 +2405,17 @@ class bingx(Exchange, ImplicitAPI):
2398
2405
  tpRequest['quantity'] = self.parse_to_numeric(self.amount_to_precision(symbol, tkQuantity))
2399
2406
  request['takeProfit'] = self.json(tpRequest)
2400
2407
  positionSide = None
2401
- if reduceOnly:
2402
- positionSide = 'SHORT' if (side == 'buy') else 'LONG'
2408
+ hedged = self.safe_bool(params, 'hedged', False)
2409
+ if hedged:
2410
+ if reduceOnly:
2411
+ positionSide = 'SHORT' if (side == 'buy') else 'LONG'
2412
+ else:
2413
+ positionSide = 'LONG' if (side == 'buy') else 'SHORT'
2403
2414
  else:
2404
- positionSide = 'LONG' if (side == 'buy') else 'SHORT'
2415
+ positionSide = 'BOTH'
2405
2416
  request['positionSide'] = positionSide
2406
2417
  request['quantity'] = amount if (market['inverse']) else self.parse_to_numeric(self.amount_to_precision(symbol, amount)) # precision not available for inverse contracts
2407
- params = self.omit(params, ['reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId'])
2418
+ params = self.omit(params, ['hedged', 'reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId'])
2408
2419
  return self.extend(request, params)
2409
2420
 
2410
2421
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
@@ -2434,6 +2445,7 @@ class bingx(Exchange, ImplicitAPI):
2434
2445
  :param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
2435
2446
  :param float [params.stopLoss.triggerPrice]: stop loss trigger price
2436
2447
  :param boolean [params.test]: *swap only* whether to use the test endpoint or not, default is False
2448
+ :param boolean [params.hedged]: *swap only* whether the order is in hedged mode or one way mode
2437
2449
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2438
2450
  """
2439
2451
  self.load_markets()
@@ -3425,6 +3437,7 @@ class bingx(Exchange, ImplicitAPI):
3425
3437
  :see: https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20details
3426
3438
  :see: https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20details
3427
3439
  :see: https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order
3440
+ :param str id: the order id
3428
3441
  :param str symbol: unified symbol of the market the order was made in
3429
3442
  :param dict [params]: extra parameters specific to the exchange API endpoint
3430
3443
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
ccxt/bit2c.py CHANGED
@@ -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>`
ccxt/bitbank.py CHANGED
@@ -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>`
ccxt/bitfinex.py CHANGED
@@ -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>`