ccxt 4.3.42__py2.py3-none-any.whl → 4.3.44__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

@@ -449,6 +449,13 @@ class zonda(Exchange, ImplicitAPI):
449
449
  # "secondBalanceId": "ab43023b-4079-414c-b340-056e3430a3af"
450
450
  # }
451
451
  #
452
+ # cancelOrder
453
+ #
454
+ # {
455
+ # status: "Ok",
456
+ # errors: []
457
+ # }
458
+ #
452
459
  marketId = self.safe_string(order, 'market')
453
460
  symbol = self.safe_symbol(marketId, market, '-')
454
461
  timestamp = self.safe_integer(order, 'time')
@@ -1455,9 +1462,10 @@ class zonda(Exchange, ImplicitAPI):
1455
1462
  'side': side,
1456
1463
  'price': price,
1457
1464
  }
1465
+ response = await self.v1_01PrivateDeleteTradingOfferSymbolIdSidePrice(self.extend(request, params))
1458
1466
  # {status: "Fail", errors: ["NOT_RECOGNIZED_OFFER_TYPE"]} -- if required params are missing
1459
1467
  # {status: "Ok", errors: []}
1460
- return await self.v1_01PrivateDeleteTradingOfferSymbolIdSidePrice(self.extend(request, params))
1468
+ return self.parse_order(response)
1461
1469
 
1462
1470
  def is_fiat(self, currency):
1463
1471
  fiatCurrencies: dict = {
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.42'
7
+ __version__ = '4.3.44'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/binance.py CHANGED
@@ -7556,8 +7556,56 @@ class binance(Exchange, ImplicitAPI):
7556
7556
  # "tranId": 43000126248
7557
7557
  # }
7558
7558
  #
7559
- id = self.safe_string(transfer, 'tranId')
7560
- currencyId = self.safe_string(transfer, 'asset')
7559
+ # {
7560
+ # "orderType": "C2C", # Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment), REMITTANCE(Send cash)
7561
+ # "transactionId": "M_P_71505104267788288",
7562
+ # "transactionTime": 1610090460133, #trade timestamp
7563
+ # "amount": "23.72469206", #order amount(up to 8 decimal places), positive is income, negative is expenditure
7564
+ # "currency": "BNB",
7565
+ # "walletType": 1, #main wallet type, 1 for funding wallet, 2 for spot wallet, 3 for fiat wallet, 4 or 6 for card payment, 5 for earn wallet
7566
+ # "walletTypes": [1,2], #array format,there are multiple values when using combination payment
7567
+ # "fundsDetail": [ # details
7568
+ # {
7569
+ # "currency": "USDT", #asset
7570
+ # "amount": "1.2",
7571
+ # "walletAssetCost":[ #details of asset cost per wallet
7572
+ # {"1":"0.6"},
7573
+ # {"2":"0.6"}
7574
+ # ]
7575
+ # },
7576
+ # {
7577
+ # "currency": "ETH",
7578
+ # "amount": "0.0001",
7579
+ # "walletAssetCost":[
7580
+ # {"1":"0.00005"},
7581
+ # {"2":"0.00005"}
7582
+ # ]
7583
+ # }
7584
+ # ],
7585
+ # "payerInfo":{
7586
+ # "name":"Jack", #nickname or merchant name
7587
+ # "type":"USER", #account type,USER for personal,MERCHANT for merchant
7588
+ # "binanceId":"12345678", #binance uid
7589
+ # "accountId":"67736251" #binance pay id
7590
+ # },
7591
+ # "receiverInfo":{
7592
+ # "name":"Alan", #nickname or merchant name
7593
+ # "type":"MERCHANT", #account type,USER for personal,MERCHANT for merchant
7594
+ # "email":"alan@binance.com", #email
7595
+ # "binanceId":"34355667", #binance uid
7596
+ # "accountId":"21326891", #binance pay id
7597
+ # "countryCode":"1", #International area code
7598
+ # "phoneNumber":"8057651210",
7599
+ # "mobileCode":"US", #country code
7600
+ # "extend":[ #extension field
7601
+ # "institutionName": "",
7602
+ # "cardNumber": "",
7603
+ # "digitalWalletId": ""
7604
+ # ]
7605
+ # }
7606
+ # }
7607
+ id = self.safe_string_2(transfer, 'tranId', 'transactionId')
7608
+ currencyId = self.safe_string_2(transfer, 'asset', 'currency')
7561
7609
  code = self.safe_currency_code(currencyId, currency)
7562
7610
  amount = self.safe_number(transfer, 'amount')
7563
7611
  type = self.safe_string(transfer, 'type')
@@ -7570,7 +7618,13 @@ class binance(Exchange, ImplicitAPI):
7570
7618
  toAccount = self.safe_value(parts, 1)
7571
7619
  fromAccount = self.safe_string(accountsById, fromAccount, fromAccount)
7572
7620
  toAccount = self.safe_string(accountsById, toAccount, toAccount)
7573
- timestamp = self.safe_integer(transfer, 'timestamp')
7621
+ walletType = self.safe_integer(transfer, 'walletType')
7622
+ if walletType is not None:
7623
+ payer = self.safe_dict(transfer, 'payerInfo', {})
7624
+ receiver = self.safe_dict(transfer, 'receiverInfo', {})
7625
+ fromAccount = self.safe_string(payer, 'accountId')
7626
+ toAccount = self.safe_string(receiver, 'accountId')
7627
+ timestamp = self.safe_integer_2(transfer, 'timestamp', 'transactionTime')
7574
7628
  status = self.parse_transfer_status(self.safe_string(transfer, 'status'))
7575
7629
  return {
7576
7630
  'info': transfer,
@@ -7699,66 +7753,133 @@ class binance(Exchange, ImplicitAPI):
7699
7753
  """
7700
7754
  fetch a history of internal transfers made on an account
7701
7755
  :see: https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history-user_data
7756
+ :see: https://binance-docs.github.io/apidocs/spot/en/#pay-endpoints
7702
7757
  :param str code: unified currency code of the currency transferred
7703
7758
  :param int [since]: the earliest time in ms to fetch transfers for
7704
7759
  :param int [limit]: the maximum number of transfers structures to retrieve
7705
7760
  :param dict [params]: extra parameters specific to the exchange API endpoint
7706
7761
  :param int [params.until]: the latest time in ms to fetch transfers for
7707
7762
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
7763
+ :param boolean [params.internal]: default False, when True will fetch pay trade history
7708
7764
  :returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
7709
7765
  """
7710
7766
  self.load_markets()
7767
+ internal = self.safe_bool(params, 'internal')
7768
+ params = self.omit(params, 'internal')
7711
7769
  paginate = False
7712
7770
  paginate, params = self.handle_option_and_params(params, 'fetchTransfers', 'paginate')
7713
- if paginate:
7771
+ if paginate and not internal:
7714
7772
  return self.fetch_paginated_call_dynamic('fetchTransfers', code, since, limit, params)
7715
7773
  currency = None
7716
7774
  if code is not None:
7717
7775
  currency = self.currency(code)
7718
- defaultType = self.safe_string_2(self.options, 'fetchTransfers', 'defaultType', 'spot')
7719
- fromAccount = self.safe_string(params, 'fromAccount', defaultType)
7720
- defaultTo = 'spot' if (fromAccount == 'future') else 'future'
7721
- toAccount = self.safe_string(params, 'toAccount', defaultTo)
7722
- type = self.safe_string(params, 'type')
7723
- accountsByType = self.safe_dict(self.options, 'accountsByType', {})
7724
- fromId = self.safe_string(accountsByType, fromAccount)
7725
- toId = self.safe_string(accountsByType, toAccount)
7726
- if type is None:
7727
- if fromId is None:
7728
- keys = list(accountsByType.keys())
7729
- raise ExchangeError(self.id + ' fromAccount parameter must be one of ' + ', '.join(keys))
7730
- if toId is None:
7731
- keys = list(accountsByType.keys())
7732
- raise ExchangeError(self.id + ' toAccount parameter must be one of ' + ', '.join(keys))
7733
- type = fromId + '_' + toId
7734
- request: dict = {
7735
- 'type': type,
7736
- }
7776
+ request: dict = {}
7777
+ limitKey = 'limit'
7778
+ if not internal:
7779
+ defaultType = self.safe_string_2(self.options, 'fetchTransfers', 'defaultType', 'spot')
7780
+ fromAccount = self.safe_string(params, 'fromAccount', defaultType)
7781
+ defaultTo = 'spot' if (fromAccount == 'future') else 'future'
7782
+ toAccount = self.safe_string(params, 'toAccount', defaultTo)
7783
+ type = self.safe_string(params, 'type')
7784
+ accountsByType = self.safe_dict(self.options, 'accountsByType', {})
7785
+ fromId = self.safe_string(accountsByType, fromAccount)
7786
+ toId = self.safe_string(accountsByType, toAccount)
7787
+ if type is None:
7788
+ if fromId is None:
7789
+ keys = list(accountsByType.keys())
7790
+ raise ExchangeError(self.id + ' fromAccount parameter must be one of ' + ', '.join(keys))
7791
+ if toId is None:
7792
+ keys = list(accountsByType.keys())
7793
+ raise ExchangeError(self.id + ' toAccount parameter must be one of ' + ', '.join(keys))
7794
+ type = fromId + '_' + toId
7795
+ request['type'] = type
7796
+ limitKey = 'size'
7797
+ if limit is not None:
7798
+ request[limitKey] = limit
7737
7799
  if since is not None:
7738
7800
  request['startTime'] = since
7739
- if limit is not None:
7740
- request['size'] = limit
7741
7801
  until = self.safe_integer(params, 'until')
7742
7802
  if until is not None:
7743
7803
  params = self.omit(params, 'until')
7744
7804
  request['endTime'] = until
7745
- response = self.sapiGetAssetTransfer(self.extend(request, params))
7746
- #
7747
- # {
7748
- # "total": 3,
7749
- # "rows": [
7750
- # {
7751
- # "timestamp": 1614640878000,
7752
- # "asset": "USDT",
7753
- # "amount": "25",
7754
- # "type": "MAIN_UMFUTURE",
7755
- # "status": "CONFIRMED",
7756
- # "tranId": 43000126248
7757
- # },
7758
- # ]
7759
- # }
7760
- #
7761
- rows = self.safe_list(response, 'rows', [])
7805
+ response = None
7806
+ if internal:
7807
+ response = self.sapiGetPayTransactions(self.extend(request, params))
7808
+ #
7809
+ # {
7810
+ # "code": "000000",
7811
+ # "message": "success",
7812
+ # "data": [
7813
+ # {
7814
+ # "orderType": "C2C", # Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment), REMITTANCE(Send cash)
7815
+ # "transactionId": "M_P_71505104267788288",
7816
+ # "transactionTime": 1610090460133, #trade timestamp
7817
+ # "amount": "23.72469206", #order amount(up to 8 decimal places), positive is income, negative is expenditure
7818
+ # "currency": "BNB",
7819
+ # "walletType": 1, #main wallet type, 1 for funding wallet, 2 for spot wallet, 3 for fiat wallet, 4 or 6 for card payment, 5 for earn wallet
7820
+ # "walletTypes": [1,2], #array format,there are multiple values when using combination payment
7821
+ # "fundsDetail": [ # details
7822
+ # {
7823
+ # "currency": "USDT", #asset
7824
+ # "amount": "1.2",
7825
+ # "walletAssetCost":[ #details of asset cost per wallet
7826
+ # {"1":"0.6"},
7827
+ # {"2":"0.6"}
7828
+ # ]
7829
+ # },
7830
+ # {
7831
+ # "currency": "ETH",
7832
+ # "amount": "0.0001",
7833
+ # "walletAssetCost":[
7834
+ # {"1":"0.00005"},
7835
+ # {"2":"0.00005"}
7836
+ # ]
7837
+ # }
7838
+ # ],
7839
+ # "payerInfo":{
7840
+ # "name":"Jack", #nickname or merchant name
7841
+ # "type":"USER", #account type,USER for personal,MERCHANT for merchant
7842
+ # "binanceId":"12345678", #binance uid
7843
+ # "accountId":"67736251" #binance pay id
7844
+ # },
7845
+ # "receiverInfo":{
7846
+ # "name":"Alan", #nickname or merchant name
7847
+ # "type":"MERCHANT", #account type,USER for personal,MERCHANT for merchant
7848
+ # "email":"alan@binance.com", #email
7849
+ # "binanceId":"34355667", #binance uid
7850
+ # "accountId":"21326891", #binance pay id
7851
+ # "countryCode":"1", #International area code
7852
+ # "phoneNumber":"8057651210",
7853
+ # "mobileCode":"US", #country code
7854
+ # "extend":[ #extension field
7855
+ # "institutionName": "",
7856
+ # "cardNumber": "",
7857
+ # "digitalWalletId": ""
7858
+ # ]
7859
+ # }
7860
+ # }
7861
+ # ],
7862
+ # "success": True
7863
+ # }
7864
+ #
7865
+ else:
7866
+ response = self.sapiGetAssetTransfer(self.extend(request, params))
7867
+ #
7868
+ # {
7869
+ # "total": 3,
7870
+ # "rows": [
7871
+ # {
7872
+ # "timestamp": 1614640878000,
7873
+ # "asset": "USDT",
7874
+ # "amount": "25",
7875
+ # "type": "MAIN_UMFUTURE",
7876
+ # "status": "CONFIRMED",
7877
+ # "tranId": 43000126248
7878
+ # },
7879
+ # ]
7880
+ # }
7881
+ #
7882
+ rows = self.safe_list_2(response, 'rows', 'data', [])
7762
7883
  return self.parse_transfers(rows, currency, since, limit)
7763
7884
 
7764
7885
  def fetch_deposit_address(self, code: str, params={}):
ccxt/btcmarkets.py CHANGED
@@ -855,7 +855,29 @@ class btcmarkets(Exchange, ImplicitAPI):
855
855
  request: dict = {
856
856
  'ids': ids,
857
857
  }
858
- return self.privateDeleteBatchordersIds(self.extend(request, params))
858
+ response = self.privateDeleteBatchordersIds(self.extend(request, params))
859
+ #
860
+ # {
861
+ # "cancelOrders": [
862
+ # {
863
+ # "orderId": "414186",
864
+ # "clientOrderId": "6"
865
+ # },
866
+ # ...
867
+ # ],
868
+ # "unprocessedRequests": [
869
+ # {
870
+ # "code": "OrderAlreadyCancelled",
871
+ # "message": "order is already cancelled.",
872
+ # "requestId": "1"
873
+ # }
874
+ # ]
875
+ # }
876
+ #
877
+ cancelOrders = self.safe_list(response, 'cancelOrders', [])
878
+ unprocessedRequests = self.safe_list(response, 'unprocessedRequests', [])
879
+ orders = self.array_concat(cancelOrders, unprocessedRequests)
880
+ return self.parse_orders(orders)
859
881
 
860
882
  def cancel_order(self, id: str, symbol: Str = None, params={}):
861
883
  """
@@ -870,7 +892,14 @@ class btcmarkets(Exchange, ImplicitAPI):
870
892
  request: dict = {
871
893
  'id': id,
872
894
  }
873
- return self.privateDeleteOrdersId(self.extend(request, params))
895
+ response = self.privateDeleteOrdersId(self.extend(request, params))
896
+ #
897
+ # {
898
+ # "orderId": "7524",
899
+ # "clientOrderId": "123-456"
900
+ # }
901
+ #
902
+ return self.parse_order(response)
874
903
 
875
904
  def calculate_fee(self, symbol, type, side, amount, price, takerOrMaker='taker', params={}):
876
905
  """
ccxt/coinex.py CHANGED
@@ -31,7 +31,7 @@ class coinex(Exchange, ImplicitAPI):
31
31
  return self.deep_extend(super(coinex, self).describe(), {
32
32
  'id': 'coinex',
33
33
  'name': 'CoinEx',
34
- 'version': 'v1',
34
+ 'version': 'v2',
35
35
  'countries': ['CN'],
36
36
  # IP ratelimit is 400 requests per second
37
37
  # rateLimit = 1000ms / 400 = 2.5
@@ -328,6 +328,8 @@ class coinex(Exchange, ImplicitAPI):
328
328
  'futures/position-level': 1,
329
329
  'futures/liquidation-history': 1,
330
330
  'futures/basis-history': 1,
331
+ 'assets/deposit-withdraw-config': 1,
332
+ 'assets/all-deposit-withdraw-config': 1,
331
333
  },
332
334
  },
333
335
  'private': {
@@ -350,7 +352,6 @@ class coinex(Exchange, ImplicitAPI):
350
352
  'assets/deposit-address': 40,
351
353
  'assets/deposit-history': 40,
352
354
  'assets/withdraw': 40,
353
- 'assets/deposit-withdraw-config': 1,
354
355
  'assets/transfer-history': 40,
355
356
  'spot/order-status': 8,
356
357
  'spot/batch-order-status': 8,
@@ -544,126 +545,125 @@ class coinex(Exchange, ImplicitAPI):
544
545
  })
545
546
 
546
547
  def fetch_currencies(self, params={}) -> Currencies:
547
- response = self.v1PublicGetCommonAssetConfig(params)
548
+ """
549
+ fetches all available currencies on an exchange
550
+ :see: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config
551
+ :param dict [params]: extra parameters specific to the exchange API endpoint
552
+ :returns dict: an associative dictionary of currencies
553
+ """
554
+ response = self.v2PublicGetAssetsAllDepositWithdrawConfig(params)
555
+ #
548
556
  # {
549
557
  # "code": 0,
550
- # "data": {
551
- # "USDT-ERC20": {
552
- # "asset": "USDT",
553
- # "chain": "ERC20",
554
- # "withdrawal_precision": 6,
555
- # "can_deposit": True,
556
- # "can_withdraw": True,
557
- # "deposit_least_amount": "4.9",
558
- # "withdraw_least_amount": "4.9",
559
- # "withdraw_tx_fee": "4.9",
560
- # "explorer_asset_url": "https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7"
561
- # },
562
- # ...
563
- # },
564
- # "message": "Success",
558
+ # "data": [
559
+ # {
560
+ # "asset": {
561
+ # "ccy": "CET",
562
+ # "deposit_enabled": True,
563
+ # "withdraw_enabled": True,
564
+ # "inter_transfer_enabled": True,
565
+ # "is_st": False
566
+ # },
567
+ # "chains": [
568
+ # {
569
+ # "chain": "CSC",
570
+ # "min_deposit_amount": "0.8",
571
+ # "min_withdraw_amount": "8",
572
+ # "deposit_enabled": True,
573
+ # "withdraw_enabled": True,
574
+ # "deposit_delay_minutes": 0,
575
+ # "safe_confirmations": 10,
576
+ # "irreversible_confirmations": 20,
577
+ # "deflation_rate": "0",
578
+ # "withdrawal_fee": "0.026",
579
+ # "withdrawal_precision": 8,
580
+ # "memo": "",
581
+ # "is_memo_required_for_deposit": False,
582
+ # "explorer_asset_url": ""
583
+ # },
584
+ # ]
585
+ # }
586
+ # ],
587
+ # "message": "OK"
565
588
  # }
566
589
  #
567
- data = self.safe_value(response, 'data', [])
568
- coins = list(data.keys())
590
+ data = self.safe_list(response, 'data', [])
569
591
  result: dict = {}
570
- for i in range(0, len(coins)):
571
- coin = coins[i]
572
- currency = data[coin]
573
- currencyId = self.safe_string(currency, 'asset')
574
- networkId = self.safe_string(currency, 'chain')
592
+ for i in range(0, len(data)):
593
+ coin = data[i]
594
+ asset = self.safe_dict(coin, 'asset', {})
595
+ chains = self.safe_list(coin, 'chains', [])
596
+ currencyId = self.safe_string(asset, 'ccy')
597
+ if currencyId is None:
598
+ continue # coinex returns empty structures for some reason
575
599
  code = self.safe_currency_code(currencyId)
576
- precisionString = self.parse_precision(self.safe_string(currency, 'withdrawal_precision'))
577
- precision = self.parse_number(precisionString)
578
- canDeposit = self.safe_value(currency, 'can_deposit')
579
- canWithdraw = self.safe_value(currency, 'can_withdraw')
580
- feeString = self.safe_string(currency, 'withdraw_tx_fee')
581
- fee = self.parse_number(feeString)
582
- minNetworkDepositString = self.safe_string(currency, 'deposit_least_amount')
583
- minNetworkDeposit = self.parse_number(minNetworkDepositString)
584
- minNetworkWithdrawString = self.safe_string(currency, 'withdraw_least_amount')
585
- minNetworkWithdraw = self.parse_number(minNetworkWithdrawString)
586
- if self.safe_value(result, code) is None:
587
- result[code] = {
588
- 'id': currencyId,
589
- 'numericId': None,
590
- 'code': code,
591
- 'info': None,
592
- 'name': None,
593
- 'active': canDeposit and canWithdraw,
594
- 'deposit': canDeposit,
595
- 'withdraw': canWithdraw,
596
- 'fee': fee,
597
- 'precision': precision,
598
- 'limits': {
599
- 'amount': {
600
- 'min': None,
601
- 'max': None,
602
- },
603
- 'deposit': {
604
- 'min': minNetworkDeposit,
605
- 'max': None,
606
- },
607
- 'withdraw': {
608
- 'min': minNetworkWithdraw,
609
- 'max': None,
610
- },
611
- },
612
- }
613
- minFeeString = self.safe_string(result[code], 'fee')
614
- if feeString is not None:
615
- minFeeString = feeString if (minFeeString is None) else Precise.string_min(feeString, minFeeString)
616
- depositAvailable = self.safe_value(result[code], 'deposit')
617
- depositAvailable = canDeposit if (canDeposit) else depositAvailable
618
- withdrawAvailable = self.safe_value(result[code], 'withdraw')
619
- withdrawAvailable = canWithdraw if (canWithdraw) else withdrawAvailable
620
- minDepositString = self.safe_string(result[code]['limits']['deposit'], 'min')
621
- if minNetworkDepositString is not None:
622
- minDepositString = minNetworkDepositString if (minDepositString is None) else Precise.string_min(minNetworkDepositString, minDepositString)
623
- minWithdrawString = self.safe_string(result[code]['limits']['withdraw'], 'min')
624
- if minNetworkWithdrawString is not None:
625
- minWithdrawString = minNetworkWithdrawString if (minWithdrawString is None) else Precise.string_min(minNetworkWithdrawString, minWithdrawString)
626
- minPrecisionString = self.safe_string(result[code], 'precision')
627
- if precisionString is not None:
628
- minPrecisionString = precisionString if (minPrecisionString is None) else Precise.string_min(precisionString, minPrecisionString)
629
- networks = self.safe_value(result[code], 'networks', {})
630
- network: dict = {
631
- 'info': currency,
632
- 'id': networkId,
633
- 'network': networkId,
600
+ canDeposit = self.safe_bool(asset, 'deposit_enabled')
601
+ canWithdraw = self.safe_bool(asset, 'withdraw_enabled')
602
+ firstChain = self.safe_dict(chains, 0, {})
603
+ firstPrecisionString = self.parse_precision(self.safe_string(firstChain, 'withdrawal_precision'))
604
+ result[code] = {
605
+ 'id': currencyId,
606
+ 'code': code,
634
607
  'name': None,
608
+ 'active': canDeposit and canWithdraw,
609
+ 'deposit': canDeposit,
610
+ 'withdraw': canWithdraw,
611
+ 'fee': None,
612
+ 'precision': self.parse_number(firstPrecisionString),
635
613
  'limits': {
636
614
  'amount': {
637
615
  'min': None,
638
616
  'max': None,
639
617
  },
640
618
  'deposit': {
641
- 'min': self.safe_number(currency, 'deposit_least_amount'),
619
+ 'min': None,
642
620
  'max': None,
643
621
  },
644
622
  'withdraw': {
645
- 'min': self.safe_number(currency, 'withdraw_least_amount'),
623
+ 'min': None,
646
624
  'max': None,
647
625
  },
648
626
  },
649
- 'active': canDeposit and canWithdraw,
650
- 'deposit': canDeposit,
651
- 'withdraw': canWithdraw,
652
- 'fee': fee,
653
- 'precision': precision,
627
+ 'networks': {},
628
+ 'info': coin,
654
629
  }
655
- networks[networkId] = network
656
- result[code]['networks'] = networks
657
- result[code]['active'] = depositAvailable and withdrawAvailable
658
- result[code]['deposit'] = depositAvailable
659
- result[code]['withdraw'] = withdrawAvailable
660
- info = self.safe_value(result[code], 'info', [])
661
- info.append(currency)
662
- result[code]['info'] = info
663
- result[code]['fee'] = self.parse_number(minFeeString)
664
- result[code]['precision'] = self.parse_number(minPrecisionString)
665
- result[code]['limits']['deposit']['min'] = self.parse_number(minDepositString)
666
- result[code]['limits']['withdraw']['min'] = self.parse_number(minWithdrawString)
630
+ for j in range(0, len(chains)):
631
+ chain = chains[j]
632
+ networkId = self.safe_string(chain, 'chain')
633
+ precisionString = self.parse_precision(self.safe_string(chain, 'withdrawal_precision'))
634
+ feeString = self.safe_string(chain, 'withdrawal_fee')
635
+ minNetworkDepositString = self.safe_string(chain, 'min_deposit_amount')
636
+ minNetworkWithdrawString = self.safe_string(chain, 'min_withdraw_amount')
637
+ canDepositChain = self.safe_bool(chain, 'deposit_enabled')
638
+ canWithdrawChain = self.safe_bool(chain, 'withdraw_enabled')
639
+ network: dict = {
640
+ 'id': networkId,
641
+ 'network': networkId,
642
+ 'name': None,
643
+ 'active': canDepositChain and canWithdrawChain,
644
+ 'deposit': canDepositChain,
645
+ 'withdraw': canWithdrawChain,
646
+ 'fee': self.parse_number(feeString),
647
+ 'precision': self.parse_number(precisionString),
648
+ 'limits': {
649
+ 'amount': {
650
+ 'min': None,
651
+ 'max': None,
652
+ },
653
+ 'deposit': {
654
+ 'min': self.parse_number(minNetworkDepositString),
655
+ 'max': None,
656
+ },
657
+ 'withdraw': {
658
+ 'min': self.parse_number(minNetworkWithdrawString),
659
+ 'max': None,
660
+ },
661
+ },
662
+ 'info': chain,
663
+ }
664
+ networks = self.safe_dict(result[code], 'networks', {})
665
+ networks[networkId] = network
666
+ result[code]['networks'] = networks
667
667
  return result
668
668
 
669
669
  def fetch_markets(self, params={}) -> List[Market]:
@@ -5107,7 +5107,7 @@ class coinex(Exchange, ImplicitAPI):
5107
5107
  request: dict = {
5108
5108
  'ccy': currency['id'],
5109
5109
  }
5110
- response = self.v2PrivateGetAssetsDepositWithdrawConfig(self.extend(request, params))
5110
+ response = self.v2PublicGetAssetsDepositWithdrawConfig(self.extend(request, params))
5111
5111
  #
5112
5112
  # {
5113
5113
  # "code": 0,
ccxt/lykke.py CHANGED
@@ -858,7 +858,10 @@ class lykke(Exchange, ImplicitAPI):
858
858
  # "error":null
859
859
  # }
860
860
  #
861
- return self.privateDeleteOrdersOrderId(self.extend(request, params))
861
+ response = self.privateDeleteOrdersOrderId(self.extend(request, params))
862
+ return self.safe_order({
863
+ 'info': response,
864
+ })
862
865
 
863
866
  def cancel_all_orders(self, symbol: Str = None, params={}):
864
867
  """
@@ -882,7 +885,12 @@ class lykke(Exchange, ImplicitAPI):
882
885
  # "error":null
883
886
  # }
884
887
  #
885
- return self.privateDeleteOrders(self.extend(request, params))
888
+ response = self.privateDeleteOrders(self.extend(request, params))
889
+ return [
890
+ self.safe_order({
891
+ 'info': response,
892
+ }),
893
+ ]
886
894
 
887
895
  def fetch_order(self, id: str, symbol: Str = None, params={}):
888
896
  """
ccxt/ndax.py CHANGED
@@ -1510,7 +1510,11 @@ class ndax(Exchange, ImplicitAPI):
1510
1510
  # "detail":null
1511
1511
  # }
1512
1512
  #
1513
- return response
1513
+ return [
1514
+ self.safe_order({
1515
+ 'info': response,
1516
+ }),
1517
+ ]
1514
1518
 
1515
1519
  def cancel_order(self, id: str, symbol: Str = None, params={}):
1516
1520
  """