ccxt 4.3.68__py2.py3-none-any.whl → 4.3.69__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/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +2 -2
- ccxt/async_support/bingx.py +129 -73
- ccxt/async_support/bitget.py +2 -2
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitrue.py +2 -2
- ccxt/async_support/btcbox.py +1 -1
- ccxt/async_support/bybit.py +2 -2
- ccxt/async_support/coinbaseinternational.py +72 -1
- ccxt/async_support/coinex.py +2 -2
- ccxt/async_support/coinlist.py +2 -2
- ccxt/async_support/deribit.py +2 -2
- ccxt/async_support/digifinex.py +2 -2
- ccxt/async_support/hyperliquid.py +0 -2
- ccxt/async_support/kucoin.py +11 -5
- ccxt/async_support/latoken.py +2 -2
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/okx.py +2 -2
- ccxt/async_support/oxfun.py +1 -1
- ccxt/async_support/phemex.py +2 -2
- ccxt/async_support/poloniex.py +33 -33
- ccxt/async_support/poloniexfutures.py +26 -26
- ccxt/async_support/woo.py +2 -2
- ccxt/base/exchange.py +329 -117
- ccxt/base/types.py +21 -3
- ccxt/binance.py +2 -2
- ccxt/bingx.py +129 -73
- ccxt/bitget.py +2 -2
- ccxt/bitmart.py +2 -2
- ccxt/bitrue.py +2 -2
- ccxt/btcbox.py +1 -1
- ccxt/bybit.py +2 -2
- ccxt/coinbaseinternational.py +72 -1
- ccxt/coinex.py +2 -2
- ccxt/coinlist.py +2 -2
- ccxt/deribit.py +2 -2
- ccxt/digifinex.py +2 -2
- ccxt/hyperliquid.py +0 -2
- ccxt/kucoin.py +11 -5
- ccxt/latoken.py +2 -2
- ccxt/mexc.py +2 -2
- ccxt/okx.py +2 -2
- ccxt/oxfun.py +1 -1
- ccxt/phemex.py +2 -2
- ccxt/poloniex.py +33 -33
- ccxt/poloniexfutures.py +26 -26
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/poloniex.py +13 -13
- ccxt/pro/poloniexfutures.py +5 -5
- ccxt/woo.py +2 -2
- {ccxt-4.3.68.dist-info → ccxt-4.3.69.dist-info}/METADATA +6 -6
- {ccxt-4.3.68.dist-info → ccxt-4.3.69.dist-info}/RECORD +57 -57
- {ccxt-4.3.68.dist-info → ccxt-4.3.69.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.3.68.dist-info → ccxt-4.3.69.dist-info}/WHEEL +0 -0
- {ccxt-4.3.68.dist-info → ccxt-4.3.69.dist-info}/top_level.txt +0 -0
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.3.
|
7
|
+
__version__ = '4.3.69'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -109,6 +109,7 @@ class Exchange(object):
|
|
109
109
|
"""Base exchange class"""
|
110
110
|
id = None
|
111
111
|
name = None
|
112
|
+
countries = None
|
112
113
|
version = None
|
113
114
|
certified = False # if certified by the CCXT dev team
|
114
115
|
pro = False # if it is integrated with CCXT Pro for WebSocket support
|
@@ -133,12 +134,18 @@ class Exchange(object):
|
|
133
134
|
markets = None
|
134
135
|
symbols = None
|
135
136
|
codes = None
|
136
|
-
timeframes =
|
137
|
+
timeframes = {}
|
138
|
+
|
137
139
|
fees = {
|
138
140
|
'trading': {
|
139
|
-
'
|
141
|
+
'tierBased': None,
|
142
|
+
'percentage': None,
|
143
|
+
'taker': None,
|
144
|
+
'maker': None,
|
140
145
|
},
|
141
146
|
'funding': {
|
147
|
+
'tierBased': None,
|
148
|
+
'percentage': None,
|
142
149
|
'withdraw': {},
|
143
150
|
'deposit': {},
|
144
151
|
},
|
@@ -206,6 +213,7 @@ class Exchange(object):
|
|
206
213
|
twofa = None
|
207
214
|
markets_by_id = None
|
208
215
|
currencies_by_id = None
|
216
|
+
|
209
217
|
precision = None
|
210
218
|
exceptions = None
|
211
219
|
limits = {
|
@@ -226,6 +234,7 @@ class Exchange(object):
|
|
226
234
|
'max': None,
|
227
235
|
},
|
228
236
|
}
|
237
|
+
|
229
238
|
httpExceptions = {
|
230
239
|
'422': ExchangeError,
|
231
240
|
'418': DDoSProtection,
|
@@ -273,6 +282,8 @@ class Exchange(object):
|
|
273
282
|
accounts = None
|
274
283
|
positions = None
|
275
284
|
|
285
|
+
status = None
|
286
|
+
|
276
287
|
requiredCredentials = {
|
277
288
|
'apiKey': True,
|
278
289
|
'secret': True,
|
@@ -287,117 +298,7 @@ class Exchange(object):
|
|
287
298
|
}
|
288
299
|
|
289
300
|
# API method metainfo
|
290
|
-
has = {
|
291
|
-
'publicAPI': True,
|
292
|
-
'privateAPI': True,
|
293
|
-
'CORS': None,
|
294
|
-
'spot': None,
|
295
|
-
'margin': None,
|
296
|
-
'swap': None,
|
297
|
-
'future': None,
|
298
|
-
'option': None,
|
299
|
-
'addMargin': None,
|
300
|
-
'cancelAllOrders': None,
|
301
|
-
'cancelOrder': True,
|
302
|
-
'cancelOrders': None,
|
303
|
-
'createDepositAddress': None,
|
304
|
-
'createLimitOrder': True,
|
305
|
-
'createMarketOrder': True,
|
306
|
-
'createOrder': True,
|
307
|
-
'createPostOnlyOrder': None,
|
308
|
-
'createReduceOnlyOrder': None,
|
309
|
-
'createStopOrder': None,
|
310
|
-
'createStopLimitOrder': None,
|
311
|
-
'createStopMarketOrder': None,
|
312
|
-
'editOrder': 'emulated',
|
313
|
-
'fetchAccounts': None,
|
314
|
-
'fetchBalance': True,
|
315
|
-
'fetchBidsAsks': None,
|
316
|
-
'fetchBorrowInterest': None,
|
317
|
-
'fetchBorrowRate': None,
|
318
|
-
'fetchBorrowRateHistory': None,
|
319
|
-
'fetchBorrowRatesPerSymbol': None,
|
320
|
-
'fetchBorrowRates': None,
|
321
|
-
'fetchCanceledOrders': None,
|
322
|
-
'fetchClosedOrder': None,
|
323
|
-
'fetchClosedOrders': None,
|
324
|
-
'fetchClosedOrdersWs': None,
|
325
|
-
'fetchConvertCurrencies': None,
|
326
|
-
'fetchConvertQuote': None,
|
327
|
-
'fetchConvertTrade': None,
|
328
|
-
'fetchConvertTradeHistory': None,
|
329
|
-
'fetchCrossBorrowRate': None,
|
330
|
-
'fetchCrossBorrowRates': None,
|
331
|
-
'fetchCurrencies': 'emulated',
|
332
|
-
'fetchCurrenciesWs': 'emulated',
|
333
|
-
'fetchDeposit': None,
|
334
|
-
'fetchDepositAddress': None,
|
335
|
-
'fetchDepositAddresses': None,
|
336
|
-
'fetchDepositAddressesByNetwork': None,
|
337
|
-
'fetchDeposits': None,
|
338
|
-
'fetchFundingHistory': None,
|
339
|
-
'fetchFundingRate': None,
|
340
|
-
'fetchFundingRateHistory': None,
|
341
|
-
'fetchFundingRates': None,
|
342
|
-
'fetchIndexOHLCV': None,
|
343
|
-
'fetchLastPrices': None,
|
344
|
-
'fetchL2OrderBook': True,
|
345
|
-
'fetchLedger': None,
|
346
|
-
'fetchLedgerEntry': None,
|
347
|
-
'fetchLeverageTiers': None,
|
348
|
-
'fetchMarketLeverageTiers': None,
|
349
|
-
'fetchMarkets': True,
|
350
|
-
'fetchMarkOHLCV': None,
|
351
|
-
'fetchMyTrades': None,
|
352
|
-
'fetchOHLCV': None,
|
353
|
-
'fetchOpenOrder': None,
|
354
|
-
'fetchOpenOrders': None,
|
355
|
-
'fetchOrder': None,
|
356
|
-
'fetchOrderBook': True,
|
357
|
-
'fetchOrderBooks': None,
|
358
|
-
'fetchOrders': None,
|
359
|
-
'fetchOrderTrades': None,
|
360
|
-
'fetchPermissions': None,
|
361
|
-
'fetchPosition': None,
|
362
|
-
'fetchPositions': None,
|
363
|
-
'fetchPositionsRisk': None,
|
364
|
-
'fetchPremiumIndexOHLCV': None,
|
365
|
-
'fetchStatus': None,
|
366
|
-
'fetchTicker': True,
|
367
|
-
'fetchTickers': None,
|
368
|
-
'fetchTime': None,
|
369
|
-
'fetchTrades': True,
|
370
|
-
'fetchTradingFee': None,
|
371
|
-
'fetchTradingFees': None,
|
372
|
-
'fetchTradingLimits': None,
|
373
|
-
'fetchTransactions': None,
|
374
|
-
'fetchTransfers': None,
|
375
|
-
'fetchWithdrawal': None,
|
376
|
-
'fetchWithdrawals': None,
|
377
|
-
'reduceMargin': None,
|
378
|
-
'setLeverage': None,
|
379
|
-
'setMargin': None,
|
380
|
-
'setMarginMode': None,
|
381
|
-
'setPositionMode': None,
|
382
|
-
'signIn': None,
|
383
|
-
'transfer': None,
|
384
|
-
'withdraw': None,
|
385
|
-
'watchOrderBook': None,
|
386
|
-
'watchOrders': None,
|
387
|
-
'watchMyTrades': None,
|
388
|
-
'watchTickers': None,
|
389
|
-
'watchTicker': None,
|
390
|
-
'watchTrades': None,
|
391
|
-
'watchTradesForSymbols': None,
|
392
|
-
'watchOrderBookForSymbols': None,
|
393
|
-
'watchOHLCVForSymbols': None,
|
394
|
-
'watchBalance': None,
|
395
|
-
'watchLiquidations': None,
|
396
|
-
'watchLiquidationsForSymbols': None,
|
397
|
-
'watchMyLiquidations': None,
|
398
|
-
'watchMyLiquidationsForSymbols': None,
|
399
|
-
'watchOHLCV': None,
|
400
|
-
}
|
301
|
+
has = {}
|
401
302
|
precisionMode = DECIMAL_PLACES
|
402
303
|
paddingMode = NO_PADDING
|
403
304
|
minFundingAddressLength = 1 # used in check_address
|
@@ -526,9 +427,6 @@ class Exchange(object):
|
|
526
427
|
def __str__(self):
|
527
428
|
return self.name
|
528
429
|
|
529
|
-
def describe(self):
|
530
|
-
return {}
|
531
|
-
|
532
430
|
def throttle(self, cost=None):
|
533
431
|
now = float(self.milliseconds())
|
534
432
|
elapsed = now - self.lastRestRequestTimestamp
|
@@ -1812,6 +1710,320 @@ class Exchange(object):
|
|
1812
1710
|
|
1813
1711
|
# METHODS BELOW THIS LINE ARE TRANSPILED FROM JAVASCRIPT TO PYTHON AND PHP
|
1814
1712
|
|
1713
|
+
def describe(self):
|
1714
|
+
return {
|
1715
|
+
'id': None,
|
1716
|
+
'name': None,
|
1717
|
+
'countries': None,
|
1718
|
+
'enableRateLimit': True,
|
1719
|
+
'rateLimit': 2000, # milliseconds = seconds * 1000
|
1720
|
+
'timeout': self.timeout, # milliseconds = seconds * 1000
|
1721
|
+
'certified': False, # if certified by the CCXT dev team
|
1722
|
+
'pro': False, # if it is integrated with CCXT Pro for WebSocket support
|
1723
|
+
'alias': False, # whether self exchange is an alias to another exchange
|
1724
|
+
'dex': False,
|
1725
|
+
'has': {
|
1726
|
+
'publicAPI': True,
|
1727
|
+
'privateAPI': True,
|
1728
|
+
'CORS': None,
|
1729
|
+
'sandbox': None,
|
1730
|
+
'spot': None,
|
1731
|
+
'margin': None,
|
1732
|
+
'swap': None,
|
1733
|
+
'future': None,
|
1734
|
+
'option': None,
|
1735
|
+
'addMargin': None,
|
1736
|
+
'borrowCrossMargin': None,
|
1737
|
+
'borrowIsolatedMargin': None,
|
1738
|
+
'borrowMargin': None,
|
1739
|
+
'cancelAllOrders': None,
|
1740
|
+
'cancelAllOrdersWs': None,
|
1741
|
+
'cancelOrder': True,
|
1742
|
+
'cancelOrderWs': None,
|
1743
|
+
'cancelOrders': None,
|
1744
|
+
'cancelOrdersWs': None,
|
1745
|
+
'closeAllPositions': None,
|
1746
|
+
'closePosition': None,
|
1747
|
+
'createDepositAddress': None,
|
1748
|
+
'createLimitBuyOrder': None,
|
1749
|
+
'createLimitBuyOrderWs': None,
|
1750
|
+
'createLimitOrder': True,
|
1751
|
+
'createLimitOrderWs': None,
|
1752
|
+
'createLimitSellOrder': None,
|
1753
|
+
'createLimitSellOrderWs': None,
|
1754
|
+
'createMarketBuyOrder': None,
|
1755
|
+
'createMarketBuyOrderWs': None,
|
1756
|
+
'createMarketBuyOrderWithCost': None,
|
1757
|
+
'createMarketBuyOrderWithCostWs': None,
|
1758
|
+
'createMarketOrder': True,
|
1759
|
+
'createMarketOrderWs': True,
|
1760
|
+
'createMarketOrderWithCost': None,
|
1761
|
+
'createMarketOrderWithCostWs': None,
|
1762
|
+
'createMarketSellOrder': None,
|
1763
|
+
'createMarketSellOrderWs': None,
|
1764
|
+
'createMarketSellOrderWithCost': None,
|
1765
|
+
'createMarketSellOrderWithCostWs': None,
|
1766
|
+
'createOrder': True,
|
1767
|
+
'createOrderWs': None,
|
1768
|
+
'createOrders': None,
|
1769
|
+
'createOrderWithTakeProfitAndStopLoss': None,
|
1770
|
+
'createOrderWithTakeProfitAndStopLossWs': None,
|
1771
|
+
'createPostOnlyOrder': None,
|
1772
|
+
'createPostOnlyOrderWs': None,
|
1773
|
+
'createReduceOnlyOrder': None,
|
1774
|
+
'createReduceOnlyOrderWs': None,
|
1775
|
+
'createStopLimitOrder': None,
|
1776
|
+
'createStopLimitOrderWs': None,
|
1777
|
+
'createStopLossOrder': None,
|
1778
|
+
'createStopLossOrderWs': None,
|
1779
|
+
'createStopMarketOrder': None,
|
1780
|
+
'createStopMarketOrderWs': None,
|
1781
|
+
'createStopOrder': None,
|
1782
|
+
'createStopOrderWs': None,
|
1783
|
+
'createTakeProfitOrder': None,
|
1784
|
+
'createTakeProfitOrderWs': None,
|
1785
|
+
'createTrailingAmountOrder': None,
|
1786
|
+
'createTrailingAmountOrderWs': None,
|
1787
|
+
'createTrailingPercentOrder': None,
|
1788
|
+
'createTrailingPercentOrderWs': None,
|
1789
|
+
'createTriggerOrder': None,
|
1790
|
+
'createTriggerOrderWs': None,
|
1791
|
+
'deposit': None,
|
1792
|
+
'editOrder': 'emulated',
|
1793
|
+
'editOrderWs': None,
|
1794
|
+
'fetchAccounts': None,
|
1795
|
+
'fetchBalance': True,
|
1796
|
+
'fetchBalanceWs': None,
|
1797
|
+
'fetchBidsAsks': None,
|
1798
|
+
'fetchBorrowInterest': None,
|
1799
|
+
'fetchBorrowRate': None,
|
1800
|
+
'fetchBorrowRateHistories': None,
|
1801
|
+
'fetchBorrowRateHistory': None,
|
1802
|
+
'fetchBorrowRates': None,
|
1803
|
+
'fetchBorrowRatesPerSymbol': None,
|
1804
|
+
'fetchCanceledAndClosedOrders': None,
|
1805
|
+
'fetchCanceledOrders': None,
|
1806
|
+
'fetchClosedOrder': None,
|
1807
|
+
'fetchClosedOrders': None,
|
1808
|
+
'fetchClosedOrdersWs': None,
|
1809
|
+
'fetchConvertCurrencies': None,
|
1810
|
+
'fetchConvertQuote': None,
|
1811
|
+
'fetchConvertTrade': None,
|
1812
|
+
'fetchConvertTradeHistory': None,
|
1813
|
+
'fetchCrossBorrowRate': None,
|
1814
|
+
'fetchCrossBorrowRates': None,
|
1815
|
+
'fetchCurrencies': 'emulated',
|
1816
|
+
'fetchCurrenciesWs': 'emulated',
|
1817
|
+
'fetchDeposit': None,
|
1818
|
+
'fetchDepositAddress': None,
|
1819
|
+
'fetchDepositAddresses': None,
|
1820
|
+
'fetchDepositAddressesByNetwork': None,
|
1821
|
+
'fetchDeposits': None,
|
1822
|
+
'fetchDepositsWithdrawals': None,
|
1823
|
+
'fetchDepositsWs': None,
|
1824
|
+
'fetchDepositWithdrawFee': None,
|
1825
|
+
'fetchDepositWithdrawFees': None,
|
1826
|
+
'fetchFundingHistory': None,
|
1827
|
+
'fetchFundingRate': None,
|
1828
|
+
'fetchFundingRateHistory': None,
|
1829
|
+
'fetchFundingRates': None,
|
1830
|
+
'fetchGreeks': None,
|
1831
|
+
'fetchIndexOHLCV': None,
|
1832
|
+
'fetchIsolatedBorrowRate': None,
|
1833
|
+
'fetchIsolatedBorrowRates': None,
|
1834
|
+
'fetchMarginAdjustmentHistory': None,
|
1835
|
+
'fetchIsolatedPositions': None,
|
1836
|
+
'fetchL2OrderBook': True,
|
1837
|
+
'fetchL3OrderBook': None,
|
1838
|
+
'fetchLastPrices': None,
|
1839
|
+
'fetchLedger': None,
|
1840
|
+
'fetchLedgerEntry': None,
|
1841
|
+
'fetchLeverage': None,
|
1842
|
+
'fetchLeverages': None,
|
1843
|
+
'fetchLeverageTiers': None,
|
1844
|
+
'fetchLiquidations': None,
|
1845
|
+
'fetchMarginMode': None,
|
1846
|
+
'fetchMarginModes': None,
|
1847
|
+
'fetchMarketLeverageTiers': None,
|
1848
|
+
'fetchMarkets': True,
|
1849
|
+
'fetchMarketsWs': None,
|
1850
|
+
'fetchMarkOHLCV': None,
|
1851
|
+
'fetchMyLiquidations': None,
|
1852
|
+
'fetchMySettlementHistory': None,
|
1853
|
+
'fetchMyTrades': None,
|
1854
|
+
'fetchMyTradesWs': None,
|
1855
|
+
'fetchOHLCV': None,
|
1856
|
+
'fetchOHLCVWs': None,
|
1857
|
+
'fetchOpenInterest': None,
|
1858
|
+
'fetchOpenInterestHistory': None,
|
1859
|
+
'fetchOpenOrder': None,
|
1860
|
+
'fetchOpenOrders': None,
|
1861
|
+
'fetchOpenOrdersWs': None,
|
1862
|
+
'fetchOption': None,
|
1863
|
+
'fetchOptionChain': None,
|
1864
|
+
'fetchOrder': None,
|
1865
|
+
'fetchOrderBook': True,
|
1866
|
+
'fetchOrderBooks': None,
|
1867
|
+
'fetchOrderBookWs': None,
|
1868
|
+
'fetchOrders': None,
|
1869
|
+
'fetchOrdersByStatus': None,
|
1870
|
+
'fetchOrdersWs': None,
|
1871
|
+
'fetchOrderTrades': None,
|
1872
|
+
'fetchOrderWs': None,
|
1873
|
+
'fetchPermissions': None,
|
1874
|
+
'fetchPosition': None,
|
1875
|
+
'fetchPositionHistory': None,
|
1876
|
+
'fetchPositionsHistory': None,
|
1877
|
+
'fetchPositionWs': None,
|
1878
|
+
'fetchPositionMode': None,
|
1879
|
+
'fetchPositions': None,
|
1880
|
+
'fetchPositionsWs': None,
|
1881
|
+
'fetchPositionsForSymbol': None,
|
1882
|
+
'fetchPositionsForSymbolWs': None,
|
1883
|
+
'fetchPositionsRisk': None,
|
1884
|
+
'fetchPremiumIndexOHLCV': None,
|
1885
|
+
'fetchSettlementHistory': None,
|
1886
|
+
'fetchStatus': None,
|
1887
|
+
'fetchTicker': True,
|
1888
|
+
'fetchTickerWs': None,
|
1889
|
+
'fetchTickers': None,
|
1890
|
+
'fetchTickersWs': None,
|
1891
|
+
'fetchTime': None,
|
1892
|
+
'fetchTrades': True,
|
1893
|
+
'fetchTradesWs': None,
|
1894
|
+
'fetchTradingFee': None,
|
1895
|
+
'fetchTradingFees': None,
|
1896
|
+
'fetchTradingFeesWs': None,
|
1897
|
+
'fetchTradingLimits': None,
|
1898
|
+
'fetchTransactionFee': None,
|
1899
|
+
'fetchTransactionFees': None,
|
1900
|
+
'fetchTransactions': None,
|
1901
|
+
'fetchTransfer': None,
|
1902
|
+
'fetchTransfers': None,
|
1903
|
+
'fetchUnderlyingAssets': None,
|
1904
|
+
'fetchVolatilityHistory': None,
|
1905
|
+
'fetchWithdrawAddresses': None,
|
1906
|
+
'fetchWithdrawal': None,
|
1907
|
+
'fetchWithdrawals': None,
|
1908
|
+
'fetchWithdrawalsWs': None,
|
1909
|
+
'fetchWithdrawalWhitelist': None,
|
1910
|
+
'reduceMargin': None,
|
1911
|
+
'repayCrossMargin': None,
|
1912
|
+
'repayIsolatedMargin': None,
|
1913
|
+
'setLeverage': None,
|
1914
|
+
'setMargin': None,
|
1915
|
+
'setMarginMode': None,
|
1916
|
+
'setPositionMode': None,
|
1917
|
+
'signIn': None,
|
1918
|
+
'transfer': None,
|
1919
|
+
'watchBalance': None,
|
1920
|
+
'watchMyTrades': None,
|
1921
|
+
'watchOHLCV': None,
|
1922
|
+
'watchOHLCVForSymbols': None,
|
1923
|
+
'watchOrderBook': None,
|
1924
|
+
'watchOrderBookForSymbols': None,
|
1925
|
+
'watchOrders': None,
|
1926
|
+
'watchOrdersForSymbols': None,
|
1927
|
+
'watchPosition': None,
|
1928
|
+
'watchPositions': None,
|
1929
|
+
'watchStatus': None,
|
1930
|
+
'watchTicker': None,
|
1931
|
+
'watchTickers': None,
|
1932
|
+
'watchTrades': None,
|
1933
|
+
'watchTradesForSymbols': None,
|
1934
|
+
'watchLiquidations': None,
|
1935
|
+
'watchLiquidationsForSymbols': None,
|
1936
|
+
'watchMyLiquidations': None,
|
1937
|
+
'watchMyLiquidationsForSymbols': None,
|
1938
|
+
'withdraw': None,
|
1939
|
+
'ws': None,
|
1940
|
+
},
|
1941
|
+
'urls': {
|
1942
|
+
'logo': None,
|
1943
|
+
'api': None,
|
1944
|
+
'www': None,
|
1945
|
+
'doc': None,
|
1946
|
+
'fees': None,
|
1947
|
+
},
|
1948
|
+
'api': None,
|
1949
|
+
'requiredCredentials': {
|
1950
|
+
'apiKey': True,
|
1951
|
+
'secret': True,
|
1952
|
+
'uid': False,
|
1953
|
+
'accountId': False,
|
1954
|
+
'login': False,
|
1955
|
+
'password': False,
|
1956
|
+
'twofa': False, # 2-factor authentication(one-time password key)
|
1957
|
+
'privateKey': False, # a "0x"-prefixed hexstring private key for a wallet
|
1958
|
+
'walletAddress': False, # the wallet address "0x"-prefixed hexstring
|
1959
|
+
'token': False, # reserved for HTTP auth in some cases
|
1960
|
+
},
|
1961
|
+
'markets': None, # to be filled manually or by fetchMarkets
|
1962
|
+
'currencies': {}, # to be filled manually or by fetchMarkets
|
1963
|
+
'timeframes': None, # redefine if the exchange has.fetchOHLCV
|
1964
|
+
'fees': {
|
1965
|
+
'trading': {
|
1966
|
+
'tierBased': None,
|
1967
|
+
'percentage': None,
|
1968
|
+
'taker': None,
|
1969
|
+
'maker': None,
|
1970
|
+
},
|
1971
|
+
'funding': {
|
1972
|
+
'tierBased': None,
|
1973
|
+
'percentage': None,
|
1974
|
+
'withdraw': {},
|
1975
|
+
'deposit': {},
|
1976
|
+
},
|
1977
|
+
},
|
1978
|
+
'status': {
|
1979
|
+
'status': 'ok',
|
1980
|
+
'updated': None,
|
1981
|
+
'eta': None,
|
1982
|
+
'url': None,
|
1983
|
+
},
|
1984
|
+
'exceptions': None,
|
1985
|
+
'httpExceptions': {
|
1986
|
+
'422': ExchangeError,
|
1987
|
+
'418': DDoSProtection,
|
1988
|
+
'429': RateLimitExceeded,
|
1989
|
+
'404': ExchangeNotAvailable,
|
1990
|
+
'409': ExchangeNotAvailable,
|
1991
|
+
'410': ExchangeNotAvailable,
|
1992
|
+
'451': ExchangeNotAvailable,
|
1993
|
+
'500': ExchangeNotAvailable,
|
1994
|
+
'501': ExchangeNotAvailable,
|
1995
|
+
'502': ExchangeNotAvailable,
|
1996
|
+
'520': ExchangeNotAvailable,
|
1997
|
+
'521': ExchangeNotAvailable,
|
1998
|
+
'522': ExchangeNotAvailable,
|
1999
|
+
'525': ExchangeNotAvailable,
|
2000
|
+
'526': ExchangeNotAvailable,
|
2001
|
+
'400': ExchangeNotAvailable,
|
2002
|
+
'403': ExchangeNotAvailable,
|
2003
|
+
'405': ExchangeNotAvailable,
|
2004
|
+
'503': ExchangeNotAvailable,
|
2005
|
+
'530': ExchangeNotAvailable,
|
2006
|
+
'408': RequestTimeout,
|
2007
|
+
'504': RequestTimeout,
|
2008
|
+
'401': AuthenticationError,
|
2009
|
+
'407': AuthenticationError,
|
2010
|
+
'511': AuthenticationError,
|
2011
|
+
},
|
2012
|
+
'commonCurrencies': {
|
2013
|
+
'XBT': 'BTC',
|
2014
|
+
'BCC': 'BCH',
|
2015
|
+
'BCHSV': 'BSV',
|
2016
|
+
},
|
2017
|
+
'precisionMode': TICK_SIZE,
|
2018
|
+
'paddingMode': NO_PADDING,
|
2019
|
+
'limits': {
|
2020
|
+
'leverage': {'min': None, 'max': None},
|
2021
|
+
'amount': {'min': None, 'max': None},
|
2022
|
+
'price': {'min': None, 'max': None},
|
2023
|
+
'cost': {'min': None, 'max': None},
|
2024
|
+
},
|
2025
|
+
}
|
2026
|
+
|
1815
2027
|
def safe_bool_n(self, dictionaryOrList, keys: List[IndexType], defaultValue: bool = None):
|
1816
2028
|
"""
|
1817
2029
|
* @ignore
|
ccxt/base/types.py
CHANGED
@@ -208,11 +208,12 @@ class Balances(Dict[str, Balance]):
|
|
208
208
|
|
209
209
|
|
210
210
|
class OrderBook(TypedDict):
|
211
|
-
asks: List[Num]
|
212
|
-
bids: List[Num]
|
211
|
+
asks: List[List[Num]]
|
212
|
+
bids: List[List[Num]]
|
213
213
|
datetime: Str
|
214
214
|
timestamp: Int
|
215
215
|
nonce: Int
|
216
|
+
symbol: Str
|
216
217
|
|
217
218
|
|
218
219
|
class Transaction(TypedDict):
|
@@ -492,13 +493,30 @@ class LeverageTier:
|
|
492
493
|
info: Dict[str, Any]
|
493
494
|
|
494
495
|
|
496
|
+
class LedgerEntry:
|
497
|
+
id: Str
|
498
|
+
info: Any
|
499
|
+
timestamp: Int
|
500
|
+
datetime: Str
|
501
|
+
direction: Str
|
502
|
+
account: Str
|
503
|
+
referenceId: Str
|
504
|
+
referenceAccount: Str
|
505
|
+
type: Str
|
506
|
+
currency: Str
|
507
|
+
amount: Str
|
508
|
+
before: float
|
509
|
+
after: float
|
510
|
+
status: Str
|
511
|
+
fee: Fee
|
512
|
+
|
513
|
+
|
495
514
|
FundingRates = Dict[Str, FundingRate]
|
496
515
|
LastPrices = Dict[Str, LastPrice]
|
497
516
|
Currencies = Dict[Str, CurrencyInterface]
|
498
517
|
TradingFees = Dict[Str, TradingFeeInterface]
|
499
518
|
IsolatedBorrowRates = Dict[Str, IsolatedBorrowRate]
|
500
519
|
CrossBorrowRates = Dict[Str, CrossBorrowRate]
|
501
|
-
TransferEntries = Dict[Str, TransferEntry]
|
502
520
|
LeverageTiers = Dict[Str, List[LeverageTier]]
|
503
521
|
|
504
522
|
Market = Optional[MarketInterface]
|
ccxt/binance.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.binance import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, Greeks, Int, IsolatedBorrowRate, IsolatedBorrowRates, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, Greeks, Int, IsolatedBorrowRate, IsolatedBorrowRates, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -7800,7 +7800,7 @@ class binance(Exchange, ImplicitAPI):
|
|
7800
7800
|
#
|
7801
7801
|
return self.parse_transfer(response, currency)
|
7802
7802
|
|
7803
|
-
def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) ->
|
7803
|
+
def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
7804
7804
|
"""
|
7805
7805
|
fetch a history of internal transfers made on an account
|
7806
7806
|
:see: https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer
|