ccxt 4.4.26__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 (97) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/alpaca.py +2 -0
  3. ccxt/abstract/hyperliquid.py +1 -1
  4. ccxt/ace.py +1 -1
  5. ccxt/alpaca.py +182 -6
  6. ccxt/ascendex.py +1 -1
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/ace.py +1 -1
  9. ccxt/async_support/alpaca.py +182 -6
  10. ccxt/async_support/ascendex.py +1 -1
  11. ccxt/async_support/base/exchange.py +19 -1
  12. ccxt/async_support/bequant.py +1 -1
  13. ccxt/async_support/bigone.py +1 -1
  14. ccxt/async_support/binance.py +1 -1
  15. ccxt/async_support/binancecoinm.py +1 -1
  16. ccxt/async_support/binanceus.py +1 -1
  17. ccxt/async_support/binanceusdm.py +1 -1
  18. ccxt/async_support/bingx.py +23 -28
  19. ccxt/async_support/bit2c.py +1 -1
  20. ccxt/async_support/bitbank.py +1 -1
  21. ccxt/async_support/bitbns.py +1 -1
  22. ccxt/async_support/bitfinex.py +1 -1
  23. ccxt/async_support/bitfinex2.py +1 -1
  24. ccxt/async_support/bitflyer.py +1 -1
  25. ccxt/async_support/bitget.py +1 -1
  26. ccxt/async_support/bithumb.py +1 -1
  27. ccxt/async_support/bitmart.py +1 -1
  28. ccxt/async_support/bitmex.py +1 -1
  29. ccxt/async_support/bitopro.py +1 -1
  30. ccxt/async_support/bitrue.py +1 -1
  31. ccxt/async_support/bitso.py +1 -1
  32. ccxt/async_support/bitstamp.py +1 -1
  33. ccxt/async_support/bitteam.py +1 -1
  34. ccxt/async_support/bitvavo.py +1 -1
  35. ccxt/async_support/bl3p.py +1 -1
  36. ccxt/async_support/blockchaincom.py +1 -1
  37. ccxt/async_support/blofin.py +1 -1
  38. ccxt/async_support/btcalpha.py +1 -1
  39. ccxt/async_support/btcbox.py +1 -1
  40. ccxt/async_support/btcmarkets.py +1 -1
  41. ccxt/async_support/btcturk.py +1 -1
  42. ccxt/async_support/bybit.py +4 -1
  43. ccxt/async_support/coinbase.py +89 -11
  44. ccxt/async_support/coinex.py +1 -1
  45. ccxt/async_support/gate.py +20 -16
  46. ccxt/async_support/hyperliquid.py +19 -1
  47. ccxt/async_support/lbank.py +97 -2
  48. ccxt/async_support/wavesexchange.py +13 -2
  49. ccxt/base/exchange.py +19 -1
  50. ccxt/bequant.py +1 -1
  51. ccxt/bigone.py +1 -1
  52. ccxt/binance.py +1 -1
  53. ccxt/binancecoinm.py +1 -1
  54. ccxt/binanceus.py +1 -1
  55. ccxt/binanceusdm.py +1 -1
  56. ccxt/bingx.py +23 -28
  57. ccxt/bit2c.py +1 -1
  58. ccxt/bitbank.py +1 -1
  59. ccxt/bitbns.py +1 -1
  60. ccxt/bitfinex.py +1 -1
  61. ccxt/bitfinex2.py +1 -1
  62. ccxt/bitflyer.py +1 -1
  63. ccxt/bitget.py +1 -1
  64. ccxt/bithumb.py +1 -1
  65. ccxt/bitmart.py +1 -1
  66. ccxt/bitmex.py +1 -1
  67. ccxt/bitopro.py +1 -1
  68. ccxt/bitrue.py +1 -1
  69. ccxt/bitso.py +1 -1
  70. ccxt/bitstamp.py +1 -1
  71. ccxt/bitteam.py +1 -1
  72. ccxt/bitvavo.py +1 -1
  73. ccxt/bl3p.py +1 -1
  74. ccxt/blockchaincom.py +1 -1
  75. ccxt/blofin.py +1 -1
  76. ccxt/btcalpha.py +1 -1
  77. ccxt/btcbox.py +1 -1
  78. ccxt/btcmarkets.py +1 -1
  79. ccxt/btcturk.py +1 -1
  80. ccxt/bybit.py +4 -1
  81. ccxt/coinbase.py +89 -11
  82. ccxt/coinex.py +1 -1
  83. ccxt/gate.py +20 -16
  84. ccxt/hyperliquid.py +19 -1
  85. ccxt/lbank.py +97 -2
  86. ccxt/pro/__init__.py +1 -1
  87. ccxt/pro/binance.py +2 -2
  88. ccxt/pro/bybit.py +1 -1
  89. ccxt/pro/lbank.py +7 -4
  90. ccxt/pro/okx.py +1 -1
  91. ccxt/wavesexchange.py +13 -2
  92. ccxt-4.4.27.dist-info/METADATA +637 -0
  93. {ccxt-4.4.26.dist-info → ccxt-4.4.27.dist-info}/RECORD +96 -96
  94. ccxt-4.4.26.dist-info/METADATA +0 -636
  95. {ccxt-4.4.26.dist-info → ccxt-4.4.27.dist-info}/LICENSE.txt +0 -0
  96. {ccxt-4.4.26.dist-info → ccxt-4.4.27.dist-info}/WHEEL +0 -0
  97. {ccxt-4.4.26.dist-info → ccxt-4.4.27.dist-info}/top_level.txt +0 -0
@@ -157,7 +157,17 @@ class hyperliquid(Exchange, ImplicitAPI):
157
157
  'api': {
158
158
  'public': {
159
159
  'post': {
160
- 'info': 1,
160
+ 'info': {
161
+ 'cost': 20,
162
+ 'byType': {
163
+ 'l2Book': 2,
164
+ 'allMids': 2,
165
+ 'clearinghouseState': 2,
166
+ 'orderStatus': 2,
167
+ 'spotClearinghouseState': 2,
168
+ 'exchangeStatus': 2,
169
+ },
170
+ },
161
171
  },
162
172
  },
163
173
  'private': {
@@ -2852,6 +2862,14 @@ class hyperliquid(Exchange, ImplicitAPI):
2852
2862
  body = self.json(params)
2853
2863
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
2854
2864
 
2865
+ def calculate_rate_limiter_cost(self, api, method, path, params, config={}):
2866
+ if ('byType' in config) and ('type' in params):
2867
+ type = params['type']
2868
+ byType = config['byType']
2869
+ if type in byType:
2870
+ return byType[type]
2871
+ return self.safe_value(config, 'cost', 1)
2872
+
2855
2873
  def parse_create_order_args(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
2856
2874
  market = self.market(symbol)
2857
2875
  vaultAddress = self.safe_string(params, 'vaultAddress')
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.lbank import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
10
+ from ccxt.base.types import Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -70,7 +70,7 @@ class lbank(Exchange, ImplicitAPI):
70
70
  'fetchFundingHistory': False,
71
71
  'fetchFundingRate': False,
72
72
  'fetchFundingRateHistory': False,
73
- 'fetchFundingRates': False,
73
+ 'fetchFundingRates': True,
74
74
  'fetchIndexOHLCV': False,
75
75
  'fetchIsolatedBorrowRate': False,
76
76
  'fetchIsolatedBorrowRates': False,
@@ -1133,6 +1133,101 @@ class lbank(Exchange, ImplicitAPI):
1133
1133
  return self.safe_balance(result)
1134
1134
  return None
1135
1135
 
1136
+ def parse_funding_rate(self, ticker, market: Market = None) -> FundingRate:
1137
+ # {
1138
+ # "symbol": "BTCUSDT",
1139
+ # "highestPrice": "69495.5",
1140
+ # "underlyingPrice": "68455.904",
1141
+ # "lowestPrice": "68182.1",
1142
+ # "openPrice": "68762.4",
1143
+ # "positionFeeRate": "0.0001",
1144
+ # "volume": "33534.2858",
1145
+ # "markedPrice": "68434.1",
1146
+ # "turnover": "1200636218.210558",
1147
+ # "positionFeeTime": "28800",
1148
+ # "lastPrice": "68427.3",
1149
+ # "nextFeeTime": "1730736000000",
1150
+ # "fundingRate": "0.0001",
1151
+ # }
1152
+ marketId = self.safe_string(ticker, 'symbol')
1153
+ symbol = self.safe_symbol(marketId, market)
1154
+ markPrice = self.safe_number(ticker, 'markedPrice')
1155
+ indexPrice = self.safe_number(ticker, 'underlyingPrice')
1156
+ fundingRate = self.safe_number(ticker, 'fundingRate')
1157
+ fundingTime = self.safe_integer(ticker, 'nextFeeTime')
1158
+ return {
1159
+ 'info': ticker,
1160
+ 'symbol': symbol,
1161
+ 'markPrice': markPrice,
1162
+ 'indexPrice': indexPrice,
1163
+ 'fundingRate': fundingRate,
1164
+ 'fundingTimestamp': fundingTime,
1165
+ 'fundingDatetime': self.iso8601(fundingTime),
1166
+ 'timestamp': None,
1167
+ 'datetime': None,
1168
+ 'nextFundingRate': None,
1169
+ 'nextFundingTimestamp': None,
1170
+ 'nextFundingDatetime': None,
1171
+ 'previousFundingRate': None,
1172
+ 'previousFundingTimestamp': None,
1173
+ 'previousFundingDatetime': None,
1174
+ 'interval': None,
1175
+ }
1176
+
1177
+ async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
1178
+ """
1179
+ fetch the current funding rate
1180
+ :see: https://www.lbank.com/en-US/docs/contract.html#query-contract-market-list
1181
+ :param str symbol: unified market symbol
1182
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1183
+ :returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
1184
+ """
1185
+ await self.load_markets()
1186
+ market = self.market(symbol)
1187
+ responseForSwap = await self.fetch_funding_rates([market['symbol']], params)
1188
+ return self.safe_value(responseForSwap, market['symbol'])
1189
+
1190
+ async def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
1191
+ """
1192
+ fetch the funding rate for multiple markets
1193
+ :see: https://www.lbank.com/en-US/docs/contract.html#query-contract-market-list
1194
+ :param str[]|None symbols: list of unified market symbols
1195
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1196
+ :returns dict: a dictionary of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rates-structure>`, indexed by market symbols
1197
+ """
1198
+ await self.load_markets()
1199
+ symbols = self.market_symbols(symbols)
1200
+ request: dict = {
1201
+ 'productGroup': 'SwapU',
1202
+ }
1203
+ response = await self.contractPublicGetCfdOpenApiV1PubMarketData(self.extend(request, params))
1204
+ # {
1205
+ # "data": [
1206
+ # {
1207
+ # "symbol": "BTCUSDT",
1208
+ # "highestPrice": "69495.5",
1209
+ # "underlyingPrice": "68455.904",
1210
+ # "lowestPrice": "68182.1",
1211
+ # "openPrice": "68762.4",
1212
+ # "positionFeeRate": "0.0001",
1213
+ # "volume": "33534.2858",
1214
+ # "markedPrice": "68434.1",
1215
+ # "turnover": "1200636218.210558",
1216
+ # "positionFeeTime": "28800",
1217
+ # "lastPrice": "68427.3",
1218
+ # "nextFeeTime": "1730736000000",
1219
+ # "fundingRate": "0.0001",
1220
+ # }
1221
+ # ],
1222
+ # "error_code": "0",
1223
+ # "msg": "Success",
1224
+ # "result": "true",
1225
+ # "success": True,
1226
+ # }
1227
+ data = self.safe_list(response, 'data', [])
1228
+ result = self.parse_funding_rates(data)
1229
+ return self.filter_by_array(result, 'symbol', symbols)
1230
+
1136
1231
  async def fetch_balance(self, params={}) -> Balances:
1137
1232
  """
1138
1233
  query for balance and get the amount of funds available for trading or funds locked in orders
@@ -138,7 +138,13 @@ class wavesexchange(Exchange, ImplicitAPI):
138
138
  'forward': 'https://wx.network/api/v1/forward/matcher',
139
139
  'market': 'https://wx.network/api/v1/forward/marketdata/api/v1',
140
140
  },
141
- 'doc': 'https://docs.wx.network',
141
+ 'doc': [
142
+ 'https://docs.wx.network',
143
+ 'https://docs.waves.tech',
144
+ 'https://api.wavesplatform.com/v0/docs/',
145
+ 'https://nodes.wavesnodes.com/api-docs/index.html',
146
+ 'https://matcher.waves.exchange/api-docs/index.html',
147
+ ],
142
148
  'www': 'https://wx.network',
143
149
  },
144
150
  'api': {
@@ -602,6 +608,7 @@ class wavesexchange(Exchange, ImplicitAPI):
602
608
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
603
609
  """
604
610
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
611
+ :see: https://matcher.waves.exchange/api-docs/index.html#/markets/getOrderBook
605
612
  :param str symbol: unified symbol of the market to fetch the order book for
606
613
  :param int [limit]: the maximum amount of order book entries to return
607
614
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -722,6 +729,7 @@ class wavesexchange(Exchange, ImplicitAPI):
722
729
  async def sign_in(self, params={}):
723
730
  """
724
731
  sign in, must be called prior to using other authenticated methods
732
+ :see: https://docs.wx.network/en/api/auth/oauth2-token
725
733
  :param dict [params]: extra parameters specific to the exchange API endpoint
726
734
  :returns: response from exchange
727
735
  """
@@ -832,6 +840,7 @@ class wavesexchange(Exchange, ImplicitAPI):
832
840
  async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
833
841
  """
834
842
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
843
+ :see: https://api.wavesplatform.com/v0/docs/#/pairs/getPairsListAll
835
844
  :param str symbol: unified symbol of the market to fetch the ticker for
836
845
  :param dict [params]: extra parameters specific to the exchange API endpoint
837
846
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -873,7 +882,7 @@ class wavesexchange(Exchange, ImplicitAPI):
873
882
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
874
883
  """
875
884
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
876
- :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
885
+ :param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
877
886
  :param dict [params]: extra parameters specific to the exchange API endpoint
878
887
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
879
888
  """
@@ -912,6 +921,7 @@ class wavesexchange(Exchange, ImplicitAPI):
912
921
  async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
913
922
  """
914
923
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
924
+ :see: https://api.wavesplatform.com/v0/docs/#/candles/getCandles
915
925
  :param str symbol: unified symbol of the market to fetch OHLCV data for
916
926
  :param str timeframe: the length of time each candle represents
917
927
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -1217,6 +1227,7 @@ class wavesexchange(Exchange, ImplicitAPI):
1217
1227
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
1218
1228
  """
1219
1229
  create a trade order
1230
+ :see: https://matcher.waves.exchange/api-docs/index.html#/serialize/serializeOrder
1220
1231
  :param str symbol: unified symbol of the market to create an order in
1221
1232
  :param str type: 'market' or 'limit'
1222
1233
  :param str side: 'buy' or 'sell'
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.26'
7
+ __version__ = '4.4.27'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2447,9 +2447,15 @@ class Exchange(object):
2447
2447
  def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}):
2448
2448
  raise NotSupported(self.id + ' watchTrades() is not supported yet')
2449
2449
 
2450
+ def un_watch_trades(self, symbol: str, params={}):
2451
+ raise NotSupported(self.id + ' unWatchTrades() is not supported yet')
2452
+
2450
2453
  def watch_trades_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}):
2451
2454
  raise NotSupported(self.id + ' watchTradesForSymbols() is not supported yet')
2452
2455
 
2456
+ def un_watch_trades_for_symbols(self, symbols: List[str], params={}):
2457
+ raise NotSupported(self.id + ' unWatchTradesForSymbols() is not supported yet')
2458
+
2453
2459
  def watch_my_trades_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}):
2454
2460
  raise NotSupported(self.id + ' watchMyTradesForSymbols() is not supported yet')
2455
2461
 
@@ -2459,9 +2465,15 @@ class Exchange(object):
2459
2465
  def watch_ohlcv_for_symbols(self, symbolsAndTimeframes: List[List[str]], since: Int = None, limit: Int = None, params={}):
2460
2466
  raise NotSupported(self.id + ' watchOHLCVForSymbols() is not supported yet')
2461
2467
 
2468
+ def un_watch_ohlcv_for_symbols(self, symbolsAndTimeframes: List[List[str]], params={}):
2469
+ raise NotSupported(self.id + ' unWatchOHLCVForSymbols() is not supported yet')
2470
+
2462
2471
  def watch_order_book_for_symbols(self, symbols: List[str], limit: Int = None, params={}):
2463
2472
  raise NotSupported(self.id + ' watchOrderBookForSymbols() is not supported yet')
2464
2473
 
2474
+ def un_watch_order_book_for_symbols(self, symbols: List[str], params={}):
2475
+ raise NotSupported(self.id + ' unWatchOrderBookForSymbols() is not supported yet')
2476
+
2465
2477
  def fetch_deposit_addresses(self, codes: Strings = None, params={}):
2466
2478
  raise NotSupported(self.id + ' fetchDepositAddresses() is not supported yet')
2467
2479
 
@@ -2492,6 +2504,9 @@ class Exchange(object):
2492
2504
  def watch_order_book(self, symbol: str, limit: Int = None, params={}):
2493
2505
  raise NotSupported(self.id + ' watchOrderBook() is not supported yet')
2494
2506
 
2507
+ def un_watch_order_book(self, symbol: str, params={}):
2508
+ raise NotSupported(self.id + ' unWatchOrderBook() is not supported yet')
2509
+
2495
2510
  def fetch_time(self, params={}):
2496
2511
  raise NotSupported(self.id + ' fetchTime() is not supported yet')
2497
2512
 
@@ -4571,6 +4586,9 @@ class Exchange(object):
4571
4586
  def watch_tickers(self, symbols: Strings = None, params={}):
4572
4587
  raise NotSupported(self.id + ' watchTickers() is not supported yet')
4573
4588
 
4589
+ def un_watch_tickers(self, symbols: Strings = None, params={}):
4590
+ raise NotSupported(self.id + ' unWatchTickers() is not supported yet')
4591
+
4574
4592
  def fetch_order(self, id: str, symbol: Str = None, params={}):
4575
4593
  raise NotSupported(self.id + ' fetchOrder() is not supported yet')
4576
4594
 
ccxt/bequant.py CHANGED
@@ -16,7 +16,7 @@ class bequant(hitbtc, ImplicitAPI):
16
16
  'countries': ['MT'], # Malta
17
17
  'pro': True,
18
18
  'urls': {
19
- 'logo': 'https://user-images.githubusercontent.com/1294454/55248342-a75dfe00-525a-11e9-8aa2-05e9dca943c6.jpg',
19
+ 'logo': 'https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867',
20
20
  'api': {
21
21
  'public': 'https://api.bequant.io/api/3',
22
22
  'private': 'https://api.bequant.io/api/3',
ccxt/bigone.py CHANGED
@@ -92,7 +92,7 @@ class bigone(Exchange, ImplicitAPI):
92
92
  },
93
93
  'hostname': 'big.one', # or 'bigone.com'
94
94
  'urls': {
95
- 'logo': 'https://user-images.githubusercontent.com/1294454/69354403-1d532180-0c91-11ea-88ed-44c06cefdf87.jpg',
95
+ 'logo': 'https://github.com/user-attachments/assets/4e5cfd53-98cc-4b90-92cd-0d7b512653d1',
96
96
  'api': {
97
97
  'public': 'https://{hostname}/api/v3',
98
98
  'private': 'https://{hostname}/api/v3/viewer',
ccxt/binance.py CHANGED
@@ -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',
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
@@ -2682,26 +2682,26 @@ class bingx(Exchange, ImplicitAPI):
2682
2682
  """
2683
2683
  self.load_markets()
2684
2684
  ordersRequests = []
2685
- symbol = None
2685
+ marketIds = []
2686
2686
  for i in range(0, len(orders)):
2687
2687
  rawOrder = orders[i]
2688
2688
  marketId = self.safe_string(rawOrder, 'symbol')
2689
- if symbol is None:
2690
- symbol = marketId
2691
- else:
2692
- if symbol != marketId:
2693
- raise BadRequest(self.id + ' createOrders() requires all orders to have the same symbol')
2694
2689
  type = self.safe_string(rawOrder, 'type')
2690
+ marketIds.append(marketId)
2695
2691
  side = self.safe_string(rawOrder, 'side')
2696
2692
  amount = self.safe_number(rawOrder, 'amount')
2697
2693
  price = self.safe_number(rawOrder, 'price')
2698
2694
  orderParams = self.safe_dict(rawOrder, 'params', {})
2699
2695
  orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams)
2700
2696
  ordersRequests.append(orderRequest)
2701
- market = self.market(symbol)
2697
+ symbols = self.market_symbols(marketIds, None, False, True, True)
2698
+ symbolsLength = len(symbols)
2699
+ market = self.market(symbols[0])
2702
2700
  request: dict = {}
2703
2701
  response = None
2704
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')
2705
2705
  request['batchOrders'] = self.json(ordersRequests)
2706
2706
  response = self.swapV2PrivatePostTradeBatchOrders(request)
2707
2707
  else:
@@ -2755,6 +2755,12 @@ class bingx(Exchange, ImplicitAPI):
2755
2755
  # }
2756
2756
  # }
2757
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)
2758
2764
  data = self.safe_dict(response, 'data', {})
2759
2765
  result = self.safe_list(data, 'orders', [])
2760
2766
  return self.parse_orders(result, market)
@@ -4299,32 +4305,21 @@ class bingx(Exchange, ImplicitAPI):
4299
4305
 
4300
4306
  def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
4301
4307
  #
4302
- # {
4303
- # "coinId": "799",
4304
- # "coin": "USDT",
4305
- # "network": "BEP20",
4306
- # "address": "6a7eda2817462dabb6493277a2cfe0f5c3f2550b",
4307
- # "tag": ''
4308
- # }
4308
+ # {
4309
+ # "coinId":"4",
4310
+ # "coin":"USDT",
4311
+ # "network":"OMNI",
4312
+ # "address":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN",
4313
+ # "addressWithPrefix":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN"
4314
+ # }
4309
4315
  #
4310
- address = self.safe_string(depositAddress, 'address')
4311
4316
  tag = self.safe_string(depositAddress, 'tag')
4312
4317
  currencyId = self.safe_string(depositAddress, 'coin')
4313
4318
  currency = self.safe_currency(currencyId, currency)
4314
4319
  code = currency['code']
4315
- # the exchange API returns deposit addresses without the leading '0x' prefix
4316
- # however, the exchange API does require the 0x prefix to withdraw
4317
- # so we append the prefix before returning the address to the user
4318
- # that is only if the underlying contract address has the 0x prefix
4319
- networkCode = self.safe_string(depositAddress, 'network')
4320
- if networkCode is not None:
4321
- if networkCode in currency['networks']:
4322
- network = currency['networks'][networkCode]
4323
- contractAddress = self.safe_string(network['info'], 'contractAddress')
4324
- if contractAddress is not None:
4325
- if contractAddress[0] == '0' and contractAddress[1] == 'x':
4326
- if address[0] != '0' or address[1] != 'x':
4327
- 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)
4328
4323
  self.check_address(address)
4329
4324
  return {
4330
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
@@ -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}',
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
@@ -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
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',