ccxt 4.4.94__py2.py3-none-any.whl → 4.4.95__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 (44) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/bingx.py +3 -0
  3. ccxt/abstract/hyperliquid.py +1 -1
  4. ccxt/abstract/woo.py +59 -4
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/base/exchange.py +1 -1
  7. ccxt/async_support/base/ws/future.py +2 -0
  8. ccxt/async_support/bingx.py +129 -92
  9. ccxt/async_support/bitget.py +1 -1
  10. ccxt/async_support/bitstamp.py +2 -0
  11. ccxt/async_support/blofin.py +6 -1
  12. ccxt/async_support/bybit.py +1 -1
  13. ccxt/async_support/coinbase.py +36 -0
  14. ccxt/async_support/coinmate.py +34 -0
  15. ccxt/async_support/coinone.py +34 -0
  16. ccxt/async_support/coinsph.py +29 -0
  17. ccxt/async_support/gate.py +1 -1
  18. ccxt/async_support/hyperliquid.py +2 -1
  19. ccxt/async_support/woo.py +1251 -875
  20. ccxt/base/errors.py +0 -6
  21. ccxt/base/exchange.py +3 -3
  22. ccxt/bingx.py +129 -92
  23. ccxt/bitget.py +1 -1
  24. ccxt/bitstamp.py +2 -0
  25. ccxt/blofin.py +6 -1
  26. ccxt/bybit.py +1 -1
  27. ccxt/coinbase.py +36 -0
  28. ccxt/coinmate.py +34 -0
  29. ccxt/coinone.py +34 -0
  30. ccxt/coinsph.py +29 -0
  31. ccxt/gate.py +1 -1
  32. ccxt/hyperliquid.py +2 -1
  33. ccxt/pro/__init__.py +1 -1
  34. ccxt/pro/hyperliquid.py +6 -6
  35. ccxt/pro/kraken.py +17 -16
  36. ccxt/pro/mexc.py +10 -10
  37. ccxt/test/tests_async.py +2 -2
  38. ccxt/test/tests_sync.py +2 -2
  39. ccxt/woo.py +1251 -875
  40. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/METADATA +4 -4
  41. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/RECORD +44 -44
  42. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/LICENSE.txt +0 -0
  43. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/WHEEL +0 -0
  44. {ccxt-4.4.94.dist-info → ccxt-4.4.95.dist-info}/top_level.txt +0 -0
ccxt/base/errors.py CHANGED
@@ -1,9 +1,3 @@
1
- # ----------------------------------------------------------------------------
2
-
3
- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
- # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
- # EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
-
7
1
  error_hierarchy = {
8
2
  'BaseError': {
9
3
  'ExchangeError': {
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.94'
7
+ __version__ = '4.4.95'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2839,7 +2839,7 @@ class Exchange(object):
2839
2839
  # keep self in mind:
2840
2840
  # in JS: 1 == 1.0 is True; 1 == 1.0 is True
2841
2841
  # in Python: 1 == 1.0 is True
2842
- # in PHP 1 == 1.0 is True, but 1 == 1.0 is False
2842
+ # in PHP 1 == 1.0 is True, but 1 == 1.0 is False.
2843
2843
  if stringVersion.find('.') >= 0:
2844
2844
  return float(stringVersion)
2845
2845
  return int(stringVersion)
@@ -3780,7 +3780,7 @@ class Exchange(object):
3780
3780
  for i in range(0, len(fees)):
3781
3781
  fee = fees[i]
3782
3782
  code = self.safe_string(fee, 'currency')
3783
- feeCurrencyCode = code is not code if None else str(i)
3783
+ feeCurrencyCode = code if (code is not None) else str(i)
3784
3784
  if feeCurrencyCode is not None:
3785
3785
  rate = self.safe_string(fee, 'rate')
3786
3786
  cost = self.safe_string(fee, 'cost')
ccxt/bingx.py CHANGED
@@ -127,6 +127,7 @@ class bingx(Exchange, ImplicitAPI):
127
127
  'account': 'https://open-api.{hostname}/openApi',
128
128
  'copyTrading': 'https://open-api.{hostname}/openApi',
129
129
  'cswap': 'https://open-api.{hostname}/openApi',
130
+ 'api': 'https://open-api.{hostname}/openApi',
130
131
  },
131
132
  'test': {
132
133
  'swap': 'https://open-api-vst.{hostname}/openApi', # only swap is really "test" but since the API keys are the same, we want to keep all the functionalities when the user enables the sandboxmode
@@ -456,6 +457,7 @@ class bingx(Exchange, ImplicitAPI):
456
457
  'private': {
457
458
  'get': {
458
459
  'asset/transfer': 1,
460
+ 'asset/transferRecord': 5,
459
461
  'capital/deposit/hisrec': 1,
460
462
  'capital/withdraw/history': 1,
461
463
  },
@@ -464,6 +466,20 @@ class bingx(Exchange, ImplicitAPI):
464
466
  },
465
467
  },
466
468
  },
469
+ 'asset': {
470
+ 'v1': {
471
+ 'private': {
472
+ 'post': {
473
+ 'transfer': 5,
474
+ },
475
+ },
476
+ 'public': {
477
+ 'get': {
478
+ 'transfer/supportCoins': 5,
479
+ },
480
+ },
481
+ },
482
+ },
467
483
  },
468
484
  },
469
485
  'timeframes': {
@@ -528,16 +544,19 @@ class bingx(Exchange, ImplicitAPI):
528
544
  'options': {
529
545
  'defaultType': 'spot',
530
546
  'accountsByType': {
531
- 'funding': 'FUND',
532
- 'spot': 'SPOT',
533
- 'swap': 'PFUTURES',
534
- 'future': 'SFUTURES',
547
+ 'funding': 'fund',
548
+ 'spot': 'spot',
549
+ 'future': 'stdFutures',
550
+ 'swap': 'USDTMPerp',
551
+ 'linear': 'USDTMPerp',
552
+ 'inverse': 'coinMPerp',
535
553
  },
536
554
  'accountsById': {
537
- 'FUND': 'funding',
538
- 'SPOT': 'spot',
539
- 'PFUTURES': 'swap',
540
- 'SFUTURES': 'future',
555
+ 'fund': 'funding',
556
+ 'spot': 'spot',
557
+ 'stdFutures': 'future',
558
+ 'USDTMPerp': 'linear',
559
+ 'coinMPerp': 'inverse',
541
560
  },
542
561
  'recvWindow': 5 * 1000, # 5 sec
543
562
  'broker': 'CCXT',
@@ -779,6 +798,10 @@ class bingx(Exchange, ImplicitAPI):
779
798
  'min': self.safe_number(rawNetwork, 'withdrawMin'),
780
799
  'max': self.safe_number(rawNetwork, 'withdrawMax'),
781
800
  },
801
+ 'deposit': {
802
+ 'min': self.safe_number(rawNetwork, 'depositMin'),
803
+ 'max': None,
804
+ },
782
805
  }
783
806
  precision = self.parse_number(self.parse_precision(self.safe_string(rawNetwork, 'withdrawPrecision')))
784
807
  networks[networkCode] = {
@@ -792,20 +815,35 @@ class bingx(Exchange, ImplicitAPI):
792
815
  'precision': precision,
793
816
  'limits': limits,
794
817
  }
795
- result[code] = self.safe_currency_structure({
796
- 'info': entry,
797
- 'code': code,
798
- 'id': currencyId,
799
- 'precision': None,
800
- 'name': name,
801
- 'active': None,
802
- 'deposit': None,
803
- 'withdraw': None,
804
- 'networks': networks,
805
- 'fee': None,
806
- 'limits': None,
807
- 'type': 'crypto', # only cryptos now
808
- })
818
+ if not (code in result): # the exchange could return the same currency with different networks
819
+ result[code] = {
820
+ 'info': entry,
821
+ 'code': code,
822
+ 'id': currencyId,
823
+ 'precision': None,
824
+ 'name': name,
825
+ 'active': None,
826
+ 'deposit': None,
827
+ 'withdraw': None,
828
+ 'networks': networks,
829
+ 'fee': None,
830
+ 'limits': None,
831
+ 'type': 'crypto', # only cryptos now
832
+ }
833
+ else:
834
+ existing = result[code]
835
+ existingNetworks = self.safe_dict(existing, 'networks', {})
836
+ newNetworkCodes = list(networks.keys())
837
+ for j in range(0, len(newNetworkCodes)):
838
+ newNetworkCode = newNetworkCodes[j]
839
+ if not (newNetworkCode in existingNetworks):
840
+ existingNetworks[newNetworkCode] = networks[newNetworkCode]
841
+ result[code]['networks'] = existingNetworks
842
+ codes = list(result.keys())
843
+ for i in range(0, len(codes)):
844
+ code = codes[i]
845
+ currency = result[code]
846
+ result[code] = self.safe_currency_structure(currency)
809
847
  return result
810
848
 
811
849
  def fetch_spot_markets(self, params) -> List[Market]:
@@ -4641,26 +4679,39 @@ class bingx(Exchange, ImplicitAPI):
4641
4679
  """
4642
4680
  transfer currency internally between wallets on the same account
4643
4681
 
4644
- https://bingx-api.github.io/docs/#/en-us/common/account-api.html#Asset%20Transfer
4682
+ https://bingx-api.github.io/docs/#/en-us/common/account-api.html#Asset%20Transfer%20New
4645
4683
 
4646
4684
  :param str code: unified currency code
4647
4685
  :param float amount: amount to transfer
4648
4686
  :param str fromAccount: account to transfer from(spot, swap, futures, or funding)
4649
- :param str toAccount: account to transfer to(spot, swap, futures, or funding)
4687
+ :param str toAccount: account to transfer to(spot, swap(linear or inverse), future, or funding)
4650
4688
  :param dict [params]: extra parameters specific to the exchange API endpoint
4651
4689
  :returns dict: a `transfer structure <https://docs.ccxt.com/#/?id=transfer-structure>`
4652
4690
  """
4653
4691
  self.load_markets()
4654
4692
  currency = self.currency(code)
4655
4693
  accountsByType = self.safe_dict(self.options, 'accountsByType', {})
4694
+ subType = None
4695
+ subType, params = self.handle_sub_type_and_params('transfer', None, params)
4656
4696
  fromId = self.safe_string(accountsByType, fromAccount, fromAccount)
4657
4697
  toId = self.safe_string(accountsByType, toAccount, toAccount)
4698
+ if fromId == 'swap':
4699
+ if subType == 'inverse':
4700
+ fromId = 'coinMPerp'
4701
+ else:
4702
+ fromId = 'USDTMPerp'
4703
+ if toId == 'swap':
4704
+ if subType == 'inverse':
4705
+ toId = 'coinMPerp'
4706
+ else:
4707
+ toId = 'USDTMPerp'
4658
4708
  request: dict = {
4709
+ 'fromAccount': fromId,
4710
+ 'toAccount': toId,
4659
4711
  'asset': currency['id'],
4660
4712
  'amount': self.currency_to_precision(code, amount),
4661
- 'type': fromId + '_' + toId,
4662
4713
  }
4663
- response = self.spotV3PrivateGetGetAssetTransfer(self.extend(request, params))
4714
+ response = self.apiAssetV1PrivatePostTransfer(self.extend(request, params))
4664
4715
  #
4665
4716
  # {
4666
4717
  # "tranId": 1933130865269936128,
@@ -4669,7 +4720,7 @@ class bingx(Exchange, ImplicitAPI):
4669
4720
  #
4670
4721
  return {
4671
4722
  'info': response,
4672
- 'id': self.safe_string(response, 'tranId'),
4723
+ 'id': self.safe_string(response, 'transferId'),
4673
4724
  'timestamp': None,
4674
4725
  'datetime': None,
4675
4726
  'currency': code,
@@ -4683,18 +4734,19 @@ class bingx(Exchange, ImplicitAPI):
4683
4734
  """
4684
4735
  fetch a history of internal transfers made on an account
4685
4736
 
4686
- https://bingx-api.github.io/docs/#/spot/account-api.html#Query%20User%20Universal%20Transfer%20History%20(USER_DATA)
4737
+ https://bingx-api.github.io/docs/#/en-us/common/account-api.html#Asset%20transfer%20records%20new
4687
4738
 
4688
4739
  :param str [code]: unified currency code of the currency transferred
4689
4740
  :param int [since]: the earliest time in ms to fetch transfers for
4690
4741
  :param int [limit]: the maximum number of transfers structures to retrieve(default 10, max 100)
4691
4742
  :param dict [params]: extra parameters specific to the exchange API endpoint
4692
- :param str params.fromAccount:(mandatory) transfer from(spot, swap, futures, or funding)
4693
- :param str params.toAccount:(mandatory) transfer to(spot, swap, futures, or funding)
4743
+ :param str params.fromAccount:(mandatory) transfer from(spot, swap(linear or inverse), future, or funding)
4744
+ :param str params.toAccount:(mandatory) transfer to(spot, swap(linear or inverse), future, or funding)
4694
4745
  :param boolean [params.paginate]: whether to paginate the results(default False)
4695
4746
  :returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
4696
4747
  """
4697
4748
  self.load_markets()
4749
+ request: dict = {}
4698
4750
  currency = None
4699
4751
  if code is not None:
4700
4752
  currency = self.currency(code)
@@ -4704,34 +4756,36 @@ class bingx(Exchange, ImplicitAPI):
4704
4756
  fromId = self.safe_string(accountsByType, fromAccount, fromAccount)
4705
4757
  toId = self.safe_string(accountsByType, toAccount, toAccount)
4706
4758
  if fromId is None or toId is None:
4707
- raise ExchangeError(self.id + ' fromAccount & toAccount parameter are required')
4759
+ raise ExchangeError(self.id + ' fromAccount & toAccount parameters are required')
4760
+ if fromAccount is not None:
4761
+ request['fromAccount'] = fromId
4762
+ if toAccount is not None:
4763
+ request['toAccount'] = toId
4708
4764
  params = self.omit(params, ['fromAccount', 'toAccount'])
4709
4765
  maxLimit = 100
4710
4766
  paginate = False
4711
4767
  paginate, params = self.handle_option_and_params(params, 'fetchTransfers', 'paginate', False)
4712
4768
  if paginate:
4713
4769
  return self.fetch_paginated_call_dynamic('fetchTransfers', None, since, limit, params, maxLimit)
4714
- request: dict = {
4715
- 'type': fromId + '_' + toId,
4716
- }
4717
4770
  if since is not None:
4718
4771
  request['startTime'] = since
4719
4772
  if limit is not None:
4720
- request['size'] = limit
4773
+ request['pageSize'] = limit
4721
4774
  request, params = self.handle_until_option('endTime', request, params)
4722
- response = self.spotV3PrivateGetAssetTransfer(self.extend(request, params))
4775
+ response = self.apiV3PrivateGetAssetTransferRecord(self.extend(request, params))
4723
4776
  #
4724
4777
  # {
4725
- # "total": 3,
4778
+ # "total": 2,
4726
4779
  # "rows": [
4727
4780
  # {
4728
- # "asset": "USDT",
4729
- # "amount": "100.00000000000000000000",
4730
- # "type": "FUND_SFUTURES",
4781
+ # "asset": "LTC",
4782
+ # "amount": "0.05000000000000000000",
4731
4783
  # "status": "CONFIRMED",
4732
- # "tranId": 1067594500957016069,
4733
- # "timestamp": 1658388859000
4734
- # },
4784
+ # "transferId": "1051461075661819338791",
4785
+ # "timestamp": 1752202092000,
4786
+ # "fromAccount": "spot",
4787
+ # "toAccount": "USDTMPerp"
4788
+ # }
4735
4789
  # ]
4736
4790
  # }
4737
4791
  #
@@ -4739,15 +4793,14 @@ class bingx(Exchange, ImplicitAPI):
4739
4793
  return self.parse_transfers(rows, currency, since, limit)
4740
4794
 
4741
4795
  def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
4742
- tranId = self.safe_string(transfer, 'tranId')
4796
+ tranId = self.safe_string(transfer, 'transferId')
4743
4797
  timestamp = self.safe_integer(transfer, 'timestamp')
4744
- currencyCode = self.safe_currency_code(None, currency)
4798
+ currencyId = self.safe_string(transfer, 'asset')
4799
+ currencyCode = self.safe_currency_code(currencyId, currency)
4745
4800
  status = self.safe_string(transfer, 'status')
4746
4801
  accountsById = self.safe_dict(self.options, 'accountsById', {})
4747
- typeId = self.safe_string(transfer, 'type')
4748
- typeIdSplit = typeId.split('_')
4749
- fromId = self.safe_string(typeIdSplit, 0)
4750
- toId = self.safe_string(typeIdSplit, 1)
4802
+ fromId = self.safe_string(transfer, 'fromAccount')
4803
+ toId = self.safe_string(transfer, 'toAccount')
4751
4804
  fromAccount = self.safe_string(accountsById, fromId, fromId)
4752
4805
  toAccount = self.safe_string(accountsById, toId, toId)
4753
4806
  return {
@@ -5458,37 +5511,13 @@ class bingx(Exchange, ImplicitAPI):
5458
5511
 
5459
5512
  def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
5460
5513
  #
5461
- # {
5462
- # "coin": "BTC",
5463
- # "name": "BTC",
5464
- # "networkList": [
5465
- # {
5466
- # "name": "BTC",
5467
- # "network": "BTC",
5468
- # "isDefault": True,
5469
- # "minConfirm": "2",
5470
- # "withdrawEnable": True,
5471
- # "withdrawFee": "0.00035",
5472
- # "withdrawMax": "1.62842",
5473
- # "withdrawMin": "0.0005"
5474
- # },
5475
- # {
5476
- # "name": "BTC",
5477
- # "network": "BEP20",
5478
- # "isDefault": False,
5479
- # "minConfirm": "15",
5480
- # "withdrawEnable": True,
5481
- # "withdrawFee": "0.00001",
5482
- # "withdrawMax": "1.62734",
5483
- # "withdrawMin": "0.0001"
5484
- # }
5485
- # ]
5486
- # }
5514
+ # currencie structure
5487
5515
  #
5488
- networkList = self.safe_list(fee, 'networkList', [])
5489
- networkListLength = len(networkList)
5516
+ networks = self.safe_dict(fee, 'networks', {})
5517
+ networkCodes = list(networks.keys())
5518
+ networksLength = len(networkCodes)
5490
5519
  result: dict = {
5491
- 'info': fee,
5520
+ 'info': networks,
5492
5521
  'withdraw': {
5493
5522
  'fee': None,
5494
5523
  'percentage': None,
@@ -5499,18 +5528,15 @@ class bingx(Exchange, ImplicitAPI):
5499
5528
  },
5500
5529
  'networks': {},
5501
5530
  }
5502
- if networkListLength != 0:
5503
- for i in range(0, networkListLength):
5504
- network = networkList[i]
5505
- networkId = self.safe_string(network, 'network')
5506
- isDefault = self.safe_bool(network, 'isDefault')
5507
- currencyCode = self.safe_string(currency, 'code')
5508
- networkCode = self.network_id_to_code(networkId, currencyCode)
5531
+ if networksLength != 0:
5532
+ for i in range(0, networksLength):
5533
+ networkCode = networkCodes[i]
5534
+ network = networks[networkCode]
5509
5535
  result['networks'][networkCode] = {
5510
5536
  'deposit': {'fee': None, 'percentage': None},
5511
- 'withdraw': {'fee': self.safe_number(network, 'withdrawFee'), 'percentage': False},
5537
+ 'withdraw': {'fee': self.safe_number(network, 'fee'), 'percentage': False},
5512
5538
  }
5513
- if isDefault:
5539
+ if networksLength == 1:
5514
5540
  result['withdraw']['fee'] = self.safe_number(network, 'withdrawFee')
5515
5541
  result['withdraw']['percentage'] = False
5516
5542
  return result
@@ -5526,9 +5552,15 @@ class bingx(Exchange, ImplicitAPI):
5526
5552
  :returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
5527
5553
  """
5528
5554
  self.load_markets()
5529
- response = self.walletsV1PrivateGetCapitalConfigGetall(params)
5530
- coins = self.safe_list(response, 'data')
5531
- return self.parse_deposit_withdraw_fees(coins, codes, 'coin')
5555
+ response = self.fetch_currencies(params)
5556
+ depositWithdrawFees: dict = {}
5557
+ responseCodes = list(response.keys())
5558
+ for i in range(0, len(responseCodes)):
5559
+ code = responseCodes[i]
5560
+ if (codes is None) or (self.in_array(code, codes)):
5561
+ entry = response[code]
5562
+ depositWithdrawFees[code] = self.parse_deposit_withdraw_fee(entry)
5563
+ return depositWithdrawFees
5532
5564
 
5533
5565
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
5534
5566
  """
@@ -6228,8 +6260,13 @@ class bingx(Exchange, ImplicitAPI):
6228
6260
  raise NotSupported(self.id + ' does not have a testnet/sandbox URL for ' + type + ' endpoints')
6229
6261
  url = self.implode_hostname(self.urls['api'][type])
6230
6262
  path = self.implode_params(path, params)
6231
- if version == 'transfer':
6232
- type = 'account/transfer'
6263
+ versionIsTransfer = (version == 'transfer')
6264
+ versionIsAsset = (version == 'asset')
6265
+ if versionIsTransfer or versionIsAsset:
6266
+ if versionIsTransfer:
6267
+ type = 'account/transfer'
6268
+ else:
6269
+ type = 'api/asset'
6233
6270
  version = section[2]
6234
6271
  access = section[3]
6235
6272
  if path != 'account/apiPermissions':
ccxt/bitget.py CHANGED
@@ -1997,7 +1997,7 @@ class bitget(Exchange, ImplicitAPI):
1997
1997
  'cross': hasCrossMargin,
1998
1998
  'isolated': hasIsolatedMargin,
1999
1999
  }
2000
- isMarginTradingAllowed = hasCrossMargin or hasCrossMargin
2000
+ isMarginTradingAllowed = hasCrossMargin or hasIsolatedMargin
2001
2001
  else:
2002
2002
  if symbolType == 'perpetual':
2003
2003
  type = 'swap'
ccxt/bitstamp.py CHANGED
@@ -11,6 +11,7 @@ from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
13
13
  from ccxt.base.errors import PermissionDenied
14
+ from ccxt.base.errors import AccountSuspended
14
15
  from ccxt.base.errors import BadRequest
15
16
  from ccxt.base.errors import InsufficientFunds
16
17
  from ccxt.base.errors import InvalidAddress
@@ -531,6 +532,7 @@ class bitstamp(Exchange, ImplicitAPI):
531
532
  "Bitstamp.net is under scheduled maintenance. We'll be back soon.": OnMaintenance, # {"error": "Bitstamp.net is under scheduled maintenance. We'll be back soon."}
532
533
  'Order could not be placed.': ExchangeNotAvailable, # Order could not be placed(perhaps due to internal error or trade halt). Please retry placing order.
533
534
  'Invalid offset.': BadRequest,
535
+ 'Trading is currently unavailable for your account.': AccountSuspended, # {"status": "error", "reason": {"__all__": ["Trading is currently unavailable for your account."]}, "response_code": "403.004"}
534
536
  },
535
537
  'broad': {
536
538
  'Minimum order size is': InvalidOrder, # Minimum order size is 5.0 EUR.
ccxt/blofin.py CHANGED
@@ -904,6 +904,7 @@ class blofin(Exchange, ImplicitAPI):
904
904
  :param int [limit]: the maximum amount of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>` to fetch
905
905
  :param dict [params]: extra parameters specific to the exchange API endpoint
906
906
  :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)
907
+ :param int [params.until]: timestamp in ms of the latest funding rate to fetch
907
908
  :returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>`
908
909
  """
909
910
  if symbol is None:
@@ -912,7 +913,7 @@ class blofin(Exchange, ImplicitAPI):
912
913
  paginate = False
913
914
  paginate, params = self.handle_option_and_params(params, 'fetchFundingRateHistory', 'paginate')
914
915
  if paginate:
915
- return self.fetch_paginated_call_deterministic('fetchFundingRateHistory', symbol, since, limit, '8h', params)
916
+ return self.fetch_paginated_call_deterministic('fetchFundingRateHistory', symbol, since, limit, '8h', params, 100)
916
917
  market = self.market(symbol)
917
918
  request: dict = {
918
919
  'instId': market['id'],
@@ -921,6 +922,10 @@ class blofin(Exchange, ImplicitAPI):
921
922
  request['before'] = max(since - 1, 0)
922
923
  if limit is not None:
923
924
  request['limit'] = limit
925
+ until = self.safe_integer(params, 'until')
926
+ if until is not None:
927
+ request['after'] = until
928
+ params = self.omit(params, 'until')
924
929
  response = self.publicGetMarketFundingRateHistory(self.extend(request, params))
925
930
  rates = []
926
931
  data = self.safe_list(response, 'data', [])
ccxt/bybit.py CHANGED
@@ -8082,7 +8082,7 @@ classic accounts only/ spot not supported* fetches information on an order made
8082
8082
  'timestamp': timestamp,
8083
8083
  'datetime': self.iso8601(timestamp),
8084
8084
  'id': self.safe_string(income, 'execId'),
8085
- 'amount': self.safe_number(income, 'execQty'),
8085
+ 'amount': self.safe_number(income, 'execFee'),
8086
8086
  'rate': self.safe_number(income, 'feeRate'),
8087
8087
  }
8088
8088
 
ccxt/coinbase.py CHANGED
@@ -51,6 +51,9 @@ class coinbase(Exchange, ImplicitAPI):
51
51
  'future': False,
52
52
  'option': False,
53
53
  'addMargin': False,
54
+ 'borrowCrossMargin': False,
55
+ 'borrowIsolatedMargin': False,
56
+ 'borrowMargin': False,
54
57
  'cancelOrder': True,
55
58
  'cancelOrders': True,
56
59
  'closeAllPositions': False,
@@ -65,6 +68,8 @@ class coinbase(Exchange, ImplicitAPI):
65
68
  'createMarketSellOrder': True,
66
69
  'createMarketSellOrderWithCost': False,
67
70
  'createOrder': True,
71
+ 'createOrderWithTakeProfitAndStopLoss': False,
72
+ 'createOrderWithTakeProfitAndStopLossWs': False,
68
73
  'createPostOnlyOrder': True,
69
74
  'createReduceOnlyOrder': False,
70
75
  'createStopLimitOrder': True,
@@ -75,8 +80,12 @@ class coinbase(Exchange, ImplicitAPI):
75
80
  'fetchAccounts': True,
76
81
  'fetchBalance': True,
77
82
  'fetchBidsAsks': True,
83
+ 'fetchBorrowInterest': False,
84
+ 'fetchBorrowRate': False,
78
85
  'fetchBorrowRateHistories': False,
79
86
  'fetchBorrowRateHistory': False,
87
+ 'fetchBorrowRates': False,
88
+ 'fetchBorrowRatesPerSymbol': False,
80
89
  'fetchCanceledOrders': True,
81
90
  'fetchClosedOrders': True,
82
91
  'fetchConvertQuote': True,
@@ -94,42 +103,69 @@ class coinbase(Exchange, ImplicitAPI):
94
103
  'fetchDeposits': True,
95
104
  'fetchDepositsWithdrawals': True,
96
105
  'fetchFundingHistory': False,
106
+ 'fetchFundingInterval': False,
107
+ 'fetchFundingIntervals': False,
97
108
  'fetchFundingRate': False,
98
109
  'fetchFundingRateHistory': False,
99
110
  'fetchFundingRates': False,
111
+ 'fetchGreeks': False,
100
112
  'fetchIndexOHLCV': False,
101
113
  'fetchIsolatedBorrowRate': False,
102
114
  'fetchIsolatedBorrowRates': False,
115
+ 'fetchIsolatedPositions': False,
103
116
  'fetchL2OrderBook': False,
104
117
  'fetchLedger': True,
105
118
  'fetchLeverage': False,
119
+ 'fetchLeverages': False,
106
120
  'fetchLeverageTiers': False,
121
+ 'fetchLiquidations': False,
122
+ 'fetchLongShortRatio': False,
123
+ 'fetchLongShortRatioHistory': False,
124
+ 'fetchMarginAdjustmentHistory': False,
107
125
  'fetchMarginMode': False,
126
+ 'fetchMarginModes': False,
127
+ 'fetchMarketLeverageTiers': False,
108
128
  'fetchMarkets': True,
109
129
  'fetchMarkOHLCV': False,
130
+ 'fetchMarkPrices': False,
110
131
  'fetchMyBuys': True,
132
+ 'fetchMyLiquidations': False,
111
133
  'fetchMySells': True,
134
+ 'fetchMySettlementHistory': False,
112
135
  'fetchMyTrades': True,
113
136
  'fetchOHLCV': True,
137
+ 'fetchOpenInterest': False,
114
138
  'fetchOpenInterestHistory': False,
139
+ 'fetchOpenInterests': False,
115
140
  'fetchOpenOrders': True,
141
+ 'fetchOption': False,
142
+ 'fetchOptionChain': False,
116
143
  'fetchOrder': True,
117
144
  'fetchOrderBook': True,
118
145
  'fetchOrders': True,
119
146
  'fetchPosition': True,
147
+ 'fetchPositionHistory': False,
120
148
  'fetchPositionMode': False,
121
149
  'fetchPositions': True,
150
+ 'fetchPositionsForSymbol': False,
151
+ 'fetchPositionsHistory': False,
122
152
  'fetchPositionsRisk': False,
123
153
  'fetchPremiumIndexOHLCV': False,
154
+ 'fetchSettlementHistory': False,
124
155
  'fetchTicker': True,
125
156
  'fetchTickers': True,
126
157
  'fetchTime': True,
127
158
  'fetchTrades': True,
128
159
  'fetchTradingFee': 'emulated',
129
160
  'fetchTradingFees': True,
161
+ 'fetchVolatilityHistory': False,
130
162
  'fetchWithdrawals': True,
131
163
  'reduceMargin': False,
164
+ 'repayCrossMargin': False,
165
+ 'repayIsolatedMargin': False,
166
+ 'repayMargin': False,
132
167
  'setLeverage': False,
168
+ 'setMargin': False,
133
169
  'setMarginMode': False,
134
170
  'setPositionMode': False,
135
171
  'withdraw': True,