ccxt 4.4.34__py2.py3-none-any.whl → 4.4.36__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 (67) hide show
  1. ccxt/__init__.py +3 -1
  2. ccxt/abstract/bingx.py +1 -0
  3. ccxt/abstract/bitopro.py +1 -0
  4. ccxt/abstract/bitpanda.py +0 -12
  5. ccxt/abstract/bitrue.py +3 -3
  6. ccxt/abstract/bybit.py +15 -0
  7. ccxt/abstract/defx.py +69 -0
  8. ccxt/abstract/deribit.py +1 -0
  9. ccxt/abstract/gate.py +14 -0
  10. ccxt/abstract/gateio.py +14 -0
  11. ccxt/abstract/okx.py +1 -0
  12. ccxt/abstract/onetrading.py +0 -12
  13. ccxt/abstract/xt.py +5 -5
  14. ccxt/async_support/__init__.py +3 -1
  15. ccxt/async_support/base/exchange.py +1 -1
  16. ccxt/async_support/bingx.py +324 -138
  17. ccxt/async_support/bitfinex2.py +18 -13
  18. ccxt/async_support/bitmex.py +104 -2
  19. ccxt/async_support/bitopro.py +21 -4
  20. ccxt/async_support/bitrue.py +2 -2
  21. ccxt/async_support/bitso.py +2 -1
  22. ccxt/async_support/btcmarkets.py +3 -3
  23. ccxt/async_support/btcturk.py +19 -19
  24. ccxt/async_support/bybit.py +21 -1
  25. ccxt/async_support/defx.py +1981 -0
  26. ccxt/async_support/deribit.py +27 -12
  27. ccxt/async_support/gate.py +156 -39
  28. ccxt/async_support/htx.py +11 -2
  29. ccxt/async_support/hyperliquid.py +68 -11
  30. ccxt/async_support/idex.py +3 -4
  31. ccxt/async_support/kraken.py +97 -90
  32. ccxt/async_support/kucoin.py +1 -1
  33. ccxt/async_support/okx.py +1 -0
  34. ccxt/async_support/onetrading.py +47 -369
  35. ccxt/async_support/xt.py +10 -10
  36. ccxt/base/exchange.py +2 -1
  37. ccxt/bingx.py +324 -138
  38. ccxt/bitfinex2.py +18 -13
  39. ccxt/bitmex.py +104 -2
  40. ccxt/bitopro.py +21 -4
  41. ccxt/bitrue.py +2 -2
  42. ccxt/bitso.py +2 -1
  43. ccxt/btcmarkets.py +3 -3
  44. ccxt/btcturk.py +19 -19
  45. ccxt/bybit.py +21 -1
  46. ccxt/defx.py +1980 -0
  47. ccxt/deribit.py +27 -12
  48. ccxt/gate.py +156 -39
  49. ccxt/htx.py +11 -2
  50. ccxt/hyperliquid.py +68 -11
  51. ccxt/idex.py +3 -4
  52. ccxt/kraken.py +97 -90
  53. ccxt/kucoin.py +1 -1
  54. ccxt/okx.py +1 -0
  55. ccxt/onetrading.py +47 -369
  56. ccxt/pro/__init__.py +3 -1
  57. ccxt/pro/bitrue.py +13 -11
  58. ccxt/pro/defx.py +832 -0
  59. ccxt/pro/probit.py +54 -66
  60. ccxt/test/tests_async.py +44 -3
  61. ccxt/test/tests_sync.py +44 -3
  62. ccxt/xt.py +10 -10
  63. {ccxt-4.4.34.dist-info → ccxt-4.4.36.dist-info}/METADATA +7 -6
  64. {ccxt-4.4.34.dist-info → ccxt-4.4.36.dist-info}/RECORD +67 -63
  65. {ccxt-4.4.34.dist-info → ccxt-4.4.36.dist-info}/LICENSE.txt +0 -0
  66. {ccxt-4.4.34.dist-info → ccxt-4.4.36.dist-info}/WHEEL +0 -0
  67. {ccxt-4.4.34.dist-info → ccxt-4.4.36.dist-info}/top_level.txt +0 -0
ccxt/bitfinex2.py CHANGED
@@ -15,7 +15,6 @@ from ccxt.base.errors import ArgumentsRequired
15
15
  from ccxt.base.errors import BadRequest
16
16
  from ccxt.base.errors import BadSymbol
17
17
  from ccxt.base.errors import InsufficientFunds
18
- from ccxt.base.errors import InvalidAddress
19
18
  from ccxt.base.errors import InvalidOrder
20
19
  from ccxt.base.errors import OrderNotFound
21
20
  from ccxt.base.errors import NotSupported
@@ -432,12 +431,10 @@ class bitfinex2(Exchange, ImplicitAPI):
432
431
  'temporarily_unavailable': ExchangeNotAvailable,
433
432
  },
434
433
  'broad': {
435
- 'address': InvalidAddress,
436
434
  'available balance is only': InsufficientFunds,
437
435
  'not enough exchange balance': InsufficientFunds,
438
436
  'Order not found': OrderNotFound,
439
437
  'symbol: invalid': BadSymbol,
440
- 'Invalid order': InvalidOrder,
441
438
  },
442
439
  },
443
440
  'commonCurrencies': {
@@ -781,7 +778,10 @@ class bitfinex2(Exchange, ImplicitAPI):
781
778
  name = self.safe_string(label, 1)
782
779
  pool = self.safe_value(indexed['pool'], id, [])
783
780
  rawType = self.safe_string(pool, 1)
784
- type = 'other' if (rawType is None) else 'crypto'
781
+ isCryptoCoin = (rawType is not None) or (id in indexed['explorer']) # "hacky" solution
782
+ type = None
783
+ if isCryptoCoin:
784
+ type = 'crypto'
785
785
  feeValues = self.safe_value(indexed['fees'], id, [])
786
786
  fees = self.safe_value(feeValues, 1, [])
787
787
  fee = self.safe_number(fees, 1)
@@ -1680,7 +1680,8 @@ class bitfinex2(Exchange, ImplicitAPI):
1680
1680
  raise ExchangeError(self.id + ' ' + response[6] + ': ' + errorText + '(#' + errorCode + ')')
1681
1681
  orders = self.safe_list(response, 4, [])
1682
1682
  order = self.safe_list(orders, 0)
1683
- return self.parse_order(self.extend({'result': order}), market)
1683
+ newOrder = {'result': order}
1684
+ return self.parse_order(newOrder, market)
1684
1685
 
1685
1686
  def create_orders(self, orders: List[OrderRequest], params={}):
1686
1687
  """
@@ -1776,6 +1777,9 @@ class bitfinex2(Exchange, ImplicitAPI):
1776
1777
  self.load_markets()
1777
1778
  cid = self.safe_value_2(params, 'cid', 'clientOrderId') # client order id
1778
1779
  request = None
1780
+ market = None
1781
+ if symbol is not None:
1782
+ market = self.market(symbol)
1779
1783
  if cid is not None:
1780
1784
  cidDate = self.safe_value(params, 'cidDate') # client order id date
1781
1785
  if cidDate is None:
@@ -1791,8 +1795,8 @@ class bitfinex2(Exchange, ImplicitAPI):
1791
1795
  }
1792
1796
  response = self.privatePostAuthWOrderCancel(self.extend(request, params))
1793
1797
  order = self.safe_value(response, 4)
1794
- orderObject = {'result': order}
1795
- return self.parse_order(orderObject)
1798
+ newOrder = {'result': order}
1799
+ return self.parse_order(newOrder, market)
1796
1800
 
1797
1801
  def cancel_orders(self, ids, symbol: Str = None, params={}):
1798
1802
  """
@@ -2293,6 +2297,8 @@ class bitfinex2(Exchange, ImplicitAPI):
2293
2297
  status = 'failed'
2294
2298
  tag = self.safe_string(data, 3)
2295
2299
  type = 'withdrawal'
2300
+ networkId = self.safe_string(data, 2)
2301
+ network = self.network_id_to_code(networkId.upper()) # withdraw returns in lowercase
2296
2302
  elif transactionLength == 22:
2297
2303
  id = self.safe_string(transaction, 0)
2298
2304
  currencyId = self.safe_string(transaction, 1)
@@ -2589,10 +2595,7 @@ class bitfinex2(Exchange, ImplicitAPI):
2589
2595
  text = self.safe_string(response, 7)
2590
2596
  if text != 'success':
2591
2597
  self.throw_broadly_matched_exception(self.exceptions['broad'], text, text)
2592
- transaction = self.parse_transaction(response, currency)
2593
- return self.extend(transaction, {
2594
- 'address': address,
2595
- })
2598
+ return self.parse_transaction(response, currency)
2596
2599
 
2597
2600
  def fetch_positions(self, symbols: Strings = None, params={}):
2598
2601
  """
@@ -3501,7 +3504,8 @@ class bitfinex2(Exchange, ImplicitAPI):
3501
3504
  # ]
3502
3505
  #
3503
3506
  order = self.safe_list(response, 0)
3504
- return self.parse_order(order, market)
3507
+ newOrder = {'result': order}
3508
+ return self.parse_order(newOrder, market)
3505
3509
 
3506
3510
  def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
3507
3511
  """
@@ -3616,4 +3620,5 @@ class bitfinex2(Exchange, ImplicitAPI):
3616
3620
  errorText = response[7]
3617
3621
  raise ExchangeError(self.id + ' ' + response[6] + ': ' + errorText + '(#' + errorCode + ')')
3618
3622
  order = self.safe_list(response, 4, [])
3619
- return self.parse_order(order, market)
3623
+ newOrder = {'result': order}
3624
+ return self.parse_order(newOrder, market)
ccxt/bitmex.py CHANGED
@@ -286,6 +286,108 @@ class bitmex(Exchange, ImplicitAPI):
286
286
  'SOL': 'sol',
287
287
  'ADA': 'ada',
288
288
  },
289
+ 'features': {
290
+ 'default': {
291
+ 'sandbox': True,
292
+ 'createOrder': {
293
+ 'marginMode': True,
294
+ 'triggerPrice': True,
295
+ 'triggerPriceType': {
296
+ 'last': True,
297
+ 'mark': True,
298
+ },
299
+ 'triggerDirection': True,
300
+ 'stopLossPrice': False,
301
+ 'takeProfitPrice': False,
302
+ 'attachedStopLossTakeProfit': None,
303
+ 'timeInForce': {
304
+ 'IOC': True,
305
+ 'FOK': True,
306
+ 'PO': True,
307
+ 'GTD': False,
308
+ },
309
+ 'hedged': False,
310
+ 'trailing': True,
311
+ 'marketBuyRequiresPrice': False,
312
+ 'marketBuyByCost': False,
313
+ # exchange-supported features
314
+ # 'selfTradePrevention': True,
315
+ # 'twap': False,
316
+ # 'iceberg': False,
317
+ # 'oco': False,
318
+ },
319
+ 'createOrders': None,
320
+ 'fetchMyTrades': {
321
+ 'marginMode': False,
322
+ 'limit': 500,
323
+ 'daysBack': None,
324
+ 'untilDays': 1000000,
325
+ },
326
+ 'fetchOrder': {
327
+ 'marginMode': False,
328
+ 'trigger': False,
329
+ 'trailing': False,
330
+ },
331
+ 'fetchOpenOrders': {
332
+ 'marginMode': False,
333
+ 'limit': 500,
334
+ 'trigger': False,
335
+ 'trailing': False,
336
+ },
337
+ 'fetchOrders': {
338
+ 'marginMode': False,
339
+ 'limit': 500,
340
+ 'daysBack': None,
341
+ 'untilDays': 1000000,
342
+ 'trigger': False,
343
+ 'trailing': False,
344
+ },
345
+ 'fetchClosedOrders': {
346
+ 'marginMode': False,
347
+ 'limit': 500,
348
+ 'daysBackClosed': None,
349
+ 'daysBackCanceled': None,
350
+ 'untilDays': 1000000,
351
+ 'trigger': False,
352
+ 'trailing': False,
353
+ },
354
+ 'fetchOHLCV': {
355
+ 'limit': 10000,
356
+ },
357
+ },
358
+ 'spot': {
359
+ 'extends': 'default',
360
+ 'createOrder': {
361
+ 'triggerPriceType': {
362
+ 'index': False,
363
+ },
364
+ },
365
+ },
366
+ 'forDeriv': {
367
+ 'extends': 'default',
368
+ 'createOrder': {
369
+ 'triggerPriceType': {
370
+ 'index': True,
371
+ },
372
+ },
373
+ },
374
+ 'swap': {
375
+ 'linear': {
376
+ 'extends': 'forDeriv',
377
+ },
378
+ 'inverse': {
379
+ 'extends': 'forDeriv',
380
+ },
381
+ },
382
+ 'future': {
383
+ 'linear': {
384
+ 'extends': 'forDeriv',
385
+ },
386
+ 'inverse': {
387
+ 'extends': 'forDeriv',
388
+ },
389
+ },
390
+ },
289
391
  },
290
392
  'commonCurrencies': {
291
393
  'USDt': 'USDT',
@@ -991,7 +1093,7 @@ class bitmex(Exchange, ImplicitAPI):
991
1093
  if since is not None:
992
1094
  request['startTime'] = self.iso8601(since)
993
1095
  if limit is not None:
994
- request['count'] = limit
1096
+ request['count'] = min(500, limit)
995
1097
  until = self.safe_integer_2(params, 'until', 'endTime')
996
1098
  if until is not None:
997
1099
  params = self.omit(params, ['until'])
@@ -1471,7 +1573,7 @@ class bitmex(Exchange, ImplicitAPI):
1471
1573
  }
1472
1574
  if limit is not None:
1473
1575
  request['count'] = limit # default 100, max 500
1474
- until = self.safe_integer_2(params, 'until', 'endTime')
1576
+ until = self.safe_integer(params, 'until')
1475
1577
  if until is not None:
1476
1578
  params = self.omit(params, ['until'])
1477
1579
  request['endTime'] = self.iso8601(until)
ccxt/bitopro.py CHANGED
@@ -153,6 +153,7 @@ class bitopro(Exchange, ImplicitAPI):
153
153
  'wallet/withdraw/{currency}/id/{id}': 1,
154
154
  'wallet/depositHistory/{currency}': 1,
155
155
  'wallet/withdrawHistory/{currency}': 1,
156
+ 'orders/open': 1,
156
157
  },
157
158
  'post': {
158
159
  'orders/{pair}': 1 / 2, # 1200/m => 20/s => 10/20 = 1/2
@@ -1248,10 +1249,26 @@ class bitopro(Exchange, ImplicitAPI):
1248
1249
  return self.parse_orders(orders, market, since, limit)
1249
1250
 
1250
1251
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1251
- request: dict = {
1252
- 'statusKind': 'OPEN',
1253
- }
1254
- return self.fetch_orders(symbol, since, limit, self.extend(request, params))
1252
+ """
1253
+ fetch all unfilled currently open orders
1254
+
1255
+ https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_open_orders_data.md
1256
+
1257
+ :param str symbol: unified market symbol
1258
+ :param int [since]: the earliest time in ms to fetch open orders for
1259
+ :param int [limit]: the maximum number of open orders structures to retrieve
1260
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1261
+ :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1262
+ """
1263
+ self.load_markets()
1264
+ request: dict = {}
1265
+ market = None
1266
+ if symbol is not None:
1267
+ market = self.market(symbol)
1268
+ request['pair'] = market['id']
1269
+ response = self.privateGetOrdersOpen(self.extend(request, params))
1270
+ orders = self.safe_list(response, 'data', [])
1271
+ return self.parse_orders(orders, market, since, limit)
1255
1272
 
1256
1273
  def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1257
1274
  """
ccxt/bitrue.py CHANGED
@@ -2939,7 +2939,7 @@ class bitrue(Exchange, ImplicitAPI):
2939
2939
  version = self.safe_string(api, 1)
2940
2940
  access = self.safe_string(api, 2)
2941
2941
  url = None
2942
- if type == 'api' and version == 'kline':
2942
+ if (type == 'api' and version == 'kline') or (type == 'open' and path.find('listenKey') >= 0):
2943
2943
  url = self.urls['api'][type]
2944
2944
  else:
2945
2945
  url = self.urls['api'][type] + '/' + version
@@ -2948,7 +2948,7 @@ class bitrue(Exchange, ImplicitAPI):
2948
2948
  if access == 'private':
2949
2949
  self.check_required_credentials()
2950
2950
  recvWindow = self.safe_integer(self.options, 'recvWindow', 5000)
2951
- if type == 'spot':
2951
+ if type == 'spot' or type == 'open':
2952
2952
  query = self.urlencode(self.extend({
2953
2953
  'timestamp': self.nonce(),
2954
2954
  'recvWindow': recvWindow,
ccxt/bitso.py CHANGED
@@ -1683,6 +1683,7 @@ class bitso(Exchange, ImplicitAPI):
1683
1683
  if api == 'private':
1684
1684
  self.check_required_credentials()
1685
1685
  nonce = str(self.nonce())
1686
+ endpoint = '/api' + endpoint
1686
1687
  request = ''.join([nonce, method, endpoint])
1687
1688
  if method != 'GET' and method != 'DELETE':
1688
1689
  if query:
@@ -1692,7 +1693,7 @@ class bitso(Exchange, ImplicitAPI):
1692
1693
  auth = self.apiKey + ':' + nonce + ':' + signature
1693
1694
  headers = {
1694
1695
  'Authorization': 'Bitso ' + auth,
1695
- 'Content-Type': 'application/json',
1696
+ # 'Content-Type': 'application/json',
1696
1697
  }
1697
1698
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1698
1699
 
ccxt/btcmarkets.py CHANGED
@@ -313,7 +313,7 @@ class btcmarkets(Exchange, ImplicitAPI):
313
313
  type = self.parse_transaction_type(self.safe_string_lower(transaction, 'type'))
314
314
  if type == 'withdraw':
315
315
  type = 'withdrawal'
316
- cryptoPaymentDetail = self.safe_value(transaction, 'paymentDetail', {})
316
+ cryptoPaymentDetail = self.safe_dict(transaction, 'paymentDetail', {})
317
317
  txid = self.safe_string(cryptoPaymentDetail, 'txId')
318
318
  address = self.safe_string(cryptoPaymentDetail, 'address')
319
319
  tag = None
@@ -394,7 +394,7 @@ class btcmarkets(Exchange, ImplicitAPI):
394
394
  base = self.safe_currency_code(baseId)
395
395
  quote = self.safe_currency_code(quoteId)
396
396
  symbol = base + '/' + quote
397
- fees = self.safe_value(self.safe_value(self.options, 'fees', {}), quote, self.fees)
397
+ fees = self.safe_value(self.safe_dict(self.options, 'fees', {}), quote, self.fees)
398
398
  pricePrecision = self.parse_number(self.parse_precision(self.safe_string(market, 'priceDecimals')))
399
399
  minAmount = self.safe_number(market, 'minOrderAmount')
400
400
  maxAmount = self.safe_number(market, 'maxOrderAmount')
@@ -1016,7 +1016,7 @@ class btcmarkets(Exchange, ImplicitAPI):
1016
1016
  clientOrderId = self.safe_string(order, 'clientOrderId')
1017
1017
  timeInForce = self.safe_string(order, 'timeInForce')
1018
1018
  stopPrice = self.safe_number(order, 'triggerPrice')
1019
- postOnly = self.safe_value(order, 'postOnly')
1019
+ postOnly = self.safe_bool(order, 'postOnly')
1020
1020
  return self.safe_order({
1021
1021
  'info': order,
1022
1022
  'id': id,
ccxt/btcturk.py CHANGED
@@ -205,8 +205,8 @@ class btcturk(Exchange, ImplicitAPI):
205
205
  # ],
206
206
  # }
207
207
  #
208
- data = self.safe_value(response, 'data')
209
- markets = self.safe_value(data, 'symbols', [])
208
+ data = self.safe_dict(response, 'data', {})
209
+ markets = self.safe_list(data, 'symbols', [])
210
210
  return self.parse_markets(markets)
211
211
 
212
212
  def parse_market(self, entry) -> Market:
@@ -215,7 +215,7 @@ class btcturk(Exchange, ImplicitAPI):
215
215
  quoteId = self.safe_string(entry, 'denominator')
216
216
  base = self.safe_currency_code(baseId)
217
217
  quote = self.safe_currency_code(quoteId)
218
- filters = self.safe_value(entry, 'filters', [])
218
+ filters = self.safe_list(entry, 'filters', [])
219
219
  minPrice = None
220
220
  maxPrice = None
221
221
  minAmount = None
@@ -282,7 +282,7 @@ class btcturk(Exchange, ImplicitAPI):
282
282
  }
283
283
 
284
284
  def parse_balance(self, response) -> Balances:
285
- data = self.safe_value(response, 'data', [])
285
+ data = self.safe_list(response, 'data', [])
286
286
  result: dict = {
287
287
  'info': response,
288
288
  'timestamp': None,
@@ -356,7 +356,7 @@ class btcturk(Exchange, ImplicitAPI):
356
356
  # ]
357
357
  # }
358
358
  # }
359
- data = self.safe_value(response, 'data')
359
+ data = self.safe_dict(response, 'data', {})
360
360
  timestamp = self.safe_integer(data, 'timestamp')
361
361
  return self.parse_order_book(data, market['symbol'], timestamp, 'bids', 'asks', 0, 1)
362
362
 
@@ -637,20 +637,20 @@ class btcturk(Exchange, ImplicitAPI):
637
637
 
638
638
  def parse_ohlcvs(self, ohlcvs, market=None, timeframe='1m', since: Int = None, limit: Int = None, tail: Bool = False):
639
639
  results = []
640
- timestamp = self.safe_value(ohlcvs, 't')
641
- high = self.safe_value(ohlcvs, 'h')
642
- open = self.safe_value(ohlcvs, 'o')
643
- low = self.safe_value(ohlcvs, 'l')
644
- close = self.safe_value(ohlcvs, 'c')
645
- volume = self.safe_value(ohlcvs, 'v')
640
+ timestamp = self.safe_list(ohlcvs, 't', [])
641
+ high = self.safe_list(ohlcvs, 'h', [])
642
+ open = self.safe_list(ohlcvs, 'o', [])
643
+ low = self.safe_list(ohlcvs, 'l', [])
644
+ close = self.safe_list(ohlcvs, 'c', [])
645
+ volume = self.safe_list(ohlcvs, 'v', [])
646
646
  for i in range(0, len(timestamp)):
647
647
  ohlcv: dict = {
648
- 'timestamp': self.safe_value(timestamp, i),
649
- 'high': self.safe_value(high, i),
650
- 'open': self.safe_value(open, i),
651
- 'low': self.safe_value(low, i),
652
- 'close': self.safe_value(close, i),
653
- 'volume': self.safe_value(volume, i),
648
+ 'timestamp': self.safe_integer(timestamp, i),
649
+ 'high': self.safe_number(high, i),
650
+ 'open': self.safe_number(open, i),
651
+ 'low': self.safe_number(low, i),
652
+ 'close': self.safe_number(close, i),
653
+ 'volume': self.safe_number(volume, i),
654
654
  }
655
655
  results.append(self.parse_ohlcv(ohlcv, market))
656
656
  sorted = self.sort_by(results, 0)
@@ -733,8 +733,8 @@ class btcturk(Exchange, ImplicitAPI):
733
733
  market = self.market(symbol)
734
734
  request['pairSymbol'] = market['id']
735
735
  response = self.privateGetOpenOrders(self.extend(request, params))
736
- data = self.safe_value(response, 'data')
737
- bids = self.safe_value(data, 'bids', [])
736
+ data = self.safe_dict(response, 'data', {})
737
+ bids = self.safe_list(data, 'bids', [])
738
738
  asks = self.safe_list(data, 'asks', [])
739
739
  return self.parse_orders(self.array_concat(bids, asks), market, since, limit)
740
740
 
ccxt/bybit.py CHANGED
@@ -257,6 +257,9 @@ class bybit(Exchange, ImplicitAPI):
257
257
  'v5/spot-cross-margin-trade/data': 5,
258
258
  'v5/spot-cross-margin-trade/pledge-token': 5,
259
259
  'v5/spot-cross-margin-trade/borrow-token': 5,
260
+ # crypto loan
261
+ 'v5/crypto-loan/collateral-data': 5,
262
+ 'v5/crypto-loan/loanable-data': 5,
260
263
  # institutional lending
261
264
  'v5/ins-loan/product-infos': 5,
262
265
  'v5/ins-loan/ensure-tokens-convert': 5,
@@ -384,6 +387,8 @@ class bybit(Exchange, ImplicitAPI):
384
387
  'v5/user/aff-customer-info': 5,
385
388
  'v5/user/del-submember': 5,
386
389
  'v5/user/submembers': 5,
390
+ # affilate
391
+ 'v5/affiliate/aff-user-list': 5,
387
392
  # spot leverage token
388
393
  'v5/spot-lever-token/order-record': 1, # 50/s => cost = 50 / 50 = 1
389
394
  # spot margin trade
@@ -393,6 +398,13 @@ class bybit(Exchange, ImplicitAPI):
393
398
  'v5/spot-cross-margin-trade/account': 1, # 50/s => cost = 50 / 50 = 1
394
399
  'v5/spot-cross-margin-trade/orders': 1, # 50/s => cost = 50 / 50 = 1
395
400
  'v5/spot-cross-margin-trade/repay-history': 1, # 50/s => cost = 50 / 50 = 1
401
+ # crypto loan
402
+ 'v5/crypto-loan/borrowable-collateralisable-number': 5,
403
+ 'v5/crypto-loan/ongoing-orders': 5,
404
+ 'v5/crypto-loan/repayment-history': 5,
405
+ 'v5/crypto-loan/borrow-history': 5,
406
+ 'v5/crypto-loan/max-collateral-amount': 5,
407
+ 'v5/crypto-loan/adjustment-history': 5,
396
408
  # institutional lending
397
409
  'v5/ins-loan/product-infos': 5,
398
410
  'v5/ins-loan/ensure-tokens-convert': 5,
@@ -404,7 +416,7 @@ class bybit(Exchange, ImplicitAPI):
404
416
  'v5/lending/history-order': 5,
405
417
  'v5/lending/account': 5,
406
418
  # broker
407
- 'v5/broker/earning-record': 5,
419
+ 'v5/broker/earning-record': 5, # deprecated
408
420
  'v5/broker/earnings-info': 5,
409
421
  'v5/broker/account-info': 5,
410
422
  'v5/broker/asset/query-sub-member-deposit-record': 10,
@@ -525,6 +537,10 @@ class bybit(Exchange, ImplicitAPI):
525
537
  'v5/spot-cross-margin-trade/loan': 2.5, # 20/s => cost = 50 / 20 = 2.5
526
538
  'v5/spot-cross-margin-trade/repay': 2.5, # 20/s => cost = 50 / 20 = 2.5
527
539
  'v5/spot-cross-margin-trade/switch': 2.5, # 20/s => cost = 50 / 20 = 2.5
540
+ # crypto loan
541
+ 'v5/crypto-loan/borrow': 5,
542
+ 'v5/crypto-loan/repay': 5,
543
+ 'v5/crypto-loan/adjust-ltv': 5,
528
544
  # institutional lending
529
545
  'v5/ins-loan/association-uid': 5,
530
546
  # c2c lending
@@ -535,6 +551,10 @@ class bybit(Exchange, ImplicitAPI):
535
551
  'v5/account/set-collateral-switch-batch': 5,
536
552
  # demo trading
537
553
  'v5/account/demo-apply-money': 5,
554
+ # broker
555
+ 'v5/broker/award/info': 5,
556
+ 'v5/broker/award/distribute-award': 5,
557
+ 'v5/broker/award/distribution-record': 5,
538
558
  },
539
559
  },
540
560
  },