ccxt 4.4.29__py2.py3-none-any.whl → 4.4.31__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/alpaca.py +1 -0
- ccxt/abstract/binance.py +9 -0
- ccxt/abstract/binancecoinm.py +9 -0
- ccxt/abstract/binanceus.py +9 -0
- ccxt/abstract/binanceusdm.py +9 -0
- ccxt/ace.py +36 -12
- ccxt/alpaca.py +113 -28
- ccxt/ascendex.py +65 -30
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +36 -12
- ccxt/async_support/alpaca.py +113 -28
- ccxt/async_support/ascendex.py +65 -30
- ccxt/async_support/base/exchange.py +3 -3
- ccxt/async_support/bigone.py +71 -27
- ccxt/async_support/binance.py +564 -323
- ccxt/async_support/bingx.py +208 -108
- ccxt/async_support/bit2c.py +34 -12
- ccxt/async_support/bitbank.py +42 -14
- ccxt/async_support/bitbns.py +29 -21
- ccxt/async_support/bitfinex.py +77 -33
- ccxt/async_support/bitfinex2.py +116 -44
- ccxt/async_support/bitflyer.py +54 -18
- ccxt/async_support/bitget.py +277 -145
- ccxt/async_support/bithumb.py +39 -14
- ccxt/async_support/bitmart.py +198 -132
- ccxt/async_support/bitmex.py +90 -30
- ccxt/async_support/bitopro.py +66 -22
- ccxt/async_support/bitrue.py +109 -57
- ccxt/async_support/bitso.py +55 -19
- ccxt/async_support/bitstamp.py +84 -36
- ccxt/async_support/bitteam.py +51 -17
- ccxt/async_support/bitvavo.py +57 -19
- ccxt/async_support/bl3p.py +26 -10
- ccxt/async_support/blockchaincom.py +63 -21
- ccxt/async_support/blofin.py +95 -38
- ccxt/async_support/btcalpha.py +48 -16
- ccxt/async_support/btcbox.py +27 -9
- ccxt/async_support/btcmarkets.py +57 -19
- ccxt/async_support/btcturk.py +36 -12
- ccxt/async_support/bybit.py +251 -95
- ccxt/async_support/cex.py +65 -22
- ccxt/async_support/coinbase.py +138 -56
- ccxt/async_support/coinbaseexchange.py +76 -28
- ccxt/async_support/coinbaseinternational.py +75 -27
- ccxt/async_support/coincatch.py +191 -97
- ccxt/async_support/coincheck.py +33 -11
- ccxt/async_support/coinex.py +212 -101
- ccxt/async_support/coinlist.py +87 -30
- ccxt/async_support/coinmate.py +55 -24
- ccxt/async_support/coinmetro.py +52 -18
- ccxt/async_support/coinone.py +27 -10
- ccxt/async_support/coinsph.py +73 -27
- ccxt/async_support/coinspot.py +25 -9
- ccxt/async_support/cryptocom.py +103 -38
- ccxt/async_support/currencycom.py +70 -23
- ccxt/async_support/delta.py +90 -30
- ccxt/async_support/deribit.py +138 -53
- ccxt/async_support/digifinex.py +114 -51
- ccxt/async_support/exmo.py +104 -45
- ccxt/async_support/gate.py +298 -155
- ccxt/async_support/gemini.py +57 -20
- ccxt/async_support/hashkey.py +151 -66
- ccxt/async_support/hitbtc.py +156 -73
- ccxt/async_support/hollaex.py +76 -25
- ccxt/async_support/htx.py +297 -240
- ccxt/async_support/huobijp.py +1 -0
- ccxt/async_support/hyperliquid.py +203 -42
- ccxt/async_support/idex.py +73 -24
- ccxt/async_support/independentreserve.py +12 -5
- ccxt/async_support/indodax.py +53 -16
- ccxt/async_support/kraken.py +107 -35
- ccxt/async_support/krakenfutures.py +88 -34
- ccxt/async_support/kucoin.py +211 -109
- ccxt/async_support/kucoinfutures.py +119 -42
- ccxt/async_support/kuna.py +80 -39
- ccxt/async_support/latoken.py +70 -33
- ccxt/async_support/lbank.py +90 -39
- ccxt/async_support/luno.py +54 -19
- ccxt/async_support/lykke.py +54 -19
- ccxt/async_support/mercado.py +1 -0
- ccxt/async_support/mexc.py +226 -108
- ccxt/async_support/ndax.py +58 -19
- ccxt/async_support/novadax.py +67 -22
- ccxt/async_support/oceanex.py +58 -19
- ccxt/async_support/okcoin.py +81 -38
- ccxt/async_support/okx.py +270 -109
- ccxt/async_support/onetrading.py +3 -1
- ccxt/async_support/oxfun.py +95 -36
- ccxt/async_support/p2b.py +49 -23
- ccxt/async_support/paradex.py +75 -27
- ccxt/async_support/paymium.py +31 -11
- ccxt/async_support/phemex.py +91 -41
- ccxt/async_support/poloniex.py +80 -30
- ccxt/async_support/poloniexfutures.py +72 -30
- ccxt/async_support/probit.py +64 -22
- ccxt/async_support/timex.py +58 -19
- ccxt/async_support/tokocrypto.py +63 -22
- ccxt/async_support/tradeogre.py +7 -2
- ccxt/async_support/upbit.py +72 -25
- ccxt/async_support/vertex.py +74 -28
- ccxt/async_support/wavesexchange.py +29 -8
- ccxt/async_support/wazirx.py +51 -17
- ccxt/async_support/whitebit.py +105 -41
- ccxt/async_support/woo.py +162 -65
- ccxt/async_support/woofipro.py +118 -49
- ccxt/async_support/xt.py +150 -73
- ccxt/async_support/yobit.py +49 -16
- ccxt/async_support/zaif.py +30 -10
- ccxt/async_support/zonda.py +46 -16
- ccxt/base/exchange.py +34 -34
- ccxt/base/types.py +1 -0
- ccxt/bigone.py +71 -27
- ccxt/binance.py +564 -323
- ccxt/bingx.py +208 -108
- ccxt/bit2c.py +34 -12
- ccxt/bitbank.py +42 -14
- ccxt/bitbns.py +29 -21
- ccxt/bitfinex.py +77 -33
- ccxt/bitfinex2.py +116 -44
- ccxt/bitflyer.py +54 -18
- ccxt/bitget.py +277 -145
- ccxt/bithumb.py +39 -14
- ccxt/bitmart.py +198 -132
- ccxt/bitmex.py +90 -30
- ccxt/bitopro.py +66 -22
- ccxt/bitrue.py +109 -57
- ccxt/bitso.py +55 -19
- ccxt/bitstamp.py +84 -36
- ccxt/bitteam.py +51 -17
- ccxt/bitvavo.py +57 -19
- ccxt/bl3p.py +26 -10
- ccxt/blockchaincom.py +63 -21
- ccxt/blofin.py +95 -38
- ccxt/btcalpha.py +48 -16
- ccxt/btcbox.py +27 -9
- ccxt/btcmarkets.py +57 -19
- ccxt/btcturk.py +36 -12
- ccxt/bybit.py +251 -95
- ccxt/cex.py +65 -22
- ccxt/coinbase.py +138 -56
- ccxt/coinbaseexchange.py +76 -28
- ccxt/coinbaseinternational.py +75 -27
- ccxt/coincatch.py +191 -97
- ccxt/coincheck.py +33 -11
- ccxt/coinex.py +212 -101
- ccxt/coinlist.py +87 -30
- ccxt/coinmate.py +55 -24
- ccxt/coinmetro.py +52 -18
- ccxt/coinone.py +27 -10
- ccxt/coinsph.py +73 -27
- ccxt/coinspot.py +25 -9
- ccxt/cryptocom.py +103 -38
- ccxt/currencycom.py +70 -23
- ccxt/delta.py +90 -30
- ccxt/deribit.py +138 -53
- ccxt/digifinex.py +114 -51
- ccxt/exmo.py +104 -45
- ccxt/gate.py +298 -155
- ccxt/gemini.py +57 -20
- ccxt/hashkey.py +151 -66
- ccxt/hitbtc.py +156 -73
- ccxt/hollaex.py +76 -25
- ccxt/htx.py +297 -240
- ccxt/huobijp.py +1 -0
- ccxt/hyperliquid.py +203 -42
- ccxt/idex.py +73 -24
- ccxt/independentreserve.py +12 -5
- ccxt/indodax.py +53 -16
- ccxt/kraken.py +107 -35
- ccxt/krakenfutures.py +88 -34
- ccxt/kucoin.py +211 -109
- ccxt/kucoinfutures.py +119 -42
- ccxt/kuna.py +80 -39
- ccxt/latoken.py +70 -33
- ccxt/lbank.py +90 -39
- ccxt/luno.py +54 -19
- ccxt/lykke.py +54 -19
- ccxt/mercado.py +1 -0
- ccxt/mexc.py +226 -108
- ccxt/ndax.py +58 -19
- ccxt/novadax.py +67 -22
- ccxt/oceanex.py +58 -19
- ccxt/okcoin.py +81 -38
- ccxt/okx.py +270 -109
- ccxt/onetrading.py +3 -1
- ccxt/oxfun.py +95 -36
- ccxt/p2b.py +49 -23
- ccxt/paradex.py +75 -27
- ccxt/paymium.py +31 -11
- ccxt/phemex.py +91 -41
- ccxt/poloniex.py +80 -30
- ccxt/poloniexfutures.py +72 -30
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +15 -5
- ccxt/pro/ascendex.py +18 -6
- ccxt/pro/binance.py +200 -119
- ccxt/pro/bingx.py +44 -24
- ccxt/pro/bitfinex.py +13 -5
- ccxt/pro/bitget.py +75 -36
- ccxt/pro/bithumb.py +12 -4
- ccxt/pro/bitmart.py +44 -20
- ccxt/pro/bitmex.py +42 -14
- ccxt/pro/bitopro.py +15 -5
- ccxt/pro/bitrue.py +7 -3
- ccxt/pro/bitvavo.py +51 -17
- ccxt/pro/blockchaincom.py +18 -6
- ccxt/pro/blofin.py +38 -13
- ccxt/pro/bybit.py +100 -42
- ccxt/pro/cex.py +48 -16
- ccxt/pro/coinbase.py +32 -12
- ccxt/pro/coinbaseexchange.py +1 -1
- ccxt/pro/coinbaseinternational.py +34 -14
- ccxt/pro/coincatch.py +54 -19
- ccxt/pro/coincheck.py +6 -2
- ccxt/pro/coinex.py +40 -20
- ccxt/pro/coinone.py +9 -3
- ccxt/pro/cryptocom.py +70 -26
- ccxt/pro/deribit.py +36 -12
- ccxt/pro/exmo.py +10 -4
- ccxt/pro/gate.py +64 -30
- ccxt/pro/gemini.py +21 -7
- ccxt/pro/hashkey.py +26 -8
- ccxt/pro/hitbtc.py +61 -37
- ccxt/pro/hollaex.py +15 -5
- ccxt/pro/htx.py +39 -21
- ccxt/pro/hyperliquid.py +41 -14
- ccxt/pro/kraken.py +49 -17
- ccxt/pro/krakenfutures.py +47 -24
- ccxt/pro/kucoin.py +60 -31
- ccxt/pro/kucoinfutures.py +41 -19
- ccxt/pro/lbank.py +27 -9
- ccxt/pro/luno.py +3 -1
- ccxt/pro/mexc.py +35 -17
- ccxt/pro/ndax.py +12 -4
- ccxt/pro/okcoin.py +18 -6
- ccxt/pro/okx.py +76 -28
- ccxt/pro/onetrading.py +21 -7
- ccxt/pro/oxfun.py +54 -20
- ccxt/pro/p2b.py +23 -11
- ccxt/pro/paradex.py +12 -4
- ccxt/pro/phemex.py +31 -19
- ccxt/pro/poloniex.py +50 -22
- ccxt/pro/poloniexfutures.py +17 -7
- ccxt/pro/probit.py +18 -6
- ccxt/pro/upbit.py +25 -9
- ccxt/pro/vertex.py +20 -6
- ccxt/pro/wazirx.py +21 -7
- ccxt/pro/whitebit.py +25 -9
- ccxt/pro/woo.py +32 -12
- ccxt/pro/woofipro.py +35 -13
- ccxt/pro/xt.py +46 -26
- ccxt/probit.py +64 -22
- ccxt/test/tests_helpers.py +2 -2
- ccxt/timex.py +58 -19
- ccxt/tokocrypto.py +63 -22
- ccxt/tradeogre.py +7 -2
- ccxt/upbit.py +72 -25
- ccxt/vertex.py +74 -28
- ccxt/wavesexchange.py +29 -8
- ccxt/wazirx.py +51 -17
- ccxt/whitebit.py +105 -41
- ccxt/woo.py +162 -65
- ccxt/woofipro.py +118 -49
- ccxt/xt.py +150 -73
- ccxt/yobit.py +49 -16
- ccxt/zaif.py +30 -10
- ccxt/zonda.py +46 -16
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/RECORD +273 -273
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/top_level.txt +0 -0
ccxt/async_support/binance.py
CHANGED
@@ -132,7 +132,7 @@ class binance(Exchange, ImplicitAPI):
|
|
132
132
|
'fetchLongShortRatio': False,
|
133
133
|
'fetchLongShortRatioHistory': True,
|
134
134
|
'fetchMarginAdjustmentHistory': True,
|
135
|
-
'fetchMarginMode':
|
135
|
+
'fetchMarginMode': True,
|
136
136
|
'fetchMarginModes': True,
|
137
137
|
'fetchMarketLeverageTiers': 'emulated',
|
138
138
|
'fetchMarkets': True,
|
@@ -417,6 +417,12 @@ class binance(Exchange, ImplicitAPI):
|
|
417
417
|
'eth-staking/wbeth/history/wrapHistory': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
418
418
|
'eth-staking/wbeth/history/unwrapHistory': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
419
419
|
'eth-staking/eth/history/wbethRewardsHistory': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
420
|
+
'sol-staking/sol/history/stakingHistory': 15,
|
421
|
+
'sol-staking/sol/history/redemptionHistory': 15,
|
422
|
+
'sol-staking/sol/history/bnsolRewardsHistory': 15,
|
423
|
+
'sol-staking/sol/history/rateHistory': 15,
|
424
|
+
'sol-staking/account': 15,
|
425
|
+
'sol-staking/sol/quota': 15,
|
420
426
|
# mining endpoints
|
421
427
|
'mining/pub/algoList': 0.1,
|
422
428
|
'mining/pub/coinList': 0.1,
|
@@ -628,6 +634,8 @@ class binance(Exchange, ImplicitAPI):
|
|
628
634
|
'eth-staking/eth/stake': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
629
635
|
'eth-staking/eth/redeem': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
630
636
|
'eth-staking/wbeth/wrap': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
637
|
+
'sol-staking/sol/stake': 15,
|
638
|
+
'sol-staking/sol/redeem': 15,
|
631
639
|
# mining endpoints
|
632
640
|
'mining/hash-transfer/config': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
|
633
641
|
'mining/hash-transfer/config/cancel': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
|
@@ -662,6 +670,7 @@ class binance(Exchange, ImplicitAPI):
|
|
662
670
|
'simple-earn/locked/redeem': 0.1,
|
663
671
|
'simple-earn/flexible/setAutoSubscribe': 15,
|
664
672
|
'simple-earn/locked/setAutoSubscribe': 15,
|
673
|
+
'simple-earn/locked/setRedeemOption': 5,
|
665
674
|
# convert
|
666
675
|
'dci/product/subscribe': 0.1,
|
667
676
|
'dci/product/auto_compound/edit': 0.1,
|
@@ -2659,9 +2668,11 @@ class binance(Exchange, ImplicitAPI):
|
|
2659
2668
|
async def fetch_time(self, params={}):
|
2660
2669
|
"""
|
2661
2670
|
fetches the current integer timestamp in milliseconds from the exchange server
|
2662
|
-
|
2663
|
-
|
2664
|
-
|
2671
|
+
|
2672
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#check-server-time # spot
|
2673
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time # swap
|
2674
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Check-Server-time # future
|
2675
|
+
|
2665
2676
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2666
2677
|
:param str [params.subType]: "linear" or "inverse"
|
2667
2678
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
@@ -2683,8 +2694,10 @@ class binance(Exchange, ImplicitAPI):
|
|
2683
2694
|
async def fetch_currencies(self, params={}) -> Currencies:
|
2684
2695
|
"""
|
2685
2696
|
fetches all available currencies on an exchange
|
2686
|
-
|
2687
|
-
|
2697
|
+
|
2698
|
+
https://developers.binance.com/docs/wallet/capital/all-coins-info
|
2699
|
+
https://developers.binance.com/docs/margin_trading/market-data/Get-All-Margin-Assets
|
2700
|
+
|
2688
2701
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2689
2702
|
:returns dict: an associative dictionary of currencies
|
2690
2703
|
"""
|
@@ -2891,12 +2904,14 @@ class binance(Exchange, ImplicitAPI):
|
|
2891
2904
|
async def fetch_markets(self, params={}) -> List[Market]:
|
2892
2905
|
"""
|
2893
2906
|
retrieves data on all markets for binance
|
2894
|
-
|
2895
|
-
|
2896
|
-
|
2897
|
-
|
2898
|
-
|
2899
|
-
|
2907
|
+
|
2908
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#exchange-information # spot
|
2909
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information # swap
|
2910
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Exchange-Information # future
|
2911
|
+
https://developers.binance.com/docs/derivatives/option/market-data/Exchange-Information # option
|
2912
|
+
https://developers.binance.com/docs/margin_trading/market-data/Get-All-Cross-Margin-Pairs # cross margin
|
2913
|
+
https://developers.binance.com/docs/margin_trading/market-data/Get-All-Isolated-Margin-Symbol # isolated margin
|
2914
|
+
|
2900
2915
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2901
2916
|
:returns dict[]: an array of objects representing market data
|
2902
2917
|
"""
|
@@ -3444,14 +3459,16 @@ class binance(Exchange, ImplicitAPI):
|
|
3444
3459
|
async def fetch_balance(self, params={}) -> Balances:
|
3445
3460
|
"""
|
3446
3461
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
3447
|
-
|
3448
|
-
|
3449
|
-
|
3450
|
-
|
3451
|
-
|
3452
|
-
|
3453
|
-
|
3454
|
-
|
3462
|
+
|
3463
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-information-user_data # spot
|
3464
|
+
https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details # cross margin
|
3465
|
+
https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info # isolated margin
|
3466
|
+
https://developers.binance.com/docs/wallet/asset/funding-wallet # funding
|
3467
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V2 # swap
|
3468
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Futures-Account-Balance # future
|
3469
|
+
https://developers.binance.com/docs/derivatives/option/account/Option-Account-Information # option
|
3470
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Account-Balance # portfolio margin
|
3471
|
+
|
3455
3472
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3456
3473
|
:param str [params.type]: 'future', 'delivery', 'savings', 'funding', or 'spot' or 'papi'
|
3457
3474
|
:param str [params.marginMode]: 'cross' or 'isolated', for margin trading, uses self.options.defaultMarginMode if not passed, defaults to None/None/None
|
@@ -3700,10 +3717,12 @@ class binance(Exchange, ImplicitAPI):
|
|
3700
3717
|
async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
3701
3718
|
"""
|
3702
3719
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
3703
|
-
|
3704
|
-
|
3705
|
-
|
3706
|
-
|
3720
|
+
|
3721
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#order-book # spot
|
3722
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Order-Book # swap
|
3723
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Order-Book # future
|
3724
|
+
https://developers.binance.com/docs/derivatives/option/market-data/Order-Book # option
|
3725
|
+
|
3707
3726
|
:param str symbol: unified symbol of the market to fetch the order book for
|
3708
3727
|
:param int [limit]: the maximum amount of order book entries to return
|
3709
3728
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -3930,7 +3949,9 @@ class binance(Exchange, ImplicitAPI):
|
|
3930
3949
|
async def fetch_status(self, params={}):
|
3931
3950
|
"""
|
3932
3951
|
the latest known information on the availability of the exchange API
|
3933
|
-
|
3952
|
+
|
3953
|
+
https://developers.binance.com/docs/wallet/others/system-status
|
3954
|
+
|
3934
3955
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3935
3956
|
:returns dict: a `status structure <https://docs.ccxt.com/#/?id=exchange-status-structure>`
|
3936
3957
|
"""
|
@@ -3953,11 +3974,13 @@ class binance(Exchange, ImplicitAPI):
|
|
3953
3974
|
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
3954
3975
|
"""
|
3955
3976
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
3956
|
-
|
3957
|
-
|
3958
|
-
|
3959
|
-
|
3960
|
-
|
3977
|
+
|
3978
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics # spot
|
3979
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#rolling-window-price-change-statistics # spot
|
3980
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics # swap
|
3981
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics # future
|
3982
|
+
https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics # option
|
3983
|
+
|
3961
3984
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
3962
3985
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3963
3986
|
:param boolean [params.rolling]:(spot only) default False, if True, uses the rolling 24 hour ticker endpoint /api/v3/ticker
|
@@ -3990,9 +4013,11 @@ class binance(Exchange, ImplicitAPI):
|
|
3990
4013
|
async def fetch_bids_asks(self, symbols: Strings = None, params={}):
|
3991
4014
|
"""
|
3992
4015
|
fetches the bid and ask price and volume for multiple markets
|
3993
|
-
|
3994
|
-
|
3995
|
-
|
4016
|
+
|
4017
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-order-book-ticker # spot
|
4018
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker # swap
|
4019
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Order-Book-Ticker # future
|
4020
|
+
|
3996
4021
|
:param str[]|None symbols: unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
3997
4022
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3998
4023
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -4022,9 +4047,11 @@ class binance(Exchange, ImplicitAPI):
|
|
4022
4047
|
async def fetch_last_prices(self, symbols: Strings = None, params={}):
|
4023
4048
|
"""
|
4024
4049
|
fetches the last price for multiple markets
|
4025
|
-
|
4026
|
-
|
4027
|
-
|
4050
|
+
|
4051
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-price-ticker # spot
|
4052
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker # swap
|
4053
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Price-Ticker # future
|
4054
|
+
|
4028
4055
|
:param str[]|None symbols: unified symbols of the markets to fetch the last prices
|
4029
4056
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4030
4057
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -4121,10 +4148,12 @@ class binance(Exchange, ImplicitAPI):
|
|
4121
4148
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
4122
4149
|
"""
|
4123
4150
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
4124
|
-
|
4125
|
-
|
4126
|
-
|
4127
|
-
|
4151
|
+
|
4152
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics # spot
|
4153
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics # swap
|
4154
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics # future
|
4155
|
+
https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics # option
|
4156
|
+
|
4128
4157
|
:param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
4129
4158
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4130
4159
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -4157,8 +4186,10 @@ class binance(Exchange, ImplicitAPI):
|
|
4157
4186
|
async def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
|
4158
4187
|
"""
|
4159
4188
|
fetches mark price for the market
|
4160
|
-
|
4161
|
-
|
4189
|
+
|
4190
|
+
https://binance-docs.github.io/apidocs/futures/en/#mark-price
|
4191
|
+
https://binance-docs.github.io/apidocs/delivery/en/#index-price-and-mark-price
|
4192
|
+
|
4162
4193
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
4163
4194
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4164
4195
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -4187,8 +4218,10 @@ class binance(Exchange, ImplicitAPI):
|
|
4187
4218
|
async def fetch_mark_prices(self, symbols: Strings = None, params={}) -> Tickers:
|
4188
4219
|
"""
|
4189
4220
|
fetches mark prices for multiple markets
|
4190
|
-
|
4191
|
-
|
4221
|
+
|
4222
|
+
https://binance-docs.github.io/apidocs/futures/en/#mark-price
|
4223
|
+
https://binance-docs.github.io/apidocs/delivery/en/#index-price-and-mark-price
|
4224
|
+
|
4192
4225
|
:param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
4193
4226
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4194
4227
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -4276,16 +4309,18 @@ class binance(Exchange, ImplicitAPI):
|
|
4276
4309
|
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
4277
4310
|
"""
|
4278
4311
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
4279
|
-
|
4280
|
-
|
4281
|
-
|
4282
|
-
|
4283
|
-
|
4284
|
-
|
4285
|
-
|
4286
|
-
|
4287
|
-
|
4288
|
-
|
4312
|
+
|
4313
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#klinecandlestick-data
|
4314
|
+
https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
|
4315
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
|
4316
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
|
4317
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
|
4318
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data
|
4319
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Kline-Candlestick-Data
|
4320
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Index-Price-Kline-Candlestick-Data
|
4321
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Mark-Price-Kline-Candlestick-Data
|
4322
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Premium-Index-Kline-Data
|
4323
|
+
|
4289
4324
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
4290
4325
|
:param str timeframe: the length of time each candle represents
|
4291
4326
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -4649,19 +4684,23 @@ class binance(Exchange, ImplicitAPI):
|
|
4649
4684
|
async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
4650
4685
|
"""
|
4651
4686
|
get the list of most recent trades for a particular symbol
|
4652
|
-
|
4653
|
-
|
4654
|
-
|
4655
|
-
|
4656
|
-
|
4657
|
-
|
4658
|
-
|
4659
|
-
|
4660
|
-
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4687
|
+
Default fetchTradesMethod
|
4688
|
+
|
4689
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#compressedaggregate-trades-list # publicGetAggTrades(spot)
|
4690
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List # fapiPublicGetAggTrades(swap)
|
4691
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Compressed-Aggregate-Trades-List # dapiPublicGetAggTrades(future)
|
4692
|
+
https://developers.binance.com/docs/derivatives/option/market-data/Recent-Trades-List # eapiPublicGetTrades(option)
|
4693
|
+
|
4694
|
+
Other fetchTradesMethod
|
4695
|
+
|
4696
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#recent-trades-list # publicGetTrades(spot)
|
4697
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List # fapiPublicGetTrades(swap)
|
4698
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Recent-Trades-List # dapiPublicGetTrades(future)
|
4699
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#old-trade-lookup # publicGetHistoricalTrades(spot)
|
4700
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup # fapiPublicGetHistoricalTrades(swap)
|
4701
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Old-Trades-Lookup # dapiPublicGetHistoricalTrades(future)
|
4702
|
+
https://developers.binance.com/docs/derivatives/option/market-data/Old-Trades-Lookup # eapiPublicGetHistoricalTrades(option)
|
4703
|
+
|
4665
4704
|
:param str symbol: unified symbol of the market to fetch trades for
|
4666
4705
|
:param int [since]: only used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades'
|
4667
4706
|
:param int [limit]: default 500, max 1000
|
@@ -4669,8 +4708,8 @@ class binance(Exchange, ImplicitAPI):
|
|
4669
4708
|
:param int [params.until]: only used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades'
|
4670
4709
|
:param int [params.fetchTradesMethod]: 'publicGetAggTrades'(spot default), 'fapiPublicGetAggTrades'(swap default), 'dapiPublicGetAggTrades'(future default), 'eapiPublicGetTrades'(option default), 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', 'publicGetHistoricalTrades', 'fapiPublicGetHistoricalTrades', 'dapiPublicGetHistoricalTrades', 'eapiPublicGetHistoricalTrades'
|
4671
4710
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
4672
|
-
|
4673
|
-
|
4711
|
+
|
4712
|
+
EXCHANGE SPECIFIC PARAMETERS
|
4674
4713
|
:param int [params.fromId]: trade id to fetch from, default gets most recent trades, not used when fetchTradesMethod is 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', or 'eapiPublicGetTrades'
|
4675
4714
|
:returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=public-trades>`
|
4676
4715
|
"""
|
@@ -4781,17 +4820,19 @@ class binance(Exchange, ImplicitAPI):
|
|
4781
4820
|
|
4782
4821
|
async def edit_spot_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
4783
4822
|
"""
|
4784
|
-
|
4823
|
+
@ignore
|
4785
4824
|
edit a trade order
|
4786
|
-
|
4825
|
+
|
4826
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
|
4827
|
+
|
4787
4828
|
:param str id: cancel order id
|
4788
4829
|
:param str symbol: unified symbol of the market to create an order in
|
4789
4830
|
:param str type: 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
4790
4831
|
:param str side: 'buy' or 'sell'
|
4791
4832
|
:param float amount: how much of currency you want to trade in units of base currency
|
4792
4833
|
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
4793
|
-
:param str [params.marginMode]: 'cross' or 'isolated', for spot margin trading
|
4794
4834
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4835
|
+
:param str [params.marginMode]: 'cross' or 'isolated', for spot margin trading
|
4795
4836
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
4796
4837
|
"""
|
4797
4838
|
await self.load_markets()
|
@@ -4844,7 +4885,7 @@ class binance(Exchange, ImplicitAPI):
|
|
4844
4885
|
|
4845
4886
|
def edit_spot_order_request(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
4846
4887
|
"""
|
4847
|
-
|
4888
|
+
@ignore
|
4848
4889
|
helper function to build request for editSpotOrder
|
4849
4890
|
:param str id: order id to be edited
|
4850
4891
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -4968,8 +5009,10 @@ class binance(Exchange, ImplicitAPI):
|
|
4968
5009
|
async def edit_contract_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
4969
5010
|
"""
|
4970
5011
|
edit a trade order
|
4971
|
-
|
4972
|
-
|
5012
|
+
|
5013
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
|
5014
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
|
5015
|
+
|
4973
5016
|
:param str id: cancel order id
|
4974
5017
|
:param str symbol: unified symbol of the market to create an order in
|
4975
5018
|
:param str type: 'market' or 'limit'
|
@@ -5019,9 +5062,11 @@ class binance(Exchange, ImplicitAPI):
|
|
5019
5062
|
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
|
5020
5063
|
"""
|
5021
5064
|
edit a trade order
|
5022
|
-
|
5023
|
-
|
5024
|
-
|
5065
|
+
|
5066
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
|
5067
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
|
5068
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
|
5069
|
+
|
5025
5070
|
:param str id: cancel order id
|
5026
5071
|
:param str symbol: unified symbol of the market to create an order in
|
5027
5072
|
:param str type: 'market' or 'limit'
|
@@ -5615,10 +5660,13 @@ class binance(Exchange, ImplicitAPI):
|
|
5615
5660
|
async def create_orders(self, orders: List[OrderRequest], params={}):
|
5616
5661
|
"""
|
5617
5662
|
*contract only* create a list of trade orders
|
5618
|
-
|
5619
|
-
|
5620
|
-
|
5663
|
+
|
5664
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Place-Multiple-Orders
|
5665
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders
|
5666
|
+
https://developers.binance.com/docs/derivatives/option/trade/Place-Multiple-Orders
|
5667
|
+
|
5621
5668
|
:param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
5669
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5622
5670
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
5623
5671
|
"""
|
5624
5672
|
await self.load_markets()
|
@@ -5689,18 +5737,20 @@ class binance(Exchange, ImplicitAPI):
|
|
5689
5737
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
5690
5738
|
"""
|
5691
5739
|
create a trade order
|
5692
|
-
|
5693
|
-
|
5694
|
-
|
5695
|
-
|
5696
|
-
|
5697
|
-
|
5698
|
-
|
5699
|
-
|
5700
|
-
|
5701
|
-
|
5702
|
-
|
5703
|
-
|
5740
|
+
|
5741
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
5742
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-trade
|
5743
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order
|
5744
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/New-Order
|
5745
|
+
https://developers.binance.com/docs/derivatives/option/trade/New-Order
|
5746
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#sor
|
5747
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-using-sor-trade
|
5748
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Order
|
5749
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Order
|
5750
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-Margin-Order
|
5751
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Conditional-Order
|
5752
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Conditional-Order
|
5753
|
+
|
5704
5754
|
:param str symbol: unified symbol of the market to create an order in
|
5705
5755
|
:param str type: 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
5706
5756
|
:param str side: 'buy' or 'sell'
|
@@ -5781,7 +5831,7 @@ class binance(Exchange, ImplicitAPI):
|
|
5781
5831
|
|
5782
5832
|
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
5783
5833
|
"""
|
5784
|
-
|
5834
|
+
@ignore
|
5785
5835
|
helper function to build the request
|
5786
5836
|
:param str symbol: unified symbol of the market to create an order in
|
5787
5837
|
:param str type: 'market' or 'limit'
|
@@ -6030,7 +6080,9 @@ class binance(Exchange, ImplicitAPI):
|
|
6030
6080
|
async def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={}):
|
6031
6081
|
"""
|
6032
6082
|
create a market order by providing the symbol, side and cost
|
6033
|
-
|
6083
|
+
|
6084
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
6085
|
+
|
6034
6086
|
:param str symbol: unified symbol of the market to create an order in
|
6035
6087
|
:param str side: 'buy' or 'sell'
|
6036
6088
|
:param float cost: how much you want to trade in units of the quote currency
|
@@ -6047,7 +6099,9 @@ class binance(Exchange, ImplicitAPI):
|
|
6047
6099
|
async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
6048
6100
|
"""
|
6049
6101
|
create a market buy order by providing the symbol and cost
|
6050
|
-
|
6102
|
+
|
6103
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
6104
|
+
|
6051
6105
|
:param str symbol: unified symbol of the market to create an order in
|
6052
6106
|
:param float cost: how much you want to trade in units of the quote currency
|
6053
6107
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6063,7 +6117,9 @@ class binance(Exchange, ImplicitAPI):
|
|
6063
6117
|
async def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
|
6064
6118
|
"""
|
6065
6119
|
create a market sell order by providing the symbol and cost
|
6066
|
-
|
6120
|
+
|
6121
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
6122
|
+
|
6067
6123
|
:param str symbol: unified symbol of the market to create an order in
|
6068
6124
|
:param float cost: how much you want to trade in units of the quote currency
|
6069
6125
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6079,13 +6135,15 @@ class binance(Exchange, ImplicitAPI):
|
|
6079
6135
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
6080
6136
|
"""
|
6081
6137
|
fetches information on an order made by the user
|
6082
|
-
|
6083
|
-
|
6084
|
-
|
6085
|
-
|
6086
|
-
|
6087
|
-
|
6088
|
-
|
6138
|
+
|
6139
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-order-user_data
|
6140
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Order
|
6141
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Query-Order
|
6142
|
+
https://developers.binance.com/docs/derivatives/option/trade/Query-Single-Order
|
6143
|
+
https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Order
|
6144
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Order
|
6145
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-CM-Order
|
6146
|
+
|
6089
6147
|
:param str id: the order id
|
6090
6148
|
:param str symbol: unified symbol of the market the order was made in
|
6091
6149
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6142,15 +6200,17 @@ class binance(Exchange, ImplicitAPI):
|
|
6142
6200
|
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
6143
6201
|
"""
|
6144
6202
|
fetches information on multiple orders made by the user
|
6145
|
-
|
6146
|
-
|
6147
|
-
|
6148
|
-
|
6149
|
-
|
6150
|
-
|
6151
|
-
|
6152
|
-
|
6153
|
-
|
6203
|
+
|
6204
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
6205
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
6206
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
6207
|
+
https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
6208
|
+
https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
6209
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
6210
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
6211
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
6212
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
6213
|
+
|
6154
6214
|
:param str symbol: unified market symbol of the market orders were made in
|
6155
6215
|
:param int [since]: the earliest time in ms to fetch orders for
|
6156
6216
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -6399,15 +6459,17 @@ class binance(Exchange, ImplicitAPI):
|
|
6399
6459
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
6400
6460
|
"""
|
6401
6461
|
fetch all unfilled currently open orders
|
6402
|
-
|
6403
|
-
|
6404
|
-
|
6405
|
-
|
6406
|
-
|
6407
|
-
|
6408
|
-
|
6409
|
-
|
6410
|
-
|
6462
|
+
|
6463
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#current-open-orders-user_data
|
6464
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders
|
6465
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Current-All-Open-Orders
|
6466
|
+
https://developers.binance.com/docs/derivatives/option/trade/Query-Current-Open-Option-Orders
|
6467
|
+
https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-Orders
|
6468
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Orders
|
6469
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Conditional-Orders
|
6470
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Orders
|
6471
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Conditional-Orders
|
6472
|
+
|
6411
6473
|
:param str symbol: unified market symbol
|
6412
6474
|
:param int [since]: the earliest time in ms to fetch open orders for
|
6413
6475
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -6480,12 +6542,14 @@ class binance(Exchange, ImplicitAPI):
|
|
6480
6542
|
async def fetch_open_order(self, id: str, symbol: Str = None, params={}):
|
6481
6543
|
"""
|
6482
6544
|
fetch an open order by the id
|
6483
|
-
|
6484
|
-
|
6485
|
-
|
6486
|
-
|
6487
|
-
|
6488
|
-
|
6545
|
+
|
6546
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order
|
6547
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Query-Current-Open-Order
|
6548
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Order
|
6549
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Conditional-Order
|
6550
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Order
|
6551
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Conditional-Order
|
6552
|
+
|
6489
6553
|
:param str id: order id
|
6490
6554
|
:param str symbol: unified market symbol
|
6491
6555
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6681,15 +6745,17 @@ class binance(Exchange, ImplicitAPI):
|
|
6681
6745
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
6682
6746
|
"""
|
6683
6747
|
fetches information on multiple closed orders made by the user
|
6684
|
-
|
6685
|
-
|
6686
|
-
|
6687
|
-
|
6688
|
-
|
6689
|
-
|
6690
|
-
|
6691
|
-
|
6692
|
-
|
6748
|
+
|
6749
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
6750
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
6751
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
6752
|
+
https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
6753
|
+
https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
6754
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
6755
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
6756
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
6757
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
6758
|
+
|
6693
6759
|
:param str symbol: unified market symbol of the market orders were made in
|
6694
6760
|
:param int [since]: the earliest time in ms to fetch orders for
|
6695
6761
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -6708,15 +6774,17 @@ class binance(Exchange, ImplicitAPI):
|
|
6708
6774
|
async def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6709
6775
|
"""
|
6710
6776
|
fetches information on multiple canceled orders made by the user
|
6711
|
-
|
6712
|
-
|
6713
|
-
|
6714
|
-
|
6715
|
-
|
6716
|
-
|
6717
|
-
|
6718
|
-
|
6719
|
-
|
6777
|
+
|
6778
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
6779
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
6780
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
6781
|
+
https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
6782
|
+
https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
6783
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
6784
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
6785
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
6786
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
6787
|
+
|
6720
6788
|
:param str symbol: unified market symbol of the market the orders were made in
|
6721
6789
|
:param int [since]: the earliest time in ms to fetch orders for
|
6722
6790
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -6735,15 +6803,17 @@ class binance(Exchange, ImplicitAPI):
|
|
6735
6803
|
async def fetch_canceled_and_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
6736
6804
|
"""
|
6737
6805
|
fetches information on multiple canceled orders made by the user
|
6738
|
-
|
6739
|
-
|
6740
|
-
|
6741
|
-
|
6742
|
-
|
6743
|
-
|
6744
|
-
|
6745
|
-
|
6746
|
-
|
6806
|
+
|
6807
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
6808
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
6809
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
6810
|
+
https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
6811
|
+
https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
6812
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
6813
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
6814
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
6815
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
6816
|
+
|
6747
6817
|
:param str symbol: unified market symbol of the market the orders were made in
|
6748
6818
|
:param int [since]: the earliest time in ms to fetch orders for
|
6749
6819
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -6765,16 +6835,18 @@ class binance(Exchange, ImplicitAPI):
|
|
6765
6835
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
6766
6836
|
"""
|
6767
6837
|
cancels an open order
|
6768
|
-
|
6769
|
-
|
6770
|
-
|
6771
|
-
|
6772
|
-
|
6773
|
-
|
6774
|
-
|
6775
|
-
|
6776
|
-
|
6777
|
-
|
6838
|
+
|
6839
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-order-trade
|
6840
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order
|
6841
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Cancel-Order
|
6842
|
+
https://developers.binance.com/docs/derivatives/option/trade/Cancel-Option-Order
|
6843
|
+
https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-Order
|
6844
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Order
|
6845
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Order
|
6846
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Conditional-Order
|
6847
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Conditional-Order
|
6848
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-Order
|
6849
|
+
|
6778
6850
|
:param str id: order id
|
6779
6851
|
:param str symbol: unified symbol of the market the order was made in
|
6780
6852
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6844,15 +6916,17 @@ class binance(Exchange, ImplicitAPI):
|
|
6844
6916
|
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
6845
6917
|
"""
|
6846
6918
|
cancel all open orders in a market
|
6847
|
-
|
6848
|
-
|
6849
|
-
|
6850
|
-
|
6851
|
-
|
6852
|
-
|
6853
|
-
|
6854
|
-
|
6855
|
-
|
6919
|
+
|
6920
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-all-open-orders-on-a-symbol-trade
|
6921
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders
|
6922
|
+
https://developers.binance.com/docs/derivatives/option/trade/Cancel-all-Option-orders-on-specific-symbol
|
6923
|
+
https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders
|
6924
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Orders
|
6925
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Conditional-Orders
|
6926
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Orders
|
6927
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Conditional-Orders
|
6928
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-All-Open-Orders-on-a-Symbol
|
6929
|
+
|
6856
6930
|
:param str symbol: unified market symbol of the market to cancel orders in
|
6857
6931
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
6858
6932
|
:param str [params.marginMode]: 'cross' or 'isolated', for spot margin trading
|
@@ -6999,13 +7073,15 @@ class binance(Exchange, ImplicitAPI):
|
|
6999
7073
|
async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
|
7000
7074
|
"""
|
7001
7075
|
cancel multiple orders
|
7002
|
-
|
7003
|
-
|
7076
|
+
|
7077
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders
|
7078
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Cancel-Multiple-Orders
|
7079
|
+
|
7004
7080
|
:param str[] ids: order ids
|
7005
7081
|
:param str [symbol]: unified market symbol
|
7006
7082
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7007
|
-
|
7008
|
-
|
7083
|
+
|
7084
|
+
EXCHANGE SPECIFIC PARAMETERS
|
7009
7085
|
:param str[] [params.origClientOrderIdList]: max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma
|
7010
7086
|
:param int[] [params.recvWindow]:
|
7011
7087
|
:returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -7065,10 +7141,12 @@ class binance(Exchange, ImplicitAPI):
|
|
7065
7141
|
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
7066
7142
|
"""
|
7067
7143
|
fetch all the trades made from a single order
|
7068
|
-
|
7069
|
-
|
7070
|
-
|
7071
|
-
|
7144
|
+
|
7145
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
|
7146
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
|
7147
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
|
7148
|
+
https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
|
7149
|
+
|
7072
7150
|
:param str id: order id
|
7073
7151
|
:param str symbol: unified market symbol
|
7074
7152
|
:param int [since]: the earliest time in ms to fetch trades for
|
@@ -7092,13 +7170,15 @@ class binance(Exchange, ImplicitAPI):
|
|
7092
7170
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
7093
7171
|
"""
|
7094
7172
|
fetch all trades made by the user
|
7095
|
-
|
7096
|
-
|
7097
|
-
|
7098
|
-
|
7099
|
-
|
7100
|
-
|
7101
|
-
|
7173
|
+
|
7174
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
|
7175
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
|
7176
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
|
7177
|
+
https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
|
7178
|
+
https://developers.binance.com/docs/derivatives/option/trade/Account-Trade-List
|
7179
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/UM-Account-Trade-List
|
7180
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/CM-Account-Trade-List
|
7181
|
+
|
7102
7182
|
:param str symbol: unified market symbol
|
7103
7183
|
:param int [since]: the earliest time in ms to fetch trades for
|
7104
7184
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -7303,7 +7383,9 @@ class binance(Exchange, ImplicitAPI):
|
|
7303
7383
|
async def fetch_my_dust_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
7304
7384
|
"""
|
7305
7385
|
fetch all dust trades made by the user
|
7306
|
-
|
7386
|
+
|
7387
|
+
https://developers.binance.com/docs/wallet/asset/dust-log
|
7388
|
+
|
7307
7389
|
:param str symbol: not used by binance fetchMyDustTrades()
|
7308
7390
|
:param int [since]: the earliest time in ms to fetch my dust trades for
|
7309
7391
|
:param int [limit]: the maximum number of dust trades to retrieve
|
@@ -7437,8 +7519,10 @@ class binance(Exchange, ImplicitAPI):
|
|
7437
7519
|
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
7438
7520
|
"""
|
7439
7521
|
fetch all deposits made to an account
|
7440
|
-
|
7441
|
-
|
7522
|
+
|
7523
|
+
https://developers.binance.com/docs/wallet/capital/deposite-history
|
7524
|
+
https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History
|
7525
|
+
|
7442
7526
|
:param str code: unified currency code
|
7443
7527
|
:param int [since]: the earliest time in ms to fetch deposits for
|
7444
7528
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -7537,8 +7621,10 @@ class binance(Exchange, ImplicitAPI):
|
|
7537
7621
|
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
7538
7622
|
"""
|
7539
7623
|
fetch all withdrawals made from an account
|
7540
|
-
|
7541
|
-
|
7624
|
+
|
7625
|
+
https://developers.binance.com/docs/wallet/capital/withdraw-history
|
7626
|
+
https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History
|
7627
|
+
|
7542
7628
|
:param str code: unified currency code
|
7543
7629
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
7544
7630
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -7951,7 +8037,9 @@ class binance(Exchange, ImplicitAPI):
|
|
7951
8037
|
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
7952
8038
|
"""
|
7953
8039
|
transfer currency internally between wallets on the same account
|
7954
|
-
|
8040
|
+
|
8041
|
+
https://developers.binance.com/docs/wallet/asset/user-universal-transfer
|
8042
|
+
|
7955
8043
|
:param str code: unified currency code
|
7956
8044
|
:param float amount: amount to transfer
|
7957
8045
|
:param str fromAccount: account to transfer from
|
@@ -8036,7 +8124,9 @@ class binance(Exchange, ImplicitAPI):
|
|
8036
8124
|
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
8037
8125
|
"""
|
8038
8126
|
fetch a history of internal transfers made on an account
|
8039
|
-
|
8127
|
+
|
8128
|
+
https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer
|
8129
|
+
|
8040
8130
|
:param str code: unified currency code of the currency transferred
|
8041
8131
|
:param int [since]: the earliest time in ms to fetch transfers for
|
8042
8132
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
@@ -8168,9 +8258,12 @@ class binance(Exchange, ImplicitAPI):
|
|
8168
8258
|
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
8169
8259
|
"""
|
8170
8260
|
fetch the deposit address for a currency associated with self account
|
8171
|
-
|
8261
|
+
|
8262
|
+
https://developers.binance.com/docs/wallet/capital/deposite-address
|
8263
|
+
|
8172
8264
|
:param str code: unified currency code
|
8173
8265
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
8266
|
+
:param str [params.network]: network for fetch deposit address
|
8174
8267
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
8175
8268
|
"""
|
8176
8269
|
await self.load_markets()
|
@@ -8252,9 +8345,11 @@ class binance(Exchange, ImplicitAPI):
|
|
8252
8345
|
|
8253
8346
|
async def fetch_transaction_fees(self, codes: Strings = None, params={}):
|
8254
8347
|
"""
|
8255
|
-
|
8348
|
+
@deprecated
|
8256
8349
|
please use fetchDepositWithdrawFees instead
|
8257
|
-
|
8350
|
+
|
8351
|
+
https://developers.binance.com/docs/wallet/capital/all-coins-info
|
8352
|
+
|
8258
8353
|
:param str[]|None codes: not used by binance fetchTransactionFees()
|
8259
8354
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
8260
8355
|
:returns dict[]: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -8364,7 +8459,9 @@ class binance(Exchange, ImplicitAPI):
|
|
8364
8459
|
async def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
|
8365
8460
|
"""
|
8366
8461
|
fetch deposit and withdraw fees
|
8367
|
-
|
8462
|
+
|
8463
|
+
https://developers.binance.com/docs/wallet/capital/all-coins-info
|
8464
|
+
|
8368
8465
|
:param str[]|None codes: not used by binance fetchDepositWithdrawFees()
|
8369
8466
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
8370
8467
|
:returns dict[]: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -8484,7 +8581,9 @@ class binance(Exchange, ImplicitAPI):
|
|
8484
8581
|
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
8485
8582
|
"""
|
8486
8583
|
make a withdrawal
|
8487
|
-
|
8584
|
+
|
8585
|
+
https://developers.binance.com/docs/wallet/capital/withdraw
|
8586
|
+
|
8488
8587
|
:param str code: unified currency code
|
8489
8588
|
:param float amount: the amount to withdraw
|
8490
8589
|
:param str address: the address to withdraw to
|
@@ -8547,11 +8646,13 @@ class binance(Exchange, ImplicitAPI):
|
|
8547
8646
|
async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
8548
8647
|
"""
|
8549
8648
|
fetch the trading fees for a market
|
8550
|
-
|
8551
|
-
|
8552
|
-
|
8553
|
-
|
8554
|
-
|
8649
|
+
|
8650
|
+
https://developers.binance.com/docs/wallet/asset/trade-fee
|
8651
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate
|
8652
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/User-Commission-Rate
|
8653
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-UM
|
8654
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-CM
|
8655
|
+
|
8555
8656
|
:param str symbol: unified market symbol
|
8556
8657
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
8557
8658
|
:param boolean [params.portfolioMargin]: set to True if you would like to fetch trading fees in a portfolio margin account
|
@@ -8610,10 +8711,12 @@ class binance(Exchange, ImplicitAPI):
|
|
8610
8711
|
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
8611
8712
|
"""
|
8612
8713
|
fetch the trading fees for multiple markets
|
8613
|
-
|
8614
|
-
|
8615
|
-
|
8616
|
-
|
8714
|
+
|
8715
|
+
https://developers.binance.com/docs/wallet/asset/trade-fee
|
8716
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
8717
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
8718
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Config
|
8719
|
+
|
8617
8720
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
8618
8721
|
:param str [params.subType]: "linear" or "inverse"
|
8619
8722
|
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
|
@@ -8776,9 +8879,11 @@ class binance(Exchange, ImplicitAPI):
|
|
8776
8879
|
|
8777
8880
|
async def futures_transfer(self, code: str, amount, type, params={}):
|
8778
8881
|
"""
|
8779
|
-
|
8882
|
+
@ignore
|
8780
8883
|
transfer between futures account
|
8781
|
-
|
8884
|
+
|
8885
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/New-Future-Account-Transfer
|
8886
|
+
|
8782
8887
|
:param str code: unified currency code
|
8783
8888
|
:param float amount: the amount to transfer
|
8784
8889
|
:param str type: 1 - transfer from spot account to USDT-Ⓜ futures account, 2 - transfer from USDT-Ⓜ futures account to spot account, 3 - transfer from spot account to COIN-Ⓜ futures account, 4 - transfer from COIN-Ⓜ futures account to spot account
|
@@ -8806,8 +8911,10 @@ class binance(Exchange, ImplicitAPI):
|
|
8806
8911
|
async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
8807
8912
|
"""
|
8808
8913
|
fetch the current funding rate
|
8809
|
-
|
8810
|
-
|
8914
|
+
|
8915
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price
|
8916
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Index-Price-and-Mark-Price
|
8917
|
+
|
8811
8918
|
:param str symbol: unified market symbol
|
8812
8919
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
8813
8920
|
:returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
|
@@ -8843,8 +8950,10 @@ class binance(Exchange, ImplicitAPI):
|
|
8843
8950
|
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
8844
8951
|
"""
|
8845
8952
|
fetches historical funding rate prices
|
8846
|
-
|
8847
|
-
|
8953
|
+
|
8954
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History
|
8955
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Get-Funding-Rate-History-of-Perpetual-Futures
|
8956
|
+
|
8848
8957
|
:param str symbol: unified symbol of the market to fetch the funding rate history for
|
8849
8958
|
:param int [since]: timestamp in ms of the earliest funding rate to fetch
|
8850
8959
|
:param int [limit]: the maximum amount of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>` to fetch
|
@@ -8910,8 +9019,10 @@ class binance(Exchange, ImplicitAPI):
|
|
8910
9019
|
async def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
|
8911
9020
|
"""
|
8912
9021
|
fetch the funding rate for multiple markets
|
8913
|
-
|
8914
|
-
|
9022
|
+
|
9023
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price
|
9024
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Index-Price-and-Mark-Price
|
9025
|
+
|
8915
9026
|
:param str[]|None symbols: list of unified market symbols
|
8916
9027
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
8917
9028
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -9529,10 +9640,12 @@ class binance(Exchange, ImplicitAPI):
|
|
9529
9640
|
async def fetch_leverage_tiers(self, symbols: Strings = None, params={}) -> LeverageTiers:
|
9530
9641
|
"""
|
9531
9642
|
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
9532
|
-
|
9533
|
-
|
9534
|
-
|
9535
|
-
|
9643
|
+
|
9644
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets
|
9645
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Notional-Bracket-for-Symbol
|
9646
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/UM-Notional-and-Leverage-Brackets
|
9647
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/CM-Notional-and-Leverage-Brackets
|
9648
|
+
|
9536
9649
|
:param str[]|None symbols: list of unified market symbols
|
9537
9650
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
9538
9651
|
:param boolean [params.portfolioMargin]: set to True if you would like to fetch the leverage tiers for a portfolio margin account
|
@@ -9601,7 +9714,7 @@ class binance(Exchange, ImplicitAPI):
|
|
9601
9714
|
|
9602
9715
|
def parse_market_leverage_tiers(self, info, market: Market = None) -> List[LeverageTier]:
|
9603
9716
|
"""
|
9604
|
-
|
9717
|
+
@ignore
|
9605
9718
|
:param dict info: Exchange response for 1 market
|
9606
9719
|
:param dict market: CCXT market
|
9607
9720
|
"""
|
@@ -9629,6 +9742,7 @@ class binance(Exchange, ImplicitAPI):
|
|
9629
9742
|
bracket = brackets[j]
|
9630
9743
|
tiers.append({
|
9631
9744
|
'tier': self.safe_number(bracket, 'bracket'),
|
9745
|
+
'symbol': self.safe_symbol(marketId, market),
|
9632
9746
|
'currency': market['quote'],
|
9633
9747
|
'minNotional': self.safe_number_2(bracket, 'notionalFloor', 'qtyFloor'),
|
9634
9748
|
'maxNotional': self.safe_number_2(bracket, 'notionalCap', 'qtyCap'),
|
@@ -9641,7 +9755,9 @@ class binance(Exchange, ImplicitAPI):
|
|
9641
9755
|
async def fetch_position(self, symbol: str, params={}):
|
9642
9756
|
"""
|
9643
9757
|
fetch data on an open position
|
9644
|
-
|
9758
|
+
|
9759
|
+
https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information
|
9760
|
+
|
9645
9761
|
:param str symbol: unified market symbol of the market the position is held in
|
9646
9762
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
9647
9763
|
:returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -9682,7 +9798,9 @@ class binance(Exchange, ImplicitAPI):
|
|
9682
9798
|
async def fetch_option_positions(self, symbols: Strings = None, params={}):
|
9683
9799
|
"""
|
9684
9800
|
fetch data on open options positions
|
9685
|
-
|
9801
|
+
|
9802
|
+
https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information
|
9803
|
+
|
9686
9804
|
:param str[]|None symbols: list of unified market symbols
|
9687
9805
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
9688
9806
|
:returns dict[]: a list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -9790,14 +9908,17 @@ class binance(Exchange, ImplicitAPI):
|
|
9790
9908
|
async def fetch_positions(self, symbols: Strings = None, params={}):
|
9791
9909
|
"""
|
9792
9910
|
fetch all open positions
|
9793
|
-
|
9794
|
-
|
9795
|
-
|
9796
|
-
|
9797
|
-
|
9911
|
+
|
9912
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
9913
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
9914
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2
|
9915
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Position-Information
|
9916
|
+
https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information
|
9917
|
+
|
9798
9918
|
:param str[] [symbols]: list of unified market symbols
|
9799
9919
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
9800
|
-
:param
|
9920
|
+
:param dict [params.params]: extra parameters specific to the exchange API endpoint
|
9921
|
+
:param str [params.method]: method name to call, "positionRisk", "account" or "option", default is "positionRisk"
|
9801
9922
|
:param bool [params.useV2]: set to True if you want to use the obsolete endpoint, where some more additional fields were provided
|
9802
9923
|
:returns dict[]: a list of `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
9803
9924
|
"""
|
@@ -9820,13 +9941,15 @@ class binance(Exchange, ImplicitAPI):
|
|
9820
9941
|
|
9821
9942
|
async def fetch_account_positions(self, symbols: Strings = None, params={}):
|
9822
9943
|
"""
|
9823
|
-
|
9944
|
+
@ignore
|
9824
9945
|
fetch account positions
|
9825
|
-
|
9826
|
-
|
9827
|
-
|
9828
|
-
|
9829
|
-
|
9946
|
+
|
9947
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
9948
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
9949
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2
|
9950
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Position-Information
|
9951
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V3
|
9952
|
+
|
9830
9953
|
:param str[] [symbols]: list of unified market symbols
|
9831
9954
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
9832
9955
|
:param boolean [params.portfolioMargin]: set to True if you would like to fetch positions in a portfolio margin account
|
@@ -9939,13 +10062,15 @@ class binance(Exchange, ImplicitAPI):
|
|
9939
10062
|
|
9940
10063
|
async def fetch_positions_risk(self, symbols: Strings = None, params={}):
|
9941
10064
|
"""
|
9942
|
-
|
10065
|
+
@ignore
|
9943
10066
|
fetch positions risk
|
9944
|
-
|
9945
|
-
|
9946
|
-
|
9947
|
-
|
9948
|
-
|
10067
|
+
|
10068
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2
|
10069
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Position-Information
|
10070
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-UM-Position-Information
|
10071
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-CM-Position-Information
|
10072
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3
|
10073
|
+
|
9949
10074
|
:param str[]|None symbols: list of unified market symbols
|
9950
10075
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
9951
10076
|
:param boolean [params.portfolioMargin]: set to True if you would like to fetch positions for a portfolio margin account
|
@@ -10105,10 +10230,12 @@ class binance(Exchange, ImplicitAPI):
|
|
10105
10230
|
async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
10106
10231
|
"""
|
10107
10232
|
fetch the history of funding payments paid and received on self account
|
10108
|
-
|
10109
|
-
|
10110
|
-
|
10111
|
-
|
10233
|
+
|
10234
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History
|
10235
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Get-Income-History
|
10236
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Income-History
|
10237
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Income-History
|
10238
|
+
|
10112
10239
|
:param str symbol: unified market symbol
|
10113
10240
|
:param int [since]: the earliest time in ms to fetch funding history for
|
10114
10241
|
:param int [limit]: the maximum number of funding history structures to retrieve
|
@@ -10158,10 +10285,12 @@ class binance(Exchange, ImplicitAPI):
|
|
10158
10285
|
async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
10159
10286
|
"""
|
10160
10287
|
set the level of leverage for a market
|
10161
|
-
|
10162
|
-
|
10163
|
-
|
10164
|
-
|
10288
|
+
|
10289
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage
|
10290
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Change-Initial-Leverage
|
10291
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-UM-Initial-Leverage
|
10292
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-CM-Initial-Leverage
|
10293
|
+
|
10165
10294
|
:param float leverage: the rate of leverage
|
10166
10295
|
:param str symbol: unified market symbol
|
10167
10296
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -10200,8 +10329,10 @@ class binance(Exchange, ImplicitAPI):
|
|
10200
10329
|
async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
10201
10330
|
"""
|
10202
10331
|
set margin mode to 'cross' or 'isolated'
|
10203
|
-
|
10204
|
-
|
10332
|
+
|
10333
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type
|
10334
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Change-Margin-Type
|
10335
|
+
|
10205
10336
|
:param str marginMode: 'cross' or 'isolated'
|
10206
10337
|
:param str symbol: unified market symbol
|
10207
10338
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -10254,10 +10385,12 @@ class binance(Exchange, ImplicitAPI):
|
|
10254
10385
|
async def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
|
10255
10386
|
"""
|
10256
10387
|
set hedged to True or False for a market
|
10257
|
-
|
10258
|
-
|
10259
|
-
|
10260
|
-
|
10388
|
+
|
10389
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode
|
10390
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Change-Position-Mode
|
10391
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Current-Position-Mode
|
10392
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Current-Position-Mode
|
10393
|
+
|
10261
10394
|
:param bool hedged: set to True to use dualSidePosition
|
10262
10395
|
:param str symbol: not used by binance setPositionMode()
|
10263
10396
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -10304,11 +10437,13 @@ class binance(Exchange, ImplicitAPI):
|
|
10304
10437
|
async def fetch_leverages(self, symbols: Strings = None, params={}) -> Leverages:
|
10305
10438
|
"""
|
10306
10439
|
fetch the set leverage for all markets
|
10307
|
-
|
10308
|
-
|
10309
|
-
|
10310
|
-
|
10311
|
-
|
10440
|
+
|
10441
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
10442
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
10443
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Account-Detail
|
10444
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Account-Detail
|
10445
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Symbol-Config
|
10446
|
+
|
10312
10447
|
:param str[] [symbols]: a list of unified market symbols
|
10313
10448
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
10314
10449
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -10371,7 +10506,9 @@ class binance(Exchange, ImplicitAPI):
|
|
10371
10506
|
async def fetch_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
10372
10507
|
"""
|
10373
10508
|
fetches historical settlement records
|
10374
|
-
|
10509
|
+
|
10510
|
+
https://developers.binance.com/docs/derivatives/option/market-data/Historical-Exercise-Records
|
10511
|
+
|
10375
10512
|
:param str symbol: unified market symbol of the settlement history
|
10376
10513
|
:param int [since]: timestamp in ms
|
10377
10514
|
:param int [limit]: number of records, default 100, max 100
|
@@ -10411,7 +10548,9 @@ class binance(Exchange, ImplicitAPI):
|
|
10411
10548
|
async def fetch_my_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
10412
10549
|
"""
|
10413
10550
|
fetches historical settlement records of the user
|
10414
|
-
|
10551
|
+
|
10552
|
+
https://developers.binance.com/docs/derivatives/option/trade/User-Exercise-Record
|
10553
|
+
|
10415
10554
|
:param str symbol: unified market symbol of the settlement history
|
10416
10555
|
:param int [since]: timestamp in ms
|
10417
10556
|
:param int [limit]: number of records
|
@@ -10540,7 +10679,9 @@ class binance(Exchange, ImplicitAPI):
|
|
10540
10679
|
async def fetch_ledger_entry(self, id: str, code: Str = None, params={}) -> LedgerEntry:
|
10541
10680
|
"""
|
10542
10681
|
fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
10543
|
-
|
10682
|
+
|
10683
|
+
https://developers.binance.com/docs/derivatives/option/account/Account-Funding-Flow
|
10684
|
+
|
10544
10685
|
:param str id: the identification number of the ledger entry
|
10545
10686
|
:param str code: unified currency code
|
10546
10687
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -10575,11 +10716,13 @@ class binance(Exchange, ImplicitAPI):
|
|
10575
10716
|
async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
|
10576
10717
|
"""
|
10577
10718
|
fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
10578
|
-
|
10579
|
-
|
10580
|
-
|
10581
|
-
|
10582
|
-
|
10719
|
+
|
10720
|
+
https://developers.binance.com/docs/derivatives/option/account/Account-Funding-Flow
|
10721
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History
|
10722
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Get-Income-History
|
10723
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Income-History
|
10724
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Income-History
|
10725
|
+
|
10583
10726
|
:param str [code]: unified currency code
|
10584
10727
|
:param int [since]: timestamp in ms of the earliest ledger entry
|
10585
10728
|
:param int [limit]: max number of ledger entries to return
|
@@ -11025,8 +11168,10 @@ class binance(Exchange, ImplicitAPI):
|
|
11025
11168
|
async def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
11026
11169
|
"""
|
11027
11170
|
remove margin from a position
|
11028
|
-
|
11029
|
-
|
11171
|
+
|
11172
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin
|
11173
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Isolated-Position-Margin
|
11174
|
+
|
11030
11175
|
:param str symbol: unified market symbol
|
11031
11176
|
:param float amount: the amount of margin to remove
|
11032
11177
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -11037,8 +11182,10 @@ class binance(Exchange, ImplicitAPI):
|
|
11037
11182
|
async def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
11038
11183
|
"""
|
11039
11184
|
add margin
|
11040
|
-
|
11041
|
-
|
11185
|
+
|
11186
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin
|
11187
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Isolated-Position-Margin
|
11188
|
+
|
11042
11189
|
:param str symbol: unified market symbol
|
11043
11190
|
:param float amount: amount of margin to add
|
11044
11191
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -11049,7 +11196,9 @@ class binance(Exchange, ImplicitAPI):
|
|
11049
11196
|
async def fetch_cross_borrow_rate(self, code: str, params={}) -> CrossBorrowRate:
|
11050
11197
|
"""
|
11051
11198
|
fetch the rate of interest to borrow a currency for margin trading
|
11052
|
-
|
11199
|
+
|
11200
|
+
https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History
|
11201
|
+
|
11053
11202
|
:param str code: unified currency code
|
11054
11203
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
11055
11204
|
:returns dict: a `borrow rate structure <https://docs.ccxt.com/#/?id=borrow-rate-structure>`
|
@@ -11077,11 +11226,13 @@ class binance(Exchange, ImplicitAPI):
|
|
11077
11226
|
async def fetch_isolated_borrow_rate(self, symbol: str, params={}) -> IsolatedBorrowRate:
|
11078
11227
|
"""
|
11079
11228
|
fetch the rate of interest to borrow a currency for margin trading
|
11080
|
-
|
11229
|
+
|
11230
|
+
https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data
|
11231
|
+
|
11081
11232
|
:param str symbol: unified market symbol
|
11082
11233
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
11083
|
-
|
11084
|
-
|
11234
|
+
|
11235
|
+
EXCHANGE SPECIFIC PARAMETERS
|
11085
11236
|
:param dict [params.vipLevel]: user's current specific margin data will be returned if viplevel is omitted
|
11086
11237
|
:returns dict: an `isolated borrow rate structure <https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure>`
|
11087
11238
|
"""
|
@@ -11094,11 +11245,13 @@ class binance(Exchange, ImplicitAPI):
|
|
11094
11245
|
async def fetch_isolated_borrow_rates(self, params={}) -> IsolatedBorrowRates:
|
11095
11246
|
"""
|
11096
11247
|
fetch the borrow interest rates of all currencies
|
11097
|
-
|
11248
|
+
|
11249
|
+
https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data
|
11250
|
+
|
11098
11251
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
11099
11252
|
:param dict [params.symbol]: unified market symbol
|
11100
|
-
|
11101
|
-
|
11253
|
+
|
11254
|
+
EXCHANGE SPECIFIC PARAMETERS
|
11102
11255
|
:param dict [params.vipLevel]: user's current specific margin data will be returned if viplevel is omitted
|
11103
11256
|
:returns dict: a `borrow rate structure <https://docs.ccxt.com/#/?id=borrow-rate-structure>`
|
11104
11257
|
"""
|
@@ -11136,7 +11289,9 @@ class binance(Exchange, ImplicitAPI):
|
|
11136
11289
|
async def fetch_borrow_rate_history(self, code: str, since: Int = None, limit: Int = None, params={}):
|
11137
11290
|
"""
|
11138
11291
|
retrieves a history of a currencies borrow interest rate at specific time slots
|
11139
|
-
|
11292
|
+
|
11293
|
+
https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History
|
11294
|
+
|
11140
11295
|
:param str code: unified currency code
|
11141
11296
|
:param int [since]: timestamp for the earliest borrow rate
|
11142
11297
|
:param int [limit]: the maximum number of `borrow rate structures <https://docs.ccxt.com/#/?id=borrow-rate-structure>` to retrieve
|
@@ -11232,7 +11387,9 @@ class binance(Exchange, ImplicitAPI):
|
|
11232
11387
|
async def create_gift_code(self, code: str, amount, params={}):
|
11233
11388
|
"""
|
11234
11389
|
create gift code
|
11235
|
-
|
11390
|
+
|
11391
|
+
https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card
|
11392
|
+
|
11236
11393
|
:param str code: gift code
|
11237
11394
|
:param float amount: amount of currency for the gift
|
11238
11395
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -11268,7 +11425,9 @@ class binance(Exchange, ImplicitAPI):
|
|
11268
11425
|
async def redeem_gift_code(self, giftcardCode, params={}):
|
11269
11426
|
"""
|
11270
11427
|
redeem gift code
|
11271
|
-
|
11428
|
+
|
11429
|
+
https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card
|
11430
|
+
|
11272
11431
|
:param str giftcardCode:
|
11273
11432
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
11274
11433
|
:returns dict: response from the exchange
|
@@ -11293,7 +11452,9 @@ class binance(Exchange, ImplicitAPI):
|
|
11293
11452
|
async def verify_gift_code(self, id: str, params={}):
|
11294
11453
|
"""
|
11295
11454
|
verify gift code
|
11296
|
-
|
11455
|
+
|
11456
|
+
https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number
|
11457
|
+
|
11297
11458
|
:param str id: reference number id
|
11298
11459
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
11299
11460
|
:returns dict: response from the exchange
|
@@ -11315,8 +11476,10 @@ class binance(Exchange, ImplicitAPI):
|
|
11315
11476
|
async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
|
11316
11477
|
"""
|
11317
11478
|
fetch the interest owed by the user for borrowing currency for margin trading
|
11318
|
-
|
11319
|
-
|
11479
|
+
|
11480
|
+
https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History
|
11481
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Margin-BorrowLoan-Interest-History
|
11482
|
+
|
11320
11483
|
:param str [code]: unified currency code
|
11321
11484
|
:param str [symbol]: unified market symbol when fetch interest in isolated markets
|
11322
11485
|
:param int [since]: the earliest time in ms to fetch borrrow interest for
|
@@ -11405,9 +11568,11 @@ class binance(Exchange, ImplicitAPI):
|
|
11405
11568
|
async def repay_cross_margin(self, code: str, amount, params={}):
|
11406
11569
|
"""
|
11407
11570
|
repay borrowed margin and interest
|
11408
|
-
|
11409
|
-
|
11410
|
-
|
11571
|
+
|
11572
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay
|
11573
|
+
https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
11574
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay-Debt
|
11575
|
+
|
11411
11576
|
:param str code: unified currency code of the currency to repay
|
11412
11577
|
:param float amount: the amount to repay
|
11413
11578
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -11462,7 +11627,9 @@ class binance(Exchange, ImplicitAPI):
|
|
11462
11627
|
async def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
|
11463
11628
|
"""
|
11464
11629
|
repay borrowed margin and interest
|
11465
|
-
|
11630
|
+
|
11631
|
+
https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
11632
|
+
|
11466
11633
|
:param str symbol: unified market symbol, required for isolated margin
|
11467
11634
|
:param str code: unified currency code of the currency to repay
|
11468
11635
|
:param float amount: the amount to repay
|
@@ -11491,8 +11658,10 @@ class binance(Exchange, ImplicitAPI):
|
|
11491
11658
|
async def borrow_cross_margin(self, code: str, amount: float, params={}):
|
11492
11659
|
"""
|
11493
11660
|
create a loan to borrow margin
|
11494
|
-
|
11495
|
-
|
11661
|
+
|
11662
|
+
https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
11663
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Borrow
|
11664
|
+
|
11496
11665
|
:param str code: unified currency code of the currency to borrow
|
11497
11666
|
:param float amount: the amount to borrow
|
11498
11667
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -11525,7 +11694,9 @@ class binance(Exchange, ImplicitAPI):
|
|
11525
11694
|
async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
|
11526
11695
|
"""
|
11527
11696
|
create a loan to borrow margin
|
11528
|
-
|
11697
|
+
|
11698
|
+
https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
11699
|
+
|
11529
11700
|
:param str symbol: unified market symbol, required for isolated margin
|
11530
11701
|
:param str code: unified currency code of the currency to borrow
|
11531
11702
|
:param float amount: the amount to borrow
|
@@ -11583,8 +11754,10 @@ class binance(Exchange, ImplicitAPI):
|
|
11583
11754
|
async def fetch_open_interest_history(self, symbol: str, timeframe='5m', since: Int = None, limit: Int = None, params={}):
|
11584
11755
|
"""
|
11585
11756
|
Retrieves the open interest history of a currency
|
11586
|
-
|
11587
|
-
|
11757
|
+
|
11758
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics
|
11759
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Open-Interest-Statistics
|
11760
|
+
|
11588
11761
|
:param str symbol: Unified CCXT market symbol
|
11589
11762
|
:param str timeframe: "5m","15m","30m","1h","2h","4h","6h","12h", or "1d"
|
11590
11763
|
:param int [since]: the time(ms) of the earliest record to retrieve unix timestamp
|
@@ -11644,9 +11817,11 @@ class binance(Exchange, ImplicitAPI):
|
|
11644
11817
|
async def fetch_open_interest(self, symbol: str, params={}):
|
11645
11818
|
"""
|
11646
11819
|
retrieves the open interest of a contract trading pair
|
11647
|
-
|
11648
|
-
|
11649
|
-
|
11820
|
+
|
11821
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest
|
11822
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Open-Interest
|
11823
|
+
https://developers.binance.com/docs/derivatives/option/market-data/Open-Interest
|
11824
|
+
|
11650
11825
|
:param str symbol: unified CCXT market symbol
|
11651
11826
|
:param dict [params]: exchange specific parameters
|
11652
11827
|
:returns dict} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure:
|
@@ -11730,11 +11905,13 @@ class binance(Exchange, ImplicitAPI):
|
|
11730
11905
|
async def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
11731
11906
|
"""
|
11732
11907
|
retrieves the users liquidated positions
|
11733
|
-
|
11734
|
-
|
11735
|
-
|
11736
|
-
|
11737
|
-
|
11908
|
+
|
11909
|
+
https://developers.binance.com/docs/margin_trading/trade/Get-Force-Liquidation-Record
|
11910
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders
|
11911
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Users-Force-Orders
|
11912
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-UM-Force-Orders
|
11913
|
+
https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-CM-Force-Orders
|
11914
|
+
|
11738
11915
|
:param str [symbol]: unified CCXT market symbol
|
11739
11916
|
:param int [since]: the earliest time in ms to fetch liquidations for
|
11740
11917
|
:param int [limit]: the maximum number of liquidation structures to retrieve
|
@@ -11959,7 +12136,9 @@ class binance(Exchange, ImplicitAPI):
|
|
11959
12136
|
async def fetch_greeks(self, symbol: str, params={}) -> Greeks:
|
11960
12137
|
"""
|
11961
12138
|
fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
|
11962
|
-
|
12139
|
+
|
12140
|
+
https://developers.binance.com/docs/derivatives/option/market-data/Option-Mark-Price
|
12141
|
+
|
11963
12142
|
:param str symbol: unified symbol of the market to fetch greeks for
|
11964
12143
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
11965
12144
|
:returns dict: a `greeks structure <https://docs.ccxt.com/#/?id=greeks-structure>`
|
@@ -12043,8 +12222,10 @@ class binance(Exchange, ImplicitAPI):
|
|
12043
12222
|
async def fetch_position_mode(self, symbol: Str = None, params={}):
|
12044
12223
|
"""
|
12045
12224
|
fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
|
12046
|
-
|
12047
|
-
|
12225
|
+
|
12226
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode
|
12227
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Get-Current-Position-Mode
|
12228
|
+
|
12048
12229
|
:param str symbol: unified symbol of the market to fetch the order book for
|
12049
12230
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
12050
12231
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -12076,10 +12257,12 @@ class binance(Exchange, ImplicitAPI):
|
|
12076
12257
|
async def fetch_margin_modes(self, symbols: Strings = None, params={}) -> MarginModes:
|
12077
12258
|
"""
|
12078
12259
|
fetches margin modes("isolated" or "cross") that the market for the symbol in in, with symbol=None all markets for a subType(linear/inverse) are returned
|
12079
|
-
|
12080
|
-
|
12081
|
-
|
12082
|
-
|
12260
|
+
|
12261
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
12262
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
12263
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Symbol-Config
|
12264
|
+
|
12265
|
+
:param str[] symbols: unified market symbols
|
12083
12266
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
12084
12267
|
:param str [params.subType]: "linear" or "inverse"
|
12085
12268
|
:returns dict: a list of `margin mode structures <https://docs.ccxt.com/#/?id=margin-mode-structure>`
|
@@ -12162,6 +12345,46 @@ class binance(Exchange, ImplicitAPI):
|
|
12162
12345
|
assets = response
|
12163
12346
|
return self.parse_margin_modes(assets, symbols, 'symbol', 'swap')
|
12164
12347
|
|
12348
|
+
async def fetch_margin_mode(self, symbol: str, params={}) -> MarginMode:
|
12349
|
+
"""
|
12350
|
+
fetches the margin mode of a specific symbol
|
12351
|
+
|
12352
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Symbol-Config
|
12353
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
12354
|
+
|
12355
|
+
:param str symbol: unified symbol of the market the order was made in
|
12356
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
12357
|
+
:param str [params.subType]: "linear" or "inverse"
|
12358
|
+
:returns dict: a `margin mode structure <https://docs.ccxt.com/#/?id=margin-mode-structure>`
|
12359
|
+
"""
|
12360
|
+
await self.load_markets()
|
12361
|
+
market = self.market(symbol)
|
12362
|
+
subType = None
|
12363
|
+
subType, params = self.handle_sub_type_and_params('fetchMarginMode', market, params)
|
12364
|
+
response = None
|
12365
|
+
if subType == 'linear':
|
12366
|
+
request: dict = {
|
12367
|
+
'symbol': market['id'],
|
12368
|
+
}
|
12369
|
+
response = await self.fapiPrivateGetSymbolConfig(self.extend(request, params))
|
12370
|
+
#
|
12371
|
+
# [
|
12372
|
+
# {
|
12373
|
+
# "symbol": "BTCUSDT",
|
12374
|
+
# "marginType": "CROSSED",
|
12375
|
+
# "isAutoAddMargin": "false",
|
12376
|
+
# "leverage": 21,
|
12377
|
+
# "maxNotionalValue": "1000000",
|
12378
|
+
# }
|
12379
|
+
# ]
|
12380
|
+
#
|
12381
|
+
elif subType == 'inverse':
|
12382
|
+
fetchMarginModesResponse = await self.fetch_margin_modes([symbol], params)
|
12383
|
+
return fetchMarginModesResponse[symbol]
|
12384
|
+
else:
|
12385
|
+
raise BadRequest(self.id + ' fetchMarginMode() supports linear and inverse subTypes only')
|
12386
|
+
return self.parse_margin_mode(response[0], market)
|
12387
|
+
|
12165
12388
|
def parse_margin_mode(self, marginMode: dict, market=None) -> MarginMode:
|
12166
12389
|
marketId = self.safe_string(marginMode, 'symbol')
|
12167
12390
|
market = self.safe_market(marketId, market)
|
@@ -12181,7 +12404,9 @@ class binance(Exchange, ImplicitAPI):
|
|
12181
12404
|
async def fetch_option(self, symbol: str, params={}) -> Option:
|
12182
12405
|
"""
|
12183
12406
|
fetches option data that is commonly found in an option chain
|
12184
|
-
|
12407
|
+
|
12408
|
+
https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics
|
12409
|
+
|
12185
12410
|
:param str symbol: unified market symbol
|
12186
12411
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
12187
12412
|
:returns dict: an `option chain structure <https://docs.ccxt.com/#/?id=option-chain-structure>`
|
@@ -12267,8 +12492,10 @@ class binance(Exchange, ImplicitAPI):
|
|
12267
12492
|
async def fetch_margin_adjustment_history(self, symbol: Str = None, type: Str = None, since: Num = None, limit: Num = None, params={}) -> List[MarginModification]:
|
12268
12493
|
"""
|
12269
12494
|
fetches the history of margin added or reduced from contract isolated positions
|
12270
|
-
|
12271
|
-
|
12495
|
+
|
12496
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History
|
12497
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Get-Position-Margin-Change-History
|
12498
|
+
|
12272
12499
|
:param str symbol: unified market symbol
|
12273
12500
|
:param str [type]: "add" or "reduce"
|
12274
12501
|
:param int [since]: timestamp in ms of the earliest change to fetch
|
@@ -12322,7 +12549,9 @@ class binance(Exchange, ImplicitAPI):
|
|
12322
12549
|
async def fetch_convert_currencies(self, params={}) -> Currencies:
|
12323
12550
|
"""
|
12324
12551
|
fetches all available currencies that can be converted
|
12325
|
-
|
12552
|
+
|
12553
|
+
https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset
|
12554
|
+
|
12326
12555
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
12327
12556
|
:returns dict: an associative dictionary of currencies
|
12328
12557
|
"""
|
@@ -12374,7 +12603,9 @@ class binance(Exchange, ImplicitAPI):
|
|
12374
12603
|
async def fetch_convert_quote(self, fromCode: str, toCode: str, amount: Num = None, params={}) -> Conversion:
|
12375
12604
|
"""
|
12376
12605
|
fetch a quote for converting from one currency to another
|
12377
|
-
|
12606
|
+
|
12607
|
+
https://developers.binance.com/docs/convert/trade/Send-quote-request
|
12608
|
+
|
12378
12609
|
:param str fromCode: the currency that you want to sell and convert from
|
12379
12610
|
:param str toCode: the currency that you want to buy and convert into
|
12380
12611
|
:param float amount: how much you want to trade in units of the from currency
|
@@ -12408,7 +12639,9 @@ class binance(Exchange, ImplicitAPI):
|
|
12408
12639
|
async def create_convert_trade(self, id: str, fromCode: str, toCode: str, amount: Num = None, params={}) -> Conversion:
|
12409
12640
|
"""
|
12410
12641
|
convert from one currency to another
|
12411
|
-
|
12642
|
+
|
12643
|
+
https://developers.binance.com/docs/convert/trade/Accept-Quote
|
12644
|
+
|
12412
12645
|
:param str id: the id of the trade that you want to make
|
12413
12646
|
:param str fromCode: the currency that you want to sell and convert from
|
12414
12647
|
:param str toCode: the currency that you want to buy and convert into
|
@@ -12450,7 +12683,9 @@ class binance(Exchange, ImplicitAPI):
|
|
12450
12683
|
async def fetch_convert_trade(self, id: str, code: Str = None, params={}) -> Conversion:
|
12451
12684
|
"""
|
12452
12685
|
fetch the data for a conversion trade
|
12453
|
-
|
12686
|
+
|
12687
|
+
https://developers.binance.com/docs/convert/trade/Order-Status
|
12688
|
+
|
12454
12689
|
:param str id: the id of the trade that you want to fetch
|
12455
12690
|
:param str [code]: the unified currency code of the conversion trade
|
12456
12691
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -12520,7 +12755,9 @@ class binance(Exchange, ImplicitAPI):
|
|
12520
12755
|
async def fetch_convert_trade_history(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Conversion]:
|
12521
12756
|
"""
|
12522
12757
|
fetch the users history of conversion trades
|
12523
|
-
|
12758
|
+
|
12759
|
+
https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History
|
12760
|
+
|
12524
12761
|
:param str [code]: the unified currency code
|
12525
12762
|
:param int [since]: the earliest time in ms to fetch conversions for
|
12526
12763
|
:param int [limit]: the maximum number of conversion structures to retrieve
|
@@ -12699,8 +12936,10 @@ class binance(Exchange, ImplicitAPI):
|
|
12699
12936
|
async def fetch_funding_intervals(self, symbols: Strings = None, params={}) -> FundingRates:
|
12700
12937
|
"""
|
12701
12938
|
fetch the funding rate interval for multiple markets
|
12702
|
-
|
12703
|
-
|
12939
|
+
|
12940
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Info
|
12941
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Get-Funding-Info
|
12942
|
+
|
12704
12943
|
:param str[] [symbols]: list of unified market symbols
|
12705
12944
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
12706
12945
|
:param str [params.subType]: "linear" or "inverse"
|
@@ -12738,8 +12977,10 @@ class binance(Exchange, ImplicitAPI):
|
|
12738
12977
|
async def fetch_long_short_ratio_history(self, symbol: Str = None, timeframe: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LongShortRatio]:
|
12739
12978
|
"""
|
12740
12979
|
fetches the long short ratio history for a unified market symbol
|
12741
|
-
|
12742
|
-
|
12980
|
+
|
12981
|
+
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio
|
12982
|
+
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Long-Short-Ratio
|
12983
|
+
|
12743
12984
|
:param str symbol: unified symbol of the market to fetch the long short ratio for
|
12744
12985
|
:param str [timeframe]: the period for the ratio, default is 24 hours
|
12745
12986
|
:param int [since]: the earliest time in ms to fetch ratios for
|