ccxt 4.4.25__py2.py3-none-any.whl → 4.4.27__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 (123) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/alpaca.py +3 -0
  3. ccxt/abstract/bingx.py +1 -0
  4. ccxt/abstract/hyperliquid.py +1 -1
  5. ccxt/abstract/okx.py +1 -0
  6. ccxt/abstract/phemex.py +1 -0
  7. ccxt/ace.py +1 -1
  8. ccxt/alpaca.py +426 -17
  9. ccxt/ascendex.py +1 -1
  10. ccxt/async_support/__init__.py +1 -1
  11. ccxt/async_support/ace.py +1 -1
  12. ccxt/async_support/alpaca.py +426 -17
  13. ccxt/async_support/ascendex.py +1 -1
  14. ccxt/async_support/base/exchange.py +24 -6
  15. ccxt/async_support/bequant.py +1 -1
  16. ccxt/async_support/bigone.py +1 -1
  17. ccxt/async_support/binance.py +6 -7
  18. ccxt/async_support/binancecoinm.py +1 -1
  19. ccxt/async_support/binanceus.py +1 -1
  20. ccxt/async_support/binanceusdm.py +1 -1
  21. ccxt/async_support/bingx.py +29 -29
  22. ccxt/async_support/bit2c.py +1 -1
  23. ccxt/async_support/bitbank.py +1 -1
  24. ccxt/async_support/bitbns.py +1 -1
  25. ccxt/async_support/bitfinex.py +1 -1
  26. ccxt/async_support/bitfinex2.py +1 -1
  27. ccxt/async_support/bitflyer.py +1 -1
  28. ccxt/async_support/bitget.py +6 -6
  29. ccxt/async_support/bithumb.py +1 -1
  30. ccxt/async_support/bitmart.py +7 -7
  31. ccxt/async_support/bitmex.py +1 -1
  32. ccxt/async_support/bitopro.py +1 -1
  33. ccxt/async_support/bitrue.py +1 -1
  34. ccxt/async_support/bitso.py +1 -1
  35. ccxt/async_support/bitstamp.py +1 -1
  36. ccxt/async_support/bitteam.py +1 -1
  37. ccxt/async_support/bitvavo.py +1 -1
  38. ccxt/async_support/bl3p.py +1 -1
  39. ccxt/async_support/blockchaincom.py +1 -1
  40. ccxt/async_support/blofin.py +1 -1
  41. ccxt/async_support/btcalpha.py +1 -1
  42. ccxt/async_support/btcbox.py +1 -1
  43. ccxt/async_support/btcmarkets.py +1 -1
  44. ccxt/async_support/btcturk.py +1 -1
  45. ccxt/async_support/bybit.py +10 -16
  46. ccxt/async_support/cex.py +36 -0
  47. ccxt/async_support/coinbase.py +89 -11
  48. ccxt/async_support/coinex.py +6 -8
  49. ccxt/async_support/digifinex.py +5 -5
  50. ccxt/async_support/exmo.py +1 -0
  51. ccxt/async_support/gate.py +26 -22
  52. ccxt/async_support/htx.py +5 -6
  53. ccxt/async_support/hyperliquid.py +31 -5
  54. ccxt/async_support/kucoin.py +5 -5
  55. ccxt/async_support/lbank.py +97 -2
  56. ccxt/async_support/okx.py +6 -5
  57. ccxt/async_support/phemex.py +4 -2
  58. ccxt/async_support/wavesexchange.py +13 -2
  59. ccxt/async_support/whitebit.py +5 -5
  60. ccxt/async_support/woo.py +1 -1
  61. ccxt/async_support/xt.py +32 -24
  62. ccxt/base/exchange.py +29 -6
  63. ccxt/base/types.py +12 -0
  64. ccxt/bequant.py +1 -1
  65. ccxt/bigone.py +1 -1
  66. ccxt/binance.py +6 -7
  67. ccxt/binancecoinm.py +1 -1
  68. ccxt/binanceus.py +1 -1
  69. ccxt/binanceusdm.py +1 -1
  70. ccxt/bingx.py +29 -29
  71. ccxt/bit2c.py +1 -1
  72. ccxt/bitbank.py +1 -1
  73. ccxt/bitbns.py +1 -1
  74. ccxt/bitfinex.py +1 -1
  75. ccxt/bitfinex2.py +1 -1
  76. ccxt/bitflyer.py +1 -1
  77. ccxt/bitget.py +6 -6
  78. ccxt/bithumb.py +1 -1
  79. ccxt/bitmart.py +7 -7
  80. ccxt/bitmex.py +1 -1
  81. ccxt/bitopro.py +1 -1
  82. ccxt/bitrue.py +1 -1
  83. ccxt/bitso.py +1 -1
  84. ccxt/bitstamp.py +1 -1
  85. ccxt/bitteam.py +1 -1
  86. ccxt/bitvavo.py +1 -1
  87. ccxt/bl3p.py +1 -1
  88. ccxt/blockchaincom.py +1 -1
  89. ccxt/blofin.py +1 -1
  90. ccxt/btcalpha.py +1 -1
  91. ccxt/btcbox.py +1 -1
  92. ccxt/btcmarkets.py +1 -1
  93. ccxt/btcturk.py +1 -1
  94. ccxt/bybit.py +10 -16
  95. ccxt/cex.py +36 -0
  96. ccxt/coinbase.py +89 -11
  97. ccxt/coinex.py +6 -8
  98. ccxt/digifinex.py +5 -5
  99. ccxt/exmo.py +1 -0
  100. ccxt/gate.py +26 -22
  101. ccxt/htx.py +5 -6
  102. ccxt/hyperliquid.py +31 -5
  103. ccxt/kucoin.py +5 -5
  104. ccxt/lbank.py +97 -2
  105. ccxt/okx.py +6 -5
  106. ccxt/phemex.py +4 -2
  107. ccxt/pro/__init__.py +1 -1
  108. ccxt/pro/binance.py +2 -2
  109. ccxt/pro/bybit.py +1 -1
  110. ccxt/pro/exmo.py +204 -4
  111. ccxt/pro/lbank.py +7 -4
  112. ccxt/pro/okx.py +1 -1
  113. ccxt/test/tests_helpers.py +3 -1
  114. ccxt/wavesexchange.py +13 -2
  115. ccxt/whitebit.py +5 -5
  116. ccxt/woo.py +1 -1
  117. ccxt/xt.py +32 -24
  118. ccxt-4.4.27.dist-info/METADATA +637 -0
  119. {ccxt-4.4.25.dist-info → ccxt-4.4.27.dist-info}/RECORD +122 -122
  120. ccxt-4.4.25.dist-info/METADATA +0 -636
  121. {ccxt-4.4.25.dist-info → ccxt-4.4.27.dist-info}/LICENSE.txt +0 -0
  122. {ccxt-4.4.25.dist-info → ccxt-4.4.27.dist-info}/WHEEL +0 -0
  123. {ccxt-4.4.25.dist-info → ccxt-4.4.27.dist-info}/top_level.txt +0 -0
ccxt/binance.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.binance import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import LongShortRatio, Balances, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, LongShortRatio, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -211,7 +211,7 @@ class binance(Exchange, ImplicitAPI):
211
211
  '1M': '1M',
212
212
  },
213
213
  'urls': {
214
- 'logo': 'https://user-images.githubusercontent.com/1294454/29604020-d5483cdc-87ee-11e7-94c7-d1a8d9169293.jpg',
214
+ 'logo': 'https://github.com/user-attachments/assets/e9419b93-ccb0-46aa-9bff-c883f096274b',
215
215
  'test': {
216
216
  'dapiPublic': 'https://testnet.binancefuture.com/dapi/v1',
217
217
  'dapiPrivate': 'https://testnet.binancefuture.com/dapi/v1',
@@ -11304,7 +11304,7 @@ class binance(Exchange, ImplicitAPI):
11304
11304
  #
11305
11305
  return response
11306
11306
 
11307
- def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
11307
+ def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
11308
11308
  """
11309
11309
  fetch the interest owed by the user for borrowing currency for margin trading
11310
11310
  :see: https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History
@@ -11378,21 +11378,20 @@ class binance(Exchange, ImplicitAPI):
11378
11378
  interest = self.parse_borrow_interests(rows, market)
11379
11379
  return self.filter_by_currency_since_limit(interest, code, since, limit)
11380
11380
 
11381
- def parse_borrow_interest(self, info: dict, market: Market = None):
11381
+ def parse_borrow_interest(self, info: dict, market: Market = None) -> BorrowInterest:
11382
11382
  symbol = self.safe_string(info, 'isolatedSymbol')
11383
11383
  timestamp = self.safe_integer(info, 'interestAccuredTime')
11384
11384
  marginMode = 'cross' if (symbol is None) else 'isolated'
11385
11385
  return {
11386
- 'account': 'cross' if (symbol is None) else symbol,
11386
+ 'info': info,
11387
11387
  'symbol': symbol,
11388
- 'marginMode': marginMode,
11389
11388
  'currency': self.safe_currency_code(self.safe_string(info, 'asset')),
11390
11389
  'interest': self.safe_number(info, 'interest'),
11391
11390
  'interestRate': self.safe_number(info, 'interestRate'),
11392
11391
  'amountBorrowed': self.safe_number(info, 'principal'),
11392
+ 'marginMode': marginMode,
11393
11393
  'timestamp': timestamp,
11394
11394
  'datetime': self.iso8601(timestamp),
11395
- 'info': info,
11396
11395
  }
11397
11396
 
11398
11397
  def repay_cross_margin(self, code: str, amount, params={}):
ccxt/binancecoinm.py CHANGED
@@ -14,7 +14,7 @@ class binancecoinm(binance, ImplicitAPI):
14
14
  'id': 'binancecoinm',
15
15
  'name': 'Binance COIN-M',
16
16
  'urls': {
17
- 'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
17
+ 'logo': 'https://github.com/user-attachments/assets/387cfc4e-5f33-48cd-8f5c-cd4854dabf0c',
18
18
  'doc': [
19
19
  'https://binance-docs.github.io/apidocs/delivery/en/',
20
20
  'https://binance-docs.github.io/apidocs/spot/en',
ccxt/binanceus.py CHANGED
@@ -19,7 +19,7 @@ class binanceus(binance, ImplicitAPI):
19
19
  'certified': False,
20
20
  'pro': True,
21
21
  'urls': {
22
- 'logo': 'https://user-images.githubusercontent.com/1294454/65177307-217b7c80-da5f-11e9-876e-0b748ba0a358.jpg',
22
+ 'logo': 'https://github.com/user-attachments/assets/a9667919-b632-4d52-a832-df89f8a35e8c',
23
23
  'api': {
24
24
  'web': 'https://www.binance.us',
25
25
  'public': 'https://api.binance.us/api/v3',
ccxt/binanceusdm.py CHANGED
@@ -15,7 +15,7 @@ class binanceusdm(binance, ImplicitAPI):
15
15
  'id': 'binanceusdm',
16
16
  'name': 'Binance USDⓈ-M',
17
17
  'urls': {
18
- 'logo': 'https://user-images.githubusercontent.com/1294454/117738721-668c8d80-b205-11eb-8c49-3fad84c4a07f.jpg',
18
+ 'logo': 'https://github.com/user-attachments/assets/871cbea7-eebb-4b28-b260-c1c91df0487a',
19
19
  'doc': [
20
20
  'https://binance-docs.github.io/apidocs/futures/en/',
21
21
  'https://binance-docs.github.io/apidocs/spot/en',
ccxt/bingx.py CHANGED
@@ -219,6 +219,7 @@ class bingx(Exchange, ImplicitAPI):
219
219
  'market/markPriceKlines': 1,
220
220
  'trade/batchCancelReplace': 5,
221
221
  'trade/fullOrder': 2,
222
+ 'positionMargin/history': 2,
222
223
  },
223
224
  'post': {
224
225
  'trade/cancelReplace': 2,
@@ -2676,33 +2677,37 @@ class bingx(Exchange, ImplicitAPI):
2676
2677
  :see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Bulk%20order
2677
2678
  :param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
2678
2679
  :param dict [params]: extra parameters specific to the exchange API endpoint
2680
+ :param boolean [params.sync]: *spot only* if True, multiple orders are ordered serially and all orders do not require the same symbol/side/type
2679
2681
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2680
2682
  """
2681
2683
  self.load_markets()
2682
2684
  ordersRequests = []
2683
- symbol = None
2685
+ marketIds = []
2684
2686
  for i in range(0, len(orders)):
2685
2687
  rawOrder = orders[i]
2686
2688
  marketId = self.safe_string(rawOrder, 'symbol')
2687
- if symbol is None:
2688
- symbol = marketId
2689
- else:
2690
- if symbol != marketId:
2691
- raise BadRequest(self.id + ' createOrders() requires all orders to have the same symbol')
2692
2689
  type = self.safe_string(rawOrder, 'type')
2690
+ marketIds.append(marketId)
2693
2691
  side = self.safe_string(rawOrder, 'side')
2694
2692
  amount = self.safe_number(rawOrder, 'amount')
2695
2693
  price = self.safe_number(rawOrder, 'price')
2696
2694
  orderParams = self.safe_dict(rawOrder, 'params', {})
2697
2695
  orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams)
2698
2696
  ordersRequests.append(orderRequest)
2699
- market = self.market(symbol)
2697
+ symbols = self.market_symbols(marketIds, None, False, True, True)
2698
+ symbolsLength = len(symbols)
2699
+ market = self.market(symbols[0])
2700
2700
  request: dict = {}
2701
2701
  response = None
2702
2702
  if market['swap']:
2703
+ if symbolsLength > 5:
2704
+ raise InvalidOrder(self.id + ' createOrders() can not create more than 5 orders at once for swap markets')
2703
2705
  request['batchOrders'] = self.json(ordersRequests)
2704
2706
  response = self.swapV2PrivatePostTradeBatchOrders(request)
2705
2707
  else:
2708
+ sync = self.safe_bool(params, 'sync', False)
2709
+ if sync:
2710
+ request['sync'] = True
2706
2711
  request['data'] = self.json(ordersRequests)
2707
2712
  response = self.spotV1PrivatePostTradeBatchOrders(request)
2708
2713
  #
@@ -2750,6 +2755,12 @@ class bingx(Exchange, ImplicitAPI):
2750
2755
  # }
2751
2756
  # }
2752
2757
  #
2758
+ if isinstance(response, str):
2759
+ # broken api engine : order-ids are too long numbers(i.e. 1742930526912864656)
2760
+ # and json.loadscan not handle them in JS, so we have to use .parseJson
2761
+ # however, when order has an attached SL/TP, their value types need extra parsing
2762
+ response = self.fix_stringified_json_members(response)
2763
+ response = self.parse_json(response)
2753
2764
  data = self.safe_dict(response, 'data', {})
2754
2765
  result = self.safe_list(data, 'orders', [])
2755
2766
  return self.parse_orders(result, market)
@@ -3139,7 +3150,7 @@ class bingx(Exchange, ImplicitAPI):
3139
3150
  'cost': Precise.string_abs(feeCost),
3140
3151
  },
3141
3152
  'trades': None,
3142
- 'reduceOnly': self.safe_bool(order, 'reduceOnly'),
3153
+ 'reduceOnly': self.safe_bool_2(order, 'reduceOnly', 'ro'),
3143
3154
  }, market)
3144
3155
 
3145
3156
  def parse_order_status(self, status: Str):
@@ -4294,32 +4305,21 @@ class bingx(Exchange, ImplicitAPI):
4294
4305
 
4295
4306
  def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
4296
4307
  #
4297
- # {
4298
- # "coinId": "799",
4299
- # "coin": "USDT",
4300
- # "network": "BEP20",
4301
- # "address": "6a7eda2817462dabb6493277a2cfe0f5c3f2550b",
4302
- # "tag": ''
4303
- # }
4308
+ # {
4309
+ # "coinId":"4",
4310
+ # "coin":"USDT",
4311
+ # "network":"OMNI",
4312
+ # "address":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN",
4313
+ # "addressWithPrefix":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN"
4314
+ # }
4304
4315
  #
4305
- address = self.safe_string(depositAddress, 'address')
4306
4316
  tag = self.safe_string(depositAddress, 'tag')
4307
4317
  currencyId = self.safe_string(depositAddress, 'coin')
4308
4318
  currency = self.safe_currency(currencyId, currency)
4309
4319
  code = currency['code']
4310
- # the exchange API returns deposit addresses without the leading '0x' prefix
4311
- # however, the exchange API does require the 0x prefix to withdraw
4312
- # so we append the prefix before returning the address to the user
4313
- # that is only if the underlying contract address has the 0x prefix
4314
- networkCode = self.safe_string(depositAddress, 'network')
4315
- if networkCode is not None:
4316
- if networkCode in currency['networks']:
4317
- network = currency['networks'][networkCode]
4318
- contractAddress = self.safe_string(network['info'], 'contractAddress')
4319
- if contractAddress is not None:
4320
- if contractAddress[0] == '0' and contractAddress[1] == 'x':
4321
- if address[0] != '0' or address[1] != 'x':
4322
- address = '0x' + address
4320
+ address = self.safe_string(depositAddress, 'addressWithPrefix')
4321
+ networkdId = self.safe_string(depositAddress, 'network')
4322
+ networkCode = self.network_id_to_code(networkdId, code)
4323
4323
  self.check_address(address)
4324
4324
  return {
4325
4325
  'info': depositAddress,
ccxt/bit2c.py CHANGED
@@ -85,7 +85,7 @@ class bit2c(Exchange, ImplicitAPI):
85
85
  'ws': False,
86
86
  },
87
87
  'urls': {
88
- 'logo': 'https://user-images.githubusercontent.com/1294454/27766119-3593220e-5ece-11e7-8b3a-5a041f6bcc3f.jpg',
88
+ 'logo': 'https://github.com/user-attachments/assets/db0bce50-6842-4c09-a1d5-0c87d22118aa',
89
89
  'api': {
90
90
  'rest': 'https://bit2c.co.il',
91
91
  },
ccxt/bitbank.py CHANGED
@@ -100,7 +100,7 @@ class bitbank(Exchange, ImplicitAPI):
100
100
  },
101
101
  'hostname': 'bitbank.cc',
102
102
  'urls': {
103
- 'logo': 'https://user-images.githubusercontent.com/1294454/37808081-b87f2d9c-2e59-11e8-894d-c1900b7584fe.jpg',
103
+ 'logo': 'https://github.com/user-attachments/assets/9d616de0-8a88-4468-8e38-d269acab0348',
104
104
  'api': {
105
105
  'public': 'https://public.{hostname}',
106
106
  'private': 'https://api.{hostname}',
ccxt/bitbns.py CHANGED
@@ -74,7 +74,7 @@ class bitbns(Exchange, ImplicitAPI):
74
74
  },
75
75
  'hostname': 'bitbns.com',
76
76
  'urls': {
77
- 'logo': 'https://user-images.githubusercontent.com/1294454/117201933-e7a6e780-adf5-11eb-9d80-98fc2a21c3d6.jpg',
77
+ 'logo': 'https://github.com/user-attachments/assets/a5b9a562-cdd8-4bea-9fa7-fd24c1dad3d9',
78
78
  'api': {
79
79
  'www': 'https://{hostname}',
80
80
  'v1': 'https://api.{hostname}/api/trade/v1',
ccxt/bitfinex.py CHANGED
@@ -104,7 +104,7 @@ class bitfinex(Exchange, ImplicitAPI):
104
104
  '1M': '1M',
105
105
  },
106
106
  'urls': {
107
- 'logo': 'https://user-images.githubusercontent.com/1294454/27766244-e328a50c-5ed2-11e7-947b-041416579bb3.jpg',
107
+ 'logo': 'https://github.com/user-attachments/assets/9147c6c5-7197-481e-827b-7483672bb0e9',
108
108
  'api': {
109
109
  'v2': 'https://api-pub.bitfinex.com', # https://github.com/ccxt/ccxt/issues/5109
110
110
  'public': 'https://api.bitfinex.com',
ccxt/bitfinex2.py CHANGED
@@ -147,7 +147,7 @@ class bitfinex2(Exchange, ImplicitAPI):
147
147
  # cheapest endpoint is 240 requests per minute => ~ 4 requests per second =>( 1000ms / 4 ) = 250ms between requests on average
148
148
  'rateLimit': 250,
149
149
  'urls': {
150
- 'logo': 'https://user-images.githubusercontent.com/1294454/27766244-e328a50c-5ed2-11e7-947b-041416579bb3.jpg',
150
+ 'logo': 'https://github.com/user-attachments/assets/4a8e947f-ab46-481a-a8ae-8b20e9b03178',
151
151
  'api': {
152
152
  'v1': 'https://api.bitfinex.com',
153
153
  'public': 'https://api-pub.bitfinex.com',
ccxt/bitflyer.py CHANGED
@@ -62,7 +62,7 @@ class bitflyer(Exchange, ImplicitAPI):
62
62
  'withdraw': True,
63
63
  },
64
64
  'urls': {
65
- 'logo': 'https://user-images.githubusercontent.com/1294454/28051642-56154182-660e-11e7-9b0d-6042d1e6edd8.jpg',
65
+ 'logo': 'https://github.com/user-attachments/assets/d0217747-e54d-4533-8416-0d553dca74bb',
66
66
  'api': {
67
67
  'rest': 'https://api.{hostname}',
68
68
  },
ccxt/bitget.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitget import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import LongShortRatio, Balances, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, FundingHistory, Int, IsolatedBorrowRate, LedgerEntry, Leverage, LeverageTier, Liquidation, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, FundingHistory, Int, IsolatedBorrowRate, LedgerEntry, Leverage, LeverageTier, Liquidation, LongShortRatio, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -181,7 +181,7 @@ class bitget(Exchange, ImplicitAPI):
181
181
  },
182
182
  'hostname': 'bitget.com',
183
183
  'urls': {
184
- 'logo': 'https://user-images.githubusercontent.com/1294454/195989417-4253ddb0-afbe-4a1c-9dea-9dbcd121fa5d.jpg',
184
+ 'logo': 'https://github.com/user-attachments/assets/fbaa10cc-a277-441d-a5b7-997dd9a87658',
185
185
  'api': {
186
186
  'spot': 'https://api.{hostname}',
187
187
  'mix': 'https://api.{hostname}',
@@ -7628,7 +7628,7 @@ class bitget(Exchange, ImplicitAPI):
7628
7628
  'info': info,
7629
7629
  }
7630
7630
 
7631
- def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
7631
+ def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
7632
7632
  """
7633
7633
  fetch the interest owed by the user for borrowing currency for margin trading
7634
7634
  :see: https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Interest-Records
@@ -7725,7 +7725,7 @@ class bitget(Exchange, ImplicitAPI):
7725
7725
  interest = self.parse_borrow_interests(rows, market)
7726
7726
  return self.filter_by_currency_since_limit(interest, code, since, limit)
7727
7727
 
7728
- def parse_borrow_interest(self, info: dict, market: Market = None):
7728
+ def parse_borrow_interest(self, info: dict, market: Market = None) -> BorrowInterest:
7729
7729
  #
7730
7730
  # isolated
7731
7731
  #
@@ -7759,15 +7759,15 @@ class bitget(Exchange, ImplicitAPI):
7759
7759
  marginMode = 'isolated' if (marketId is not None) else 'cross'
7760
7760
  timestamp = self.safe_integer(info, 'cTime')
7761
7761
  return {
7762
+ 'info': info,
7762
7763
  'symbol': self.safe_string(market, 'symbol'),
7763
- 'marginMode': marginMode,
7764
7764
  'currency': self.safe_currency_code(self.safe_string(info, 'interestCoin')),
7765
7765
  'interest': self.safe_number(info, 'interestAmount'),
7766
7766
  'interestRate': self.safe_number(info, 'dailyInterestRate'),
7767
7767
  'amountBorrowed': None,
7768
+ 'marginMode': marginMode,
7768
7769
  'timestamp': timestamp,
7769
7770
  'datetime': self.iso8601(timestamp),
7770
- 'info': info,
7771
7771
  }
7772
7772
 
7773
7773
  def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
ccxt/bithumb.py CHANGED
@@ -87,7 +87,7 @@ class bithumb(Exchange, ImplicitAPI):
87
87
  },
88
88
  'hostname': 'bithumb.com',
89
89
  'urls': {
90
- 'logo': 'https://user-images.githubusercontent.com/1294454/30597177-ea800172-9d5e-11e7-804c-b9d4fa9b56b0.jpg',
90
+ 'logo': 'https://github.com/user-attachments/assets/c9e0eefb-4777-46b9-8f09-9d7f7c4af82d',
91
91
  'api': {
92
92
  'public': 'https://api.{hostname}/public',
93
93
  'private': 'https://api.{hostname}',
ccxt/bitmart.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitmart import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, IsolatedBorrowRate, IsolatedBorrowRates, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, BorrowInterest, Currencies, Currency, DepositAddress, Int, IsolatedBorrowRate, IsolatedBorrowRates, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -127,7 +127,7 @@ class bitmart(Exchange, ImplicitAPI):
127
127
  },
128
128
  'hostname': 'bitmart.com', # bitmart.info, bitmart.news for Hong Kong users
129
129
  'urls': {
130
- 'logo': 'https://user-images.githubusercontent.com/1294454/129991357-8f47464b-d0f4-41d6-8a82-34122f0d1398.jpg',
130
+ 'logo': 'https://github.com/user-attachments/assets/0623e9c4-f50e-48c9-82bd-65c3908c3a14',
131
131
  'api': {
132
132
  'spot': 'https://api-cloud.{hostname}',
133
133
  'swap': 'https://api-cloud-v2.{hostname}', # bitmart.info for Hong Kong users
@@ -1806,7 +1806,7 @@ class bitmart(Exchange, ImplicitAPI):
1806
1806
  if since is not None:
1807
1807
  request['after'] = self.parse_to_int((since / 1000)) - 1
1808
1808
  else:
1809
- maxLimit = 1200
1809
+ maxLimit = 500
1810
1810
  if limit is None:
1811
1811
  limit = maxLimit
1812
1812
  limit = min(maxLimit, limit)
@@ -3983,7 +3983,7 @@ class bitmart(Exchange, ImplicitAPI):
3983
3983
  records = self.safe_list(data, 'records', [])
3984
3984
  return self.parse_transfers(records, currency, since, limit)
3985
3985
 
3986
- def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3986
+ def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
3987
3987
  """
3988
3988
  fetch the interest owed by the user for borrowing currency for margin trading
3989
3989
  :see: https://developer-pro.bitmart.com/en/spot/#get-borrow-record-isolated
@@ -4032,7 +4032,7 @@ class bitmart(Exchange, ImplicitAPI):
4032
4032
  interest = self.parse_borrow_interests(rows, market)
4033
4033
  return self.filter_by_currency_since_limit(interest, code, since, limit)
4034
4034
 
4035
- def parse_borrow_interest(self, info: dict, market: Market = None):
4035
+ def parse_borrow_interest(self, info: dict, market: Market = None) -> BorrowInterest:
4036
4036
  #
4037
4037
  # {
4038
4038
  # "borrow_id": "1657664327844Lk5eJJugXmdHHZoe",
@@ -4049,15 +4049,15 @@ class bitmart(Exchange, ImplicitAPI):
4049
4049
  market = self.safe_market(marketId, market)
4050
4050
  timestamp = self.safe_integer(info, 'create_time')
4051
4051
  return {
4052
+ 'info': info,
4052
4053
  'symbol': self.safe_string(market, 'symbol'),
4053
- 'marginMode': 'isolated',
4054
4054
  'currency': self.safe_currency_code(self.safe_string(info, 'currency')),
4055
4055
  'interest': self.safe_number(info, 'interest_amount'),
4056
4056
  'interestRate': self.safe_number(info, 'hourly_interest'),
4057
4057
  'amountBorrowed': self.safe_number(info, 'borrow_amount'),
4058
+ 'marginMode': 'isolated',
4058
4059
  'timestamp': timestamp, # borrow creation time
4059
4060
  'datetime': self.iso8601(timestamp),
4060
- 'info': info,
4061
4061
  }
4062
4062
 
4063
4063
  def fetch_open_interest(self, symbol: str, params={}):
ccxt/bitmex.py CHANGED
@@ -119,7 +119,7 @@ class bitmex(Exchange, ImplicitAPI):
119
119
  'public': 'https://testnet.bitmex.com',
120
120
  'private': 'https://testnet.bitmex.com',
121
121
  },
122
- 'logo': 'https://github.com/ccxt/ccxt/assets/43336371/cea9cfe5-c57e-4b84-b2ac-77b960b04445',
122
+ 'logo': 'https://github.com/user-attachments/assets/c78425ab-78d5-49d6-bd14-db7734798f04',
123
123
  'api': {
124
124
  'public': 'https://www.bitmex.com',
125
125
  'private': 'https://www.bitmex.com',
ccxt/bitopro.py CHANGED
@@ -112,7 +112,7 @@ class bitopro(Exchange, ImplicitAPI):
112
112
  '1M': '1M',
113
113
  },
114
114
  'urls': {
115
- 'logo': 'https://user-images.githubusercontent.com/1294454/158227251-3a92a220-9222-453c-9277-977c6677fe71.jpg',
115
+ 'logo': 'https://github.com/user-attachments/assets/affc6337-b95a-44bf-aacd-04f9722364f6',
116
116
  'api': {
117
117
  'rest': 'https://api.bitopro.com/v3',
118
118
  },
ccxt/bitrue.py CHANGED
@@ -115,7 +115,7 @@ class bitrue(Exchange, ImplicitAPI):
115
115
  '1w': '1W',
116
116
  },
117
117
  'urls': {
118
- 'logo': 'https://user-images.githubusercontent.com/1294454/139516488-243a830d-05dd-446b-91c6-c1f18fe30c63.jpg',
118
+ 'logo': 'https://github.com/user-attachments/assets/67abe346-1273-461a-bd7c-42fa32907c8e',
119
119
  'api': {
120
120
  'spot': 'https://www.bitrue.com/api',
121
121
  'fapi': 'https://fapi.bitrue.com/fapi',
ccxt/bitso.py CHANGED
@@ -104,7 +104,7 @@ class bitso(Exchange, ImplicitAPI):
104
104
  'withdraw': True,
105
105
  },
106
106
  'urls': {
107
- 'logo': 'https://user-images.githubusercontent.com/51840849/87295554-11f98280-c50e-11ea-80d6-15b3bafa8cbf.jpg',
107
+ 'logo': 'https://github.com/user-attachments/assets/178c8e56-9054-4107-b192-5e5053d4f975',
108
108
  'api': {
109
109
  'rest': 'https://bitso.com/api',
110
110
  },
ccxt/bitstamp.py CHANGED
@@ -107,7 +107,7 @@ class bitstamp(Exchange, ImplicitAPI):
107
107
  'withdraw': True,
108
108
  },
109
109
  'urls': {
110
- 'logo': 'https://user-images.githubusercontent.com/1294454/27786377-8c8ab57e-5fe9-11e7-8ea4-2b05b6bcceec.jpg',
110
+ 'logo': 'https://github.com/user-attachments/assets/d5480572-1fee-43cb-b900-d38c522d0024',
111
111
  'api': {
112
112
  'public': 'https://www.bitstamp.net/api',
113
113
  'private': 'https://www.bitstamp.net/api',
ccxt/bitteam.py CHANGED
@@ -137,7 +137,7 @@ class bitteam(Exchange, ImplicitAPI):
137
137
  '1d': '1D',
138
138
  },
139
139
  'urls': {
140
- 'logo': 'https://github.com/ccxt/ccxt/assets/43336371/cf71fe3d-b8b4-40f2-a906-907661b28793',
140
+ 'logo': 'https://github.com/user-attachments/assets/b41b5e0d-98e5-4bd3-8a6e-aeb230a4a135',
141
141
  'api': {
142
142
  'history': 'https://history.bit.team',
143
143
  'public': 'https://bit.team',
ccxt/bitvavo.py CHANGED
@@ -127,7 +127,7 @@ class bitvavo(Exchange, ImplicitAPI):
127
127
  '1d': '1d',
128
128
  },
129
129
  'urls': {
130
- 'logo': 'https://user-images.githubusercontent.com/1294454/169202626-bd130fc5-fcf9-41bb-8d97-6093225c73cd.jpg',
130
+ 'logo': 'https://github.com/user-attachments/assets/d213155c-8c71-4701-9bd5-45351febc2a8',
131
131
  'api': {
132
132
  'public': 'https://api.bitvavo.com',
133
133
  'private': 'https://api.bitvavo.com',
ccxt/bl3p.py CHANGED
@@ -82,7 +82,7 @@ class bl3p(Exchange, ImplicitAPI):
82
82
  'ws': False,
83
83
  },
84
84
  'urls': {
85
- 'logo': 'https://user-images.githubusercontent.com/1294454/28501752-60c21b82-6feb-11e7-818b-055ee6d0e754.jpg',
85
+ 'logo': 'https://github.com/user-attachments/assets/75aeb14e-cd48-43c8-8492-dff002dea0be',
86
86
  'api': {
87
87
  'rest': 'https://api.bl3p.eu',
88
88
  },
ccxt/blockchaincom.py CHANGED
@@ -82,7 +82,7 @@ class blockchaincom(Exchange, ImplicitAPI):
82
82
  },
83
83
  'timeframes': None,
84
84
  'urls': {
85
- 'logo': 'https://user-images.githubusercontent.com/1294454/147515585-1296e91b-7398-45e5-9d32-f6121538533f.jpeg',
85
+ 'logo': 'https://github.com/user-attachments/assets/975e3054-3399-4363-bcee-ec3c6d63d4e8',
86
86
  'test': {
87
87
  'public': 'https://testnet-api.delta.exchange',
88
88
  'private': 'https://testnet-api.delta.exchange',
ccxt/blofin.py CHANGED
@@ -162,7 +162,7 @@ class blofin(Exchange, ImplicitAPI):
162
162
  },
163
163
  'hostname': 'www.blofin.com',
164
164
  'urls': {
165
- 'logo': 'https://github.com/ccxt/ccxt/assets/43336371/255a7b29-341f-4d20-8342-fbfae4932807',
165
+ 'logo': 'https://github.com/user-attachments/assets/518cdf80-f05d-4821-a3e3-d48ceb41d73b',
166
166
  'api': {
167
167
  'rest': 'https://openapi.blofin.com',
168
168
  },
ccxt/btcalpha.py CHANGED
@@ -103,7 +103,7 @@ class btcalpha(Exchange, ImplicitAPI):
103
103
  '1d': 'D',
104
104
  },
105
105
  'urls': {
106
- 'logo': 'https://user-images.githubusercontent.com/1294454/42625213-dabaa5da-85cf-11e8-8f99-aa8f8f7699f0.jpg',
106
+ 'logo': 'https://github.com/user-attachments/assets/dce49f3a-61e5-4ba0-a2fe-41d192fd0e5d',
107
107
  'api': {
108
108
  'rest': 'https://btc-alpha.com/api',
109
109
  },
ccxt/btcbox.py CHANGED
@@ -88,7 +88,7 @@ class btcbox(Exchange, ImplicitAPI):
88
88
  'ws': False,
89
89
  },
90
90
  'urls': {
91
- 'logo': 'https://user-images.githubusercontent.com/51840849/87327317-98c55400-c53c-11ea-9a11-81f7d951cc74.jpg',
91
+ 'logo': 'https://github.com/user-attachments/assets/1e2cb499-8d0f-4f8f-9464-3c015cfbc76b',
92
92
  'api': {
93
93
  'rest': 'https://www.btcbox.co.jp/api',
94
94
  },
ccxt/btcmarkets.py CHANGED
@@ -91,7 +91,7 @@ class btcmarkets(Exchange, ImplicitAPI):
91
91
  'withdraw': True,
92
92
  },
93
93
  'urls': {
94
- 'logo': 'https://user-images.githubusercontent.com/51840849/89731817-b3fb8480-da52-11ea-817f-783b08aaf32b.jpg',
94
+ 'logo': 'https://github.com/user-attachments/assets/8c8d6907-3873-4cc4-ad20-e22fba28247e',
95
95
  'api': {
96
96
  'public': 'https://api.btcmarkets.net',
97
97
  'private': 'https://api.btcmarkets.net',
ccxt/btcturk.py CHANGED
@@ -93,7 +93,7 @@ class btcturk(Exchange, ImplicitAPI):
93
93
  '1y': '1 y',
94
94
  },
95
95
  'urls': {
96
- 'logo': 'https://user-images.githubusercontent.com/51840849/87153926-efbef500-c2c0-11ea-9842-05b63612c4b9.jpg',
96
+ 'logo': 'https://github.com/user-attachments/assets/10e0a238-9f60-4b06-9dda-edfc7602f1d6',
97
97
  'api': {
98
98
  'public': 'https://api.btcturk.com/api/v2',
99
99
  'private': 'https://api.btcturk.com/api/v1',