ccxt 4.4.78__py2.py3-none-any.whl → 4.4.82__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.
- ccxt/__init__.py +1 -1
- ccxt/abstract/bitmart.py +1 -0
- ccxt/apex.py +21 -31
- ccxt/ascendex.py +23 -6
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/apex.py +21 -31
- ccxt/async_support/ascendex.py +23 -6
- ccxt/async_support/base/exchange.py +5 -1
- ccxt/async_support/bigone.py +17 -14
- ccxt/async_support/binance.py +6 -0
- ccxt/async_support/bingx.py +16 -35
- ccxt/async_support/bitfinex.py +120 -82
- ccxt/async_support/bitget.py +58 -66
- ccxt/async_support/bitmart.py +7 -2
- ccxt/async_support/bitmex.py +8 -1
- ccxt/async_support/bitopro.py +5 -1
- ccxt/async_support/bitrue.py +2 -1
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitteam.py +2 -0
- ccxt/async_support/bitvavo.py +25 -10
- ccxt/async_support/btcalpha.py +1 -1
- ccxt/async_support/btcmarkets.py +1 -1
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +29 -15
- ccxt/async_support/coinbase.py +3 -15
- ccxt/async_support/coinex.py +1 -0
- ccxt/async_support/coinlist.py +1 -0
- ccxt/async_support/coinone.py +1 -0
- ccxt/async_support/delta.py +3 -0
- ccxt/async_support/deribit.py +1 -0
- ccxt/async_support/hollaex.py +1 -0
- ccxt/async_support/htx.py +9 -5
- ccxt/async_support/huobijp.py +1 -0
- ccxt/async_support/hyperliquid.py +14 -0
- ccxt/async_support/kraken.py +2 -0
- ccxt/async_support/okx.py +2 -3
- ccxt/async_support/oxfun.py +21 -1
- ccxt/async_support/poloniex.py +1 -0
- ccxt/async_support/timex.py +2 -2
- ccxt/async_support/upbit.py +43 -21
- ccxt/async_support/whitebit.py +65 -12
- ccxt/base/exchange.py +20 -2
- ccxt/bigone.py +17 -14
- ccxt/binance.py +6 -0
- ccxt/bingx.py +16 -35
- ccxt/bitfinex.py +120 -82
- ccxt/bitget.py +58 -66
- ccxt/bitmart.py +7 -2
- ccxt/bitmex.py +8 -1
- ccxt/bitopro.py +5 -1
- ccxt/bitrue.py +2 -1
- ccxt/bitso.py +1 -1
- ccxt/bitteam.py +2 -0
- ccxt/bitvavo.py +25 -10
- ccxt/btcalpha.py +1 -1
- ccxt/btcmarkets.py +1 -1
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +29 -15
- ccxt/coinbase.py +3 -15
- ccxt/coinex.py +1 -0
- ccxt/coinlist.py +1 -0
- ccxt/coinone.py +1 -0
- ccxt/delta.py +3 -0
- ccxt/deribit.py +1 -0
- ccxt/hollaex.py +1 -0
- ccxt/htx.py +9 -5
- ccxt/huobijp.py +1 -0
- ccxt/hyperliquid.py +14 -0
- ccxt/kraken.py +2 -0
- ccxt/okx.py +2 -3
- ccxt/oxfun.py +21 -1
- ccxt/poloniex.py +1 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +3 -3
- ccxt/pro/coinbase.py +41 -53
- ccxt/pro/hyperliquid.py +10 -2
- ccxt/pro/upbit.py +42 -0
- ccxt/test/tests_async.py +0 -1
- ccxt/test/tests_sync.py +0 -1
- ccxt/timex.py +2 -2
- ccxt/upbit.py +43 -21
- ccxt/whitebit.py +65 -12
- {ccxt-4.4.78.dist-info → ccxt-4.4.82.dist-info}/METADATA +9 -13
- {ccxt-4.4.78.dist-info → ccxt-4.4.82.dist-info}/RECORD +87 -87
- {ccxt-4.4.78.dist-info → ccxt-4.4.82.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.78.dist-info → ccxt-4.4.82.dist-info}/WHEEL +0 -0
- {ccxt-4.4.78.dist-info → ccxt-4.4.82.dist-info}/top_level.txt +0 -0
ccxt/async_support/upbit.py
CHANGED
@@ -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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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.
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
ccxt/async_support/whitebit.py
CHANGED
@@ -554,18 +554,69 @@ class whitebit(Exchange, ImplicitAPI):
|
|
554
554
|
"""
|
555
555
|
response = await self.v4PublicGetAssets(params)
|
556
556
|
#
|
557
|
-
#
|
558
|
-
#
|
559
|
-
#
|
560
|
-
#
|
561
|
-
#
|
562
|
-
#
|
563
|
-
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
#
|
567
|
-
#
|
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/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.82'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -1000,7 +1000,7 @@ class Exchange(object):
|
|
1000
1000
|
return string
|
1001
1001
|
|
1002
1002
|
@staticmethod
|
1003
|
-
def urlencode(params={}, doseq=False):
|
1003
|
+
def urlencode(params={}, doseq=False, sort=False):
|
1004
1004
|
newParams = params.copy()
|
1005
1005
|
for key, value in params.items():
|
1006
1006
|
if isinstance(value, bool):
|
@@ -5522,6 +5522,24 @@ class Exchange(object):
|
|
5522
5522
|
def create_expired_option_market(self, symbol: str):
|
5523
5523
|
raise NotSupported(self.id + ' createExpiredOptionMarket() is not supported yet')
|
5524
5524
|
|
5525
|
+
def is_leveraged_currency(self, currencyCode, checkBaseCoin: Bool = False, existingCurrencies: dict = None):
|
5526
|
+
leverageSuffixes = [
|
5527
|
+
'2L', '2S', '3L', '3S', '4L', '4S', '5L', '5S', # Leveraged Tokens(LT)
|
5528
|
+
'UP', 'DOWN', # exchange-specific(e.g. BLVT)
|
5529
|
+
'BULL', 'BEAR', # similar
|
5530
|
+
]
|
5531
|
+
for i in range(0, len(leverageSuffixes)):
|
5532
|
+
leverageSuffix = leverageSuffixes[i]
|
5533
|
+
if currencyCode.endswith(leverageSuffix):
|
5534
|
+
if not checkBaseCoin:
|
5535
|
+
return True
|
5536
|
+
else:
|
5537
|
+
# check if base currency is inside dict
|
5538
|
+
baseCurrencyCode = currencyCode.replace(leverageSuffix, '')
|
5539
|
+
if baseCurrencyCode in existingCurrencies:
|
5540
|
+
return True
|
5541
|
+
return False
|
5542
|
+
|
5525
5543
|
def handle_withdraw_tag_and_params(self, tag, params):
|
5526
5544
|
if (tag is not None) and (isinstance(tag, dict)):
|
5527
5545
|
params = self.extend(tag, params)
|
ccxt/bigone.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bigone import ImplicitAPI
|
8
|
-
from ccxt.base.types import Any, Balances,
|
8
|
+
from ccxt.base.types import Any, Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -509,19 +509,15 @@ class bigone(Exchange, ImplicitAPI):
|
|
509
509
|
id = self.safe_string(currency, 'symbol')
|
510
510
|
code = self.safe_currency_code(id)
|
511
511
|
name = self.safe_string(currency, 'name')
|
512
|
-
type = 'fiat' if self.safe_bool(currency, 'is_fiat') else 'crypto'
|
513
512
|
networks: dict = {}
|
514
513
|
chains = self.safe_list(currency, 'binding_gateways', [])
|
515
514
|
currencyMaxPrecision = self.parse_precision(self.safe_string_2(currency, 'withdrawal_scale', 'scale'))
|
516
|
-
currencyDepositEnabled: Bool = None
|
517
|
-
currencyWithdrawEnabled: Bool = None
|
518
515
|
for j in range(0, len(chains)):
|
519
516
|
chain = chains[j]
|
520
517
|
networkId = self.safe_string(chain, 'gateway_name')
|
521
518
|
networkCode = self.network_id_to_code(networkId)
|
522
519
|
deposit = self.safe_bool(chain, 'is_deposit_enabled')
|
523
520
|
withdraw = self.safe_bool(chain, 'is_withdrawal_enabled')
|
524
|
-
isActive = (deposit and withdraw)
|
525
521
|
minDepositAmount = self.safe_string(chain, 'min_deposit_amount')
|
526
522
|
minWithdrawalAmount = self.safe_string(chain, 'min_withdrawal_amount')
|
527
523
|
withdrawalFee = self.safe_string(chain, 'withdrawal_fee')
|
@@ -532,7 +528,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
532
528
|
'margin': None,
|
533
529
|
'deposit': deposit,
|
534
530
|
'withdraw': withdraw,
|
535
|
-
'active':
|
531
|
+
'active': None,
|
536
532
|
'fee': self.parse_number(withdrawalFee),
|
537
533
|
'precision': self.parse_number(precision),
|
538
534
|
'limits': {
|
@@ -547,19 +543,26 @@ class bigone(Exchange, ImplicitAPI):
|
|
547
543
|
},
|
548
544
|
'info': chain,
|
549
545
|
}
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
546
|
+
chainLength = len(chains)
|
547
|
+
type: Str = None
|
548
|
+
if self.safe_bool(currency, 'is_fiat'):
|
549
|
+
type = 'fiat'
|
550
|
+
elif chainLength == 0:
|
551
|
+
if self.is_leveraged_currency(id):
|
552
|
+
type = 'leveraged'
|
553
|
+
else:
|
554
|
+
type = 'other'
|
555
|
+
else:
|
556
|
+
type = 'crypto'
|
557
|
+
result[code] = self.safe_currency_structure({
|
555
558
|
'id': id,
|
556
559
|
'code': code,
|
557
560
|
'info': currency,
|
558
561
|
'name': name,
|
559
562
|
'type': type,
|
560
563
|
'active': None,
|
561
|
-
'deposit':
|
562
|
-
'withdraw':
|
564
|
+
'deposit': None,
|
565
|
+
'withdraw': None,
|
563
566
|
'fee': None,
|
564
567
|
'precision': self.parse_number(currencyMaxPrecision),
|
565
568
|
'limits': {
|
@@ -573,7 +576,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
573
576
|
},
|
574
577
|
},
|
575
578
|
'networks': networks,
|
576
|
-
}
|
579
|
+
})
|
577
580
|
return result
|
578
581
|
|
579
582
|
def fetch_markets(self, params={}) -> List[Market]:
|
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":
|
725
|
+
# "timestamp": 1702623271476,
|
726
726
|
# "data": [
|
727
727
|
# {
|
728
728
|
# "coin": "BTC",
|
@@ -766,57 +766,42 @@ class bingx(Exchange, ImplicitAPI):
|
|
766
766
|
name = self.safe_string(entry, 'name')
|
767
767
|
networkList = self.safe_list(entry, 'networkList')
|
768
768
|
networks: dict = {}
|
769
|
-
fee = None
|
770
|
-
depositEnabled = False
|
771
|
-
withdrawEnabled = False
|
772
|
-
defaultLimits: dict = {}
|
773
769
|
for j in range(0, len(networkList)):
|
774
770
|
rawNetwork = networkList[j]
|
775
771
|
network = self.safe_string(rawNetwork, 'network')
|
776
772
|
networkCode = self.network_id_to_code(network)
|
777
|
-
isDefault = self.safe_bool(rawNetwork, 'isDefault')
|
778
|
-
networkDepositEnabled = self.safe_bool(rawNetwork, 'depositEnable')
|
779
|
-
if networkDepositEnabled:
|
780
|
-
depositEnabled = True
|
781
|
-
networkWithdrawEnabled = self.safe_bool(rawNetwork, 'withdrawEnable')
|
782
|
-
if networkWithdrawEnabled:
|
783
|
-
withdrawEnabled = True
|
784
773
|
limits: dict = {
|
785
774
|
'withdraw': {
|
786
775
|
'min': self.safe_number(rawNetwork, 'withdrawMin'),
|
787
776
|
'max': self.safe_number(rawNetwork, 'withdrawMax'),
|
788
777
|
},
|
789
778
|
}
|
790
|
-
|
791
|
-
if isDefault:
|
792
|
-
defaultLimits = limits
|
793
|
-
precision = self.safe_number(rawNetwork, 'withdrawPrecision')
|
794
|
-
networkActive = networkDepositEnabled or networkWithdrawEnabled
|
779
|
+
precision = self.parse_number(self.parse_precision(self.safe_string(rawNetwork, 'withdrawPrecision')))
|
795
780
|
networks[networkCode] = {
|
796
781
|
'info': rawNetwork,
|
797
782
|
'id': network,
|
798
783
|
'network': networkCode,
|
799
|
-
'fee':
|
800
|
-
'active':
|
801
|
-
'deposit':
|
802
|
-
'withdraw':
|
784
|
+
'fee': self.safe_number(rawNetwork, 'withdrawFee'),
|
785
|
+
'active': None,
|
786
|
+
'deposit': self.safe_bool(rawNetwork, 'depositEnable'),
|
787
|
+
'withdraw': self.safe_bool(rawNetwork, 'withdrawEnable'),
|
803
788
|
'precision': precision,
|
804
789
|
'limits': limits,
|
805
790
|
}
|
806
|
-
|
807
|
-
result[code] = {
|
791
|
+
result[code] = self.safe_currency_structure({
|
808
792
|
'info': entry,
|
809
793
|
'code': code,
|
810
794
|
'id': currencyId,
|
811
795
|
'precision': None,
|
812
796
|
'name': name,
|
813
|
-
'active':
|
814
|
-
'deposit':
|
815
|
-
'withdraw':
|
797
|
+
'active': None,
|
798
|
+
'deposit': None,
|
799
|
+
'withdraw': None,
|
816
800
|
'networks': networks,
|
817
|
-
'fee':
|
818
|
-
'limits':
|
819
|
-
|
801
|
+
'fee': None,
|
802
|
+
'limits': None,
|
803
|
+
'type': 'crypto', # only cryptos now
|
804
|
+
})
|
820
805
|
return result
|
821
806
|
|
822
807
|
def fetch_spot_markets(self, params) -> List[Market]:
|
@@ -5535,18 +5520,14 @@ class bingx(Exchange, ImplicitAPI):
|
|
5535
5520
|
:param str address: the address to withdraw to
|
5536
5521
|
:param str [tag]:
|
5537
5522
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5538
|
-
:param int [params.walletType]: 1 fund account, 2 standard account, 3 perpetual account
|
5523
|
+
:param int [params.walletType]: 1 fund account, 2 standard account, 3 perpetual account, 15 spot account
|
5539
5524
|
:returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
5540
5525
|
"""
|
5541
5526
|
tag, params = self.handle_withdraw_tag_and_params(tag, params)
|
5542
5527
|
self.check_address(address)
|
5543
5528
|
self.load_markets()
|
5544
5529
|
currency = self.currency(code)
|
5545
|
-
walletType = self.safe_integer(params, 'walletType')
|
5546
|
-
if walletType is None:
|
5547
|
-
walletType = 1
|
5548
|
-
if not self.in_array(walletType, [1, 2, 3]):
|
5549
|
-
raise BadRequest(self.id + ' withdraw() requires either 1 fund account, 2 standard futures account, 3 perpetual account for walletType')
|
5530
|
+
walletType = self.safe_integer(params, 'walletType', 1)
|
5550
5531
|
request: dict = {
|
5551
5532
|
'coin': currency['id'],
|
5552
5533
|
'address': address,
|