ccxt 4.4.78__py2.py3-none-any.whl → 4.4.80__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 (83) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/bitmart.py +1 -0
  3. ccxt/apex.py +2 -2
  4. ccxt/ascendex.py +22 -5
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/apex.py +2 -2
  7. ccxt/async_support/ascendex.py +22 -5
  8. ccxt/async_support/base/exchange.py +5 -1
  9. ccxt/async_support/binance.py +6 -0
  10. ccxt/async_support/bingx.py +3 -3
  11. ccxt/async_support/bitfinex.py +59 -34
  12. ccxt/async_support/bitget.py +52 -64
  13. ccxt/async_support/bitmart.py +7 -2
  14. ccxt/async_support/bitmex.py +8 -1
  15. ccxt/async_support/bitopro.py +5 -1
  16. ccxt/async_support/bitrue.py +2 -1
  17. ccxt/async_support/bitso.py +1 -1
  18. ccxt/async_support/bitteam.py +2 -0
  19. ccxt/async_support/bitvavo.py +25 -10
  20. ccxt/async_support/btcalpha.py +1 -1
  21. ccxt/async_support/btcmarkets.py +1 -1
  22. ccxt/async_support/btcturk.py +1 -1
  23. ccxt/async_support/bybit.py +27 -15
  24. ccxt/async_support/coinbase.py +3 -15
  25. ccxt/async_support/coinex.py +1 -0
  26. ccxt/async_support/coinlist.py +1 -0
  27. ccxt/async_support/coinone.py +1 -0
  28. ccxt/async_support/delta.py +3 -0
  29. ccxt/async_support/deribit.py +1 -0
  30. ccxt/async_support/hollaex.py +1 -0
  31. ccxt/async_support/htx.py +7 -3
  32. ccxt/async_support/huobijp.py +1 -0
  33. ccxt/async_support/hyperliquid.py +1 -0
  34. ccxt/async_support/kraken.py +2 -0
  35. ccxt/async_support/okx.py +1 -1
  36. ccxt/async_support/poloniex.py +1 -0
  37. ccxt/async_support/timex.py +2 -2
  38. ccxt/async_support/upbit.py +43 -21
  39. ccxt/async_support/whitebit.py +65 -12
  40. ccxt/base/errors.py +0 -6
  41. ccxt/base/exchange.py +1 -1
  42. ccxt/binance.py +6 -0
  43. ccxt/bingx.py +3 -3
  44. ccxt/bitfinex.py +59 -34
  45. ccxt/bitget.py +52 -64
  46. ccxt/bitmart.py +7 -2
  47. ccxt/bitmex.py +8 -1
  48. ccxt/bitopro.py +5 -1
  49. ccxt/bitrue.py +2 -1
  50. ccxt/bitso.py +1 -1
  51. ccxt/bitteam.py +2 -0
  52. ccxt/bitvavo.py +25 -10
  53. ccxt/btcalpha.py +1 -1
  54. ccxt/btcmarkets.py +1 -1
  55. ccxt/btcturk.py +1 -1
  56. ccxt/bybit.py +27 -15
  57. ccxt/coinbase.py +3 -15
  58. ccxt/coinex.py +1 -0
  59. ccxt/coinlist.py +1 -0
  60. ccxt/coinone.py +1 -0
  61. ccxt/delta.py +3 -0
  62. ccxt/deribit.py +1 -0
  63. ccxt/hollaex.py +1 -0
  64. ccxt/htx.py +7 -3
  65. ccxt/huobijp.py +1 -0
  66. ccxt/hyperliquid.py +1 -0
  67. ccxt/kraken.py +2 -0
  68. ccxt/okx.py +1 -1
  69. ccxt/poloniex.py +1 -0
  70. ccxt/pro/__init__.py +1 -1
  71. ccxt/pro/binance.py +3 -3
  72. ccxt/pro/coinbase.py +40 -52
  73. ccxt/pro/upbit.py +42 -0
  74. ccxt/test/tests_async.py +0 -1
  75. ccxt/test/tests_sync.py +0 -1
  76. ccxt/timex.py +2 -2
  77. ccxt/upbit.py +43 -21
  78. ccxt/whitebit.py +65 -12
  79. {ccxt-4.4.78.dist-info → ccxt-4.4.80.dist-info}/METADATA +9 -11
  80. {ccxt-4.4.78.dist-info → ccxt-4.4.80.dist-info}/RECORD +83 -83
  81. {ccxt-4.4.78.dist-info → ccxt-4.4.80.dist-info}/LICENSE.txt +0 -0
  82. {ccxt-4.4.78.dist-info → ccxt-4.4.80.dist-info}/WHEEL +0 -0
  83. {ccxt-4.4.78.dist-info → ccxt-4.4.80.dist-info}/top_level.txt +0 -0
@@ -491,7 +491,8 @@ class upbit(Exchange, ImplicitAPI):
491
491
  async def fetch_markets(self, params={}) -> List[Market]:
492
492
  """
493
493
 
494
- https://docs.upbit.com/reference/%EB%A7%88%EC%BC%93-%EC%BD%94%EB%93%9C-%EC%A1%B0%ED%9A%8C
494
+ https://docs.upbit.com/kr/reference/마켓-코드-조회
495
+ https://global-docs.upbit.com/reference/listing-market-list
495
496
 
496
497
  retrieves data on all markets for upbit
497
498
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -586,7 +587,8 @@ class upbit(Exchange, ImplicitAPI):
586
587
  async def fetch_balance(self, params={}) -> Balances:
587
588
  """
588
589
 
589
- https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EA%B3%84%EC%A2%8C-%EC%A1%B0%ED%9A%8C
590
+ https://docs.upbit.com/kr/reference/전체-계좌-조회
591
+ https://global-docs.upbit.com/reference/overall-account-inquiry
590
592
 
591
593
  query for balance and get the amount of funds available for trading or funds locked in orders
592
594
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -611,7 +613,8 @@ class upbit(Exchange, ImplicitAPI):
611
613
  async def fetch_order_books(self, symbols: Strings = None, limit: Int = None, params={}) -> OrderBooks:
612
614
  """
613
615
 
614
- https://docs.upbit.com/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
616
+ https://docs.upbit.com/kr/reference/호가-정보-조회
617
+ https://global-docs.upbit.com/reference/order-book-list
615
618
 
616
619
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data for multiple markets
617
620
  :param str[]|None symbols: list of unified market symbols, all symbols fetched if None, default is None
@@ -677,7 +680,8 @@ class upbit(Exchange, ImplicitAPI):
677
680
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
678
681
  """
679
682
 
680
- https://docs.upbit.com/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
683
+ https://docs.upbit.com/kr/reference/호가-정보-조회
684
+ https://global-docs.upbit.com/reference/order-book-list
681
685
 
682
686
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
683
687
  :param str symbol: unified symbol of the market to fetch the order book for
@@ -747,7 +751,8 @@ class upbit(Exchange, ImplicitAPI):
747
751
  async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
748
752
  """
749
753
 
750
- https://docs.upbit.com/reference/ticker%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4
754
+ https://docs.upbit.com/kr/reference/ticker현재가-정보
755
+ https://global-docs.upbit.com/reference/tickers
751
756
 
752
757
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
753
758
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
@@ -804,7 +809,8 @@ class upbit(Exchange, ImplicitAPI):
804
809
  async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
805
810
  """
806
811
 
807
- https://docs.upbit.com/reference/ticker%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4
812
+ https://docs.upbit.com/kr/reference/ticker현재가-정보
813
+ https://global-docs.upbit.com/reference/tickers
808
814
 
809
815
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
810
816
  :param str symbol: unified symbol of the market to fetch the ticker for
@@ -885,7 +891,8 @@ class upbit(Exchange, ImplicitAPI):
885
891
  async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
886
892
  """
887
893
 
888
- https://docs.upbit.com/reference/%EC%B5%9C%EA%B7%BC-%EC%B2%B4%EA%B2%B0-%EB%82%B4%EC%97%AD
894
+ https://docs.upbit.com/kr/reference/최근-체결-내역
895
+ https://global-docs.upbit.com/reference/today-trades-history
889
896
 
890
897
  get the list of most recent trades for a particular symbol
891
898
  :param str symbol: unified symbol of the market to fetch trades for
@@ -930,7 +937,8 @@ class upbit(Exchange, ImplicitAPI):
930
937
  async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
931
938
  """
932
939
 
933
- https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8-%EA%B0%80%EB%8A%A5-%EC%A0%95%EB%B3%B4
940
+ https://docs.upbit.com/kr/reference/주문-가능-정보
941
+ https://global-docs.upbit.com/reference/available-order-information
934
942
 
935
943
  fetch the trading fees for a market
936
944
  :param str symbol: unified market symbol
@@ -961,7 +969,7 @@ class upbit(Exchange, ImplicitAPI):
961
969
  # },
962
970
  # "bid_account": {
963
971
  # "currency": "KRW",
964
- # "balance": "0.34202414",
972
+ # "balance": "0.34202415",
965
973
  # "locked": "4999.99999922",
966
974
  # "avg_buy_price": "0",
967
975
  # "avg_buy_price_modified": True,
@@ -1040,7 +1048,8 @@ class upbit(Exchange, ImplicitAPI):
1040
1048
  async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
1041
1049
  """
1042
1050
 
1043
- https://docs.upbit.com/reference/%EB%B6%84minute-%EC%BA%94%EB%93%A4-1
1051
+ https://docs.upbit.com/kr/reference/분minute-캔들-1
1052
+ https://global-docs.upbit.com/reference/minutes
1044
1053
 
1045
1054
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1046
1055
  :param str symbol: unified symbol of the market to fetch OHLCV data for
@@ -1126,7 +1135,7 @@ class upbit(Exchange, ImplicitAPI):
1126
1135
  """
1127
1136
  create a trade order
1128
1137
 
1129
- https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
1138
+ https://docs.upbit.com/kr/reference/주문하기
1130
1139
  https://global-docs.upbit.com/reference/order
1131
1140
 
1132
1141
  :param str symbol: unified symbol of the market to create an order in
@@ -1220,7 +1229,8 @@ class upbit(Exchange, ImplicitAPI):
1220
1229
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
1221
1230
  """
1222
1231
 
1223
- https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8-%EC%B7%A8%EC%86%8C
1232
+ https://docs.upbit.com/kr/reference/주문-취소
1233
+ https://global-docs.upbit.com/reference/order-cancel
1224
1234
 
1225
1235
  cancels an open order
1226
1236
  :param str id: order id
@@ -1257,7 +1267,8 @@ class upbit(Exchange, ImplicitAPI):
1257
1267
  async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}) -> Order:
1258
1268
  """
1259
1269
 
1260
- https://docs.upbit.com/reference/%EC%B7%A8%EC%86%8C-%ED%9B%84-%EC%9E%AC%EC%A3%BC%EB%AC%B8
1270
+ https://docs.upbit.com/kr/reference/취소-후-재주문
1271
+ https://global-docs.upbit.com/reference/cancel-and-new
1261
1272
 
1262
1273
  canceled existing order and create new order. It's only generated same side and symbol canceled order. it returns the data of the canceled order, except for `new_order_uuid` and `new_identifier`. to get the details of the new order, use `fetchOrder(new_order_uuid)`.
1263
1274
  :param str id: the uuid of the previous order you want to edit.
@@ -1357,7 +1368,8 @@ class upbit(Exchange, ImplicitAPI):
1357
1368
  async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1358
1369
  """
1359
1370
 
1360
- https://docs.upbit.com/reference/%EC%9E%85%EA%B8%88-%EB%A6%AC%EC%8A%A4%ED%8A%B8-%EC%A1%B0%ED%9A%8C
1371
+ https://docs.upbit.com/kr/reference/입금-리스트-조회
1372
+ https://global-docs.upbit.com/reference/deposit-list-inquiry
1361
1373
 
1362
1374
  fetch all deposits made to an account
1363
1375
  :param str code: unified currency code
@@ -1400,6 +1412,7 @@ class upbit(Exchange, ImplicitAPI):
1400
1412
  """
1401
1413
  fetch information on a deposit
1402
1414
 
1415
+ https://docs.upbit.com/kr/reference/개별-입금-조회
1403
1416
  https://global-docs.upbit.com/reference/individual-deposit-inquiry
1404
1417
 
1405
1418
  :param str id: the unique id for the deposit
@@ -1437,7 +1450,8 @@ class upbit(Exchange, ImplicitAPI):
1437
1450
  async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1438
1451
  """
1439
1452
 
1440
- https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%B6%9C%EA%B8%88-%EC%A1%B0%ED%9A%8C
1453
+ https://docs.upbit.com/kr/reference/전체-출금-조회
1454
+ https://global-docs.upbit.com/reference/withdrawal-list-inquiry
1441
1455
 
1442
1456
  fetch all withdrawals made from an account
1443
1457
  :param str code: unified currency code
@@ -1480,6 +1494,7 @@ class upbit(Exchange, ImplicitAPI):
1480
1494
  """
1481
1495
  fetch data on a currency withdrawal via the withdrawal id
1482
1496
 
1497
+ https://docs.upbit.com/kr/reference/개별-출금-조회
1483
1498
  https://global-docs.upbit.com/reference/individual-withdrawal-inquiry
1484
1499
 
1485
1500
  :param str id: the unique id for the withdrawal
@@ -1768,6 +1783,7 @@ class upbit(Exchange, ImplicitAPI):
1768
1783
  """
1769
1784
  fetch all unfilled currently open orders
1770
1785
 
1786
+ https://docs.upbit.com/kr/reference/대기-주문-조회
1771
1787
  https://global-docs.upbit.com/reference/open-order
1772
1788
 
1773
1789
  :param str symbol: unified market symbol
@@ -1814,6 +1830,7 @@ class upbit(Exchange, ImplicitAPI):
1814
1830
  """
1815
1831
  fetches information on multiple closed orders made by the user
1816
1832
 
1833
+ https://docs.upbit.com/kr/reference/종료-주문-조회
1817
1834
  https://global-docs.upbit.com/reference/closed-order
1818
1835
 
1819
1836
  :param str symbol: unified market symbol of the market orders were made in
@@ -1866,6 +1883,7 @@ class upbit(Exchange, ImplicitAPI):
1866
1883
  """
1867
1884
  fetches information on multiple canceled orders made by the user
1868
1885
 
1886
+ https://docs.upbit.com/kr/reference/종료-주문-조회
1869
1887
  https://global-docs.upbit.com/reference/closed-order
1870
1888
 
1871
1889
  :param str symbol: unified market symbol of the market orders were made in
@@ -1917,7 +1935,8 @@ class upbit(Exchange, ImplicitAPI):
1917
1935
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
1918
1936
  """
1919
1937
 
1920
- https://docs.upbit.com/reference/%EA%B0%9C%EB%B3%84-%EC%A3%BC%EB%AC%B8-%EC%A1%B0%ED%9A%8C
1938
+ https://docs.upbit.com/kr/reference/개별-주문-조회
1939
+ https://global-docs.upbit.com/reference/individual-order-inquiry
1921
1940
 
1922
1941
  fetches information on an order made by the user
1923
1942
  :param str id: order id
@@ -1978,7 +1997,8 @@ class upbit(Exchange, ImplicitAPI):
1978
1997
  async def fetch_deposit_addresses(self, codes: Strings = None, params={}) -> List[DepositAddress]:
1979
1998
  """
1980
1999
 
1981
- https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%A1%B0%ED%9A%8C
2000
+ https://docs.upbit.com/kr/reference/전체-입금-주소-조회
2001
+ https://global-docs.upbit.com/reference/general-deposit-address-inquiry
1982
2002
 
1983
2003
  fetch deposit addresses for multiple currencies and chain types
1984
2004
  :param str[]|None codes: list of unified currency codes, default is None
@@ -2034,7 +2054,8 @@ class upbit(Exchange, ImplicitAPI):
2034
2054
  async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
2035
2055
  """
2036
2056
 
2037
- https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%A1%B0%ED%9A%8C
2057
+ https://docs.upbit.com/kr/reference/개별-입금-주소-조회
2058
+ https://global-docs.upbit.com/reference/individual-deposit-address-inquiry
2038
2059
 
2039
2060
  fetch the deposit address for a currency associated with self account
2040
2061
  :param str code: unified currency code
@@ -2065,7 +2086,8 @@ class upbit(Exchange, ImplicitAPI):
2065
2086
  async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
2066
2087
  """
2067
2088
 
2068
- https://docs.upbit.com/reference/%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%83%9D%EC%84%B1-%EC%9A%94%EC%B2%AD
2089
+ https://docs.upbit.com/kr/reference/입금-주소-생성-요청
2090
+ https://global-docs.upbit.com/reference/deposit-address-generation
2069
2091
 
2070
2092
  create a currency deposit address
2071
2093
  :param str code: unified currency code of the currency for the deposit address
@@ -2102,8 +2124,8 @@ class upbit(Exchange, ImplicitAPI):
2102
2124
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2103
2125
  """
2104
2126
 
2105
- https://docs.upbit.com/reference/디지털자산-출금하기
2106
- https://docs.upbit.com/reference/%EC%9B%90%ED%99%94-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0
2127
+ https://docs.upbit.com/kr/reference/디지털자산-출금하기
2128
+ https://global-docs.upbit.com/reference/withdrawal-digital-assets
2107
2129
 
2108
2130
  make a withdrawal
2109
2131
  :param str code: unified currency code
@@ -554,18 +554,69 @@ class whitebit(Exchange, ImplicitAPI):
554
554
  """
555
555
  response = await self.v4PublicGetAssets(params)
556
556
  #
557
- # "BTC": {
558
- # "name": "Bitcoin",
559
- # "unified_cryptoasset_id": 1,
560
- # "can_withdraw": True,
561
- # "can_deposit": True,
562
- # "min_withdraw": "0.001",
563
- # "max_withdraw": "2",
564
- # "maker_fee": "0.1",
565
- # "taker_fee": "0.1",
566
- # "min_deposit": "0.0001",
567
- # "max_deposit": "0",
568
- # },
557
+ # {
558
+ # BTC: {
559
+ # name: "Bitcoin",
560
+ # unified_cryptoasset_id: "1",
561
+ # can_withdraw: True,
562
+ # can_deposit: True,
563
+ # min_withdraw: "0.0003",
564
+ # max_withdraw: "0",
565
+ # maker_fee: "0.1",
566
+ # taker_fee: "0.1",
567
+ # min_deposit: "0.0001",
568
+ # max_deposit: "0",
569
+ # networks: {
570
+ # deposits: ["BTC",],
571
+ # withdraws: ["BTC",],
572
+ # default: "BTC",
573
+ # },
574
+ # confirmations: {
575
+ # BTC: "2",
576
+ # },
577
+ # limits: {
578
+ # deposit: {
579
+ # BTC: {min: "0.0001",},
580
+ # },
581
+ # withdraw: {
582
+ # BTC: {min: "0.0003",},
583
+ # },
584
+ # },
585
+ # currency_precision: "8",
586
+ # is_memo: False,
587
+ # },
588
+ # USD: {
589
+ # name: "United States Dollar",
590
+ # unified_cryptoasset_id: "6955",
591
+ # can_withdraw: True,
592
+ # can_deposit: True,
593
+ # min_withdraw: "10",
594
+ # max_withdraw: "10000",
595
+ # maker_fee: "0.1",
596
+ # taker_fee: "0.1",
597
+ # min_deposit: "10",
598
+ # max_deposit: "10000",
599
+ # networks: {
600
+ # deposits: ["USD",],
601
+ # withdraws: ["USD",],
602
+ # default: "USD",
603
+ # },
604
+ # providers: {
605
+ # deposits: ["ADVCASH",],
606
+ # withdraws: ["ADVCASH",],
607
+ # },
608
+ # limits: {
609
+ # deposit: {
610
+ # USD: { max: "10000", min: "10",},
611
+ # },
612
+ # withdraw: {
613
+ # USD: {max: "10000", min: "10",},
614
+ # },
615
+ # },
616
+ # currency_precision: "2",
617
+ # is_memo: False,
618
+ # }
619
+ # }
569
620
  #
570
621
  ids = list(response.keys())
571
622
  result: dict = {}
@@ -578,6 +629,7 @@ class whitebit(Exchange, ImplicitAPI):
578
629
  canWithdraw = self.safe_bool(currency, 'can_withdraw', True)
579
630
  active = canDeposit and canWithdraw
580
631
  code = self.safe_currency_code(id)
632
+ hasProvider = ('providers' in currency)
581
633
  result[code] = {
582
634
  'id': id,
583
635
  'code': code,
@@ -588,6 +640,7 @@ class whitebit(Exchange, ImplicitAPI):
588
640
  'withdraw': canWithdraw,
589
641
  'fee': None,
590
642
  'networks': None, # todo
643
+ 'type': 'fiat' if hasProvider else 'crypto',
591
644
  'precision': None,
592
645
  'limits': {
593
646
  'amount': {
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.78'
7
+ __version__ = '4.4.80'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/binance.py CHANGED
@@ -1293,6 +1293,7 @@ class binance(Exchange, ImplicitAPI):
1293
1293
  'inverse', # allows CORS in browsers
1294
1294
  # 'option', # does not allow CORS, enable outside of the browser only
1295
1295
  ],
1296
+ 'loadAllOptions': False,
1296
1297
  'fetchCurrencies': True, # self is a private call and it requires API keys
1297
1298
  # 'fetchTradesMethod': 'publicGetAggTrades', # publicGetTrades, publicGetHistoricalTrades, eapiPublicGetTrades
1298
1299
  # 'repayCrossMarginMethod': 'papiPostRepayLoan', # papiPostMarginRepayDebt
@@ -3020,6 +3021,11 @@ class binance(Exchange, ImplicitAPI):
3020
3021
  """
3021
3022
  promisesRaw = []
3022
3023
  rawFetchMarkets = self.safe_list(self.options, 'fetchMarkets', ['spot', 'linear', 'inverse'])
3024
+ # handle loadAllOptions option
3025
+ loadAllOptions = self.safe_bool(self.options, 'loadAllOptions', False)
3026
+ if loadAllOptions:
3027
+ if not self.in_array('option', rawFetchMarkets):
3028
+ rawFetchMarkets.append('option')
3023
3029
  sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
3024
3030
  fetchMarkets = []
3025
3031
  for i in range(0, len(rawFetchMarkets)):
ccxt/bingx.py CHANGED
@@ -722,7 +722,7 @@ class bingx(Exchange, ImplicitAPI):
722
722
  #
723
723
  # {
724
724
  # "code": 0,
725
- # "timestamp": 1702623271477,
725
+ # "timestamp": 1702623271476,
726
726
  # "data": [
727
727
  # {
728
728
  # "coin": "BTC",
@@ -804,7 +804,7 @@ class bingx(Exchange, ImplicitAPI):
804
804
  'limits': limits,
805
805
  }
806
806
  active = depositEnabled or withdrawEnabled
807
- result[code] = {
807
+ result[code] = self.safe_currency_structure({
808
808
  'info': entry,
809
809
  'code': code,
810
810
  'id': currencyId,
@@ -816,7 +816,7 @@ class bingx(Exchange, ImplicitAPI):
816
816
  'networks': networks,
817
817
  'fee': fee,
818
818
  'limits': defaultLimits,
819
- }
819
+ })
820
820
  return result
821
821
 
822
822
  def fetch_spot_markets(self, params) -> List[Market]:
ccxt/bitfinex.py CHANGED
@@ -1150,9 +1150,8 @@ class bitfinex(Exchange, ImplicitAPI):
1150
1150
  #
1151
1151
  # on trading pairs(ex. tBTCUSD)
1152
1152
  #
1153
- # {
1154
- # 'result': [
1155
- # SYMBOL,
1153
+ # [
1154
+ # SYMBOL, # self index is not present in singular-ticker
1156
1155
  # BID,
1157
1156
  # BID_SIZE,
1158
1157
  # ASK,
@@ -1163,15 +1162,13 @@ class bitfinex(Exchange, ImplicitAPI):
1163
1162
  # VOLUME,
1164
1163
  # HIGH,
1165
1164
  # LOW
1166
- # ]
1167
- # }
1165
+ # ]
1168
1166
  #
1169
1167
  #
1170
1168
  # on funding currencies(ex. fUSD)
1171
1169
  #
1172
- # {
1173
- # 'result': [
1174
- # SYMBOL,
1170
+ # [
1171
+ # SYMBOL, # self index is not present in singular-ticker
1175
1172
  # FRR,
1176
1173
  # BID,
1177
1174
  # BID_PERIOD,
@@ -1188,35 +1185,71 @@ class bitfinex(Exchange, ImplicitAPI):
1188
1185
  # _PLACEHOLDER,
1189
1186
  # _PLACEHOLDER,
1190
1187
  # FRR_AMOUNT_AVAILABLE
1191
- # ]
1192
- # }
1188
+ # ]
1193
1189
  #
1194
- result = self.safe_list(ticker, 'result')
1190
+ length = len(ticker)
1191
+ isFetchTicker = (length == 10) or (length == 16)
1192
+ symbol: Str = None
1193
+ minusIndex = 0
1194
+ isFundingCurrency = False
1195
+ if isFetchTicker:
1196
+ minusIndex = 1
1197
+ isFundingCurrency = (length == 16)
1198
+ else:
1199
+ marketId = self.safe_string(ticker, 0)
1200
+ market = self.safe_market(marketId, market)
1201
+ isFundingCurrency = (length == 17)
1195
1202
  symbol = self.safe_symbol(None, market)
1196
- length = len(result)
1197
- last = self.safe_string(result, length - 4)
1198
- percentage = self.safe_string(result, length - 5)
1203
+ last: Str = None
1204
+ bid: Str = None
1205
+ ask: Str = None
1206
+ change: Str = None
1207
+ percentage: Str = None
1208
+ volume: Str = None
1209
+ high: Str = None
1210
+ low: Str = None
1211
+ if isFundingCurrency:
1212
+ # per api docs, they are different array type
1213
+ last = self.safe_string(ticker, 10 - minusIndex)
1214
+ bid = self.safe_string(ticker, 2 - minusIndex)
1215
+ ask = self.safe_string(ticker, 5 - minusIndex)
1216
+ change = self.safe_string(ticker, 8 - minusIndex)
1217
+ percentage = self.safe_string(ticker, 9 - minusIndex)
1218
+ volume = self.safe_string(ticker, 11 - minusIndex)
1219
+ high = self.safe_string(ticker, 12 - minusIndex)
1220
+ low = self.safe_string(ticker, 13 - minusIndex)
1221
+ else:
1222
+ # on trading pairs(ex. tBTCUSD or tHMSTR:USD)
1223
+ last = self.safe_string(ticker, 7 - minusIndex)
1224
+ bid = self.safe_string(ticker, 1 - minusIndex)
1225
+ ask = self.safe_string(ticker, 3 - minusIndex)
1226
+ change = self.safe_string(ticker, 5 - minusIndex)
1227
+ percentage = self.safe_string(ticker, 6 - minusIndex)
1228
+ percentage = Precise.string_mul(percentage, '100')
1229
+ volume = self.safe_string(ticker, 8 - minusIndex)
1230
+ high = self.safe_string(ticker, 9 - minusIndex)
1231
+ low = self.safe_string(ticker, 10 - minusIndex)
1199
1232
  return self.safe_ticker({
1200
1233
  'symbol': symbol,
1201
1234
  'timestamp': None,
1202
1235
  'datetime': None,
1203
- 'high': self.safe_string(result, length - 2),
1204
- 'low': self.safe_string(result, length - 1),
1205
- 'bid': self.safe_string(result, length - 10),
1206
- 'bidVolume': self.safe_string(result, length - 9),
1207
- 'ask': self.safe_string(result, length - 8),
1208
- 'askVolume': self.safe_string(result, length - 7),
1236
+ 'high': high,
1237
+ 'low': low,
1238
+ 'bid': bid,
1239
+ 'bidVolume': None,
1240
+ 'ask': ask,
1241
+ 'askVolume': None,
1209
1242
  'vwap': None,
1210
1243
  'open': None,
1211
1244
  'close': last,
1212
1245
  'last': last,
1213
1246
  'previousClose': None,
1214
- 'change': self.safe_string(result, length - 6),
1215
- 'percentage': Precise.string_mul(percentage, '100'),
1247
+ 'change': change,
1248
+ 'percentage': percentage,
1216
1249
  'average': None,
1217
- 'baseVolume': self.safe_string(result, length - 3),
1250
+ 'baseVolume': volume,
1218
1251
  'quoteVolume': None,
1219
- 'info': result,
1252
+ 'info': ticker,
1220
1253
  }, market)
1221
1254
 
1222
1255
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
@@ -1277,14 +1310,7 @@ class bitfinex(Exchange, ImplicitAPI):
1277
1310
  # ...
1278
1311
  # ]
1279
1312
  #
1280
- result: dict = {}
1281
- for i in range(0, len(tickers)):
1282
- ticker = tickers[i]
1283
- marketId = self.safe_string(ticker, 0)
1284
- market = self.safe_market(marketId)
1285
- symbol = market['symbol']
1286
- result[symbol] = self.parse_ticker({'result': ticker}, market)
1287
- return self.filter_by_array_tickers(result, 'symbol', symbols)
1313
+ return self.parse_tickers(tickers, symbols)
1288
1314
 
1289
1315
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
1290
1316
  """
@@ -1302,8 +1328,7 @@ class bitfinex(Exchange, ImplicitAPI):
1302
1328
  'symbol': market['id'],
1303
1329
  }
1304
1330
  ticker = self.publicGetTickerSymbol(self.extend(request, params))
1305
- result: dict = {'result': ticker}
1306
- return self.parse_ticker(result, market)
1331
+ return self.parse_ticker(ticker, market)
1307
1332
 
1308
1333
  def parse_trade(self, trade: dict, market: Market = None) -> Trade:
1309
1334
  #