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/bingx.py
CHANGED
@@ -518,7 +518,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
518
518
|
async def fetch_time(self, params={}):
|
519
519
|
"""
|
520
520
|
fetches the current integer timestamp in milliseconds from the bingx server
|
521
|
-
|
521
|
+
|
522
|
+
https://bingx-api.github.io/docs/#/swapV2/base-info.html#Get%20Server%20Time
|
523
|
+
|
522
524
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
523
525
|
:returns int: the current integer timestamp in milliseconds from the bingx server
|
524
526
|
"""
|
@@ -538,7 +540,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
538
540
|
async def fetch_currencies(self, params={}) -> Currencies:
|
539
541
|
"""
|
540
542
|
fetches all available currencies on an exchange
|
541
|
-
|
543
|
+
|
544
|
+
https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins
|
545
|
+
|
542
546
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
543
547
|
:returns dict: an associative dictionary of currencies
|
544
548
|
"""
|
@@ -837,9 +841,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
837
841
|
async def fetch_markets(self, params={}) -> List[Market]:
|
838
842
|
"""
|
839
843
|
retrieves data on all markets for bingx
|
840
|
-
|
841
|
-
|
842
|
-
|
844
|
+
|
845
|
+
https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20Symbols
|
846
|
+
https://bingx-api.github.io/docs/#/swapV2/market-api.html#Contract%20Information
|
847
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Contract%20Information
|
848
|
+
|
843
849
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
844
850
|
:returns dict[]: an array of objects representing market data
|
845
851
|
"""
|
@@ -858,11 +864,13 @@ class bingx(Exchange, ImplicitAPI):
|
|
858
864
|
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
859
865
|
"""
|
860
866
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
867
|
+
|
868
|
+
https://bingx-api.github.io/docs/#/swapV2/market-api.html#K-Line%20Data
|
869
|
+
https://bingx-api.github.io/docs/#/spot/market-api.html#Candlestick%20chart%20data
|
870
|
+
https://bingx-api.github.io/docs/#/swapV2/market-api.html#%20K-Line%20Data
|
871
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#K-Line%20Data%20-%20Mark%20Price
|
872
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20K-line%20Data
|
873
|
+
|
866
874
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
867
875
|
:param str timeframe: the length of time each candle represents
|
868
876
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -998,8 +1006,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
998
1006
|
async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
999
1007
|
"""
|
1000
1008
|
get the list of most recent trades for a particular symbol
|
1001
|
-
|
1002
|
-
|
1009
|
+
|
1010
|
+
https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20transaction%20records
|
1011
|
+
https://bingx-api.github.io/docs/#/swapV2/market-api.html#The%20latest%20Trade%20of%20a%20Trading%20Pair
|
1012
|
+
|
1003
1013
|
:param str symbol: unified symbol of the market to fetch trades for
|
1004
1014
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
1005
1015
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -1219,9 +1229,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
1219
1229
|
async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
1220
1230
|
"""
|
1221
1231
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1232
|
+
|
1233
|
+
https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20depth%20information
|
1234
|
+
https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Market%20Depth
|
1235
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%20Depth%20Data
|
1236
|
+
|
1225
1237
|
:param str symbol: unified symbol of the market to fetch the order book for
|
1226
1238
|
:param int [limit]: the maximum amount of order book entries to return
|
1227
1239
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1308,8 +1320,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
1308
1320
|
async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
1309
1321
|
"""
|
1310
1322
|
fetch the current funding rate
|
1311
|
-
|
1312
|
-
|
1323
|
+
|
1324
|
+
https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
|
1325
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Price%20&%20Current%20Funding%20Rate
|
1326
|
+
|
1313
1327
|
:param str symbol: unified market symbol
|
1314
1328
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1315
1329
|
:returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
|
@@ -1346,7 +1360,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
1346
1360
|
async def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
|
1347
1361
|
"""
|
1348
1362
|
fetch the current funding rate for multiple symbols
|
1349
|
-
|
1363
|
+
|
1364
|
+
https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
|
1365
|
+
|
1350
1366
|
:param str[] [symbols]: list of unified market symbols
|
1351
1367
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1352
1368
|
:returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-structure>`
|
@@ -1394,7 +1410,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
1394
1410
|
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1395
1411
|
"""
|
1396
1412
|
fetches historical funding rate prices
|
1397
|
-
|
1413
|
+
|
1414
|
+
https://bingx-api.github.io/docs/#/swapV2/market-api.html#Funding%20Rate%20History
|
1415
|
+
|
1398
1416
|
:param str symbol: unified symbol of the market to fetch the funding rate history for
|
1399
1417
|
:param int [since]: timestamp in ms of the earliest funding rate to fetch
|
1400
1418
|
:param int [limit]: the maximum amount of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>` to fetch
|
@@ -1457,8 +1475,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
1457
1475
|
async def fetch_open_interest(self, symbol: str, params={}):
|
1458
1476
|
"""
|
1459
1477
|
retrieves the open interest of a trading pair
|
1460
|
-
|
1461
|
-
|
1478
|
+
|
1479
|
+
https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Swap%20Open%20Positions
|
1480
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20Swap%20Open%20Positions
|
1481
|
+
|
1462
1482
|
:param str symbol: unified CCXT market symbol
|
1463
1483
|
:param dict [params]: exchange specific parameters
|
1464
1484
|
:returns dict} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure:
|
@@ -1545,9 +1565,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
1545
1565
|
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
1546
1566
|
"""
|
1547
1567
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1568
|
+
|
1569
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Get%20Ticker
|
1570
|
+
https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#24-hour%20price%20changes
|
1571
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%2024-Hour%20Price%20Change
|
1572
|
+
|
1551
1573
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
1552
1574
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1553
1575
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -1603,9 +1625,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
1603
1625
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
1604
1626
|
"""
|
1605
1627
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1628
|
+
|
1629
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Get%20Ticker
|
1630
|
+
https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#24-hour%20price%20changes
|
1631
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%2024-Hour%20Price%20Change
|
1632
|
+
|
1609
1633
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
1610
1634
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1611
1635
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -1664,7 +1688,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
1664
1688
|
async def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
|
1665
1689
|
"""
|
1666
1690
|
fetches mark prices for the market
|
1667
|
-
|
1691
|
+
|
1692
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20and%20Funding%20Rate
|
1693
|
+
|
1668
1694
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
1669
1695
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1670
1696
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -1717,7 +1743,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
1717
1743
|
async def fetch_mark_prices(self, symbols: Strings = None, params={}) -> Tickers:
|
1718
1744
|
"""
|
1719
1745
|
fetches mark prices for multiple markets
|
1720
|
-
|
1746
|
+
|
1747
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20and%20Funding%20Rate
|
1748
|
+
|
1721
1749
|
:param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
1722
1750
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1723
1751
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -1871,10 +1899,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
1871
1899
|
async def fetch_balance(self, params={}) -> Balances:
|
1872
1900
|
"""
|
1873
1901
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1902
|
+
|
1903
|
+
https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Assets
|
1904
|
+
https://bingx-api.github.io/docs/#/swapV2/account-api.html#Get%20Perpetual%20Swap%20Account%20Asset%20Information
|
1905
|
+
https://bingx-api.github.io/docs/#/standard/contract-interface.html#Query%20standard%20contract%20balance
|
1906
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Account%20Assets
|
1907
|
+
|
1878
1908
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1879
1909
|
:param boolean [params.standard]: whether to fetch standard contract balances
|
1880
1910
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
@@ -2090,9 +2120,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
2090
2120
|
async def fetch_positions(self, symbols: Strings = None, params={}):
|
2091
2121
|
"""
|
2092
2122
|
fetch all open positions
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2123
|
+
|
2124
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20position%20data
|
2125
|
+
https://bingx-api.github.io/docs/#/en-us/standard/contract-interface.html#position
|
2126
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20warehouse
|
2127
|
+
|
2096
2128
|
:param str[]|None symbols: list of unified market symbols
|
2097
2129
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2098
2130
|
:param boolean [params.standard]: whether to fetch standard contract positions
|
@@ -2181,8 +2213,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
2181
2213
|
async def fetch_position(self, symbol: str, params={}):
|
2182
2214
|
"""
|
2183
2215
|
fetch data on a single open contract trade position
|
2184
|
-
|
2185
|
-
|
2216
|
+
|
2217
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20position%20data
|
2218
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20warehouse
|
2219
|
+
|
2186
2220
|
:param str symbol: unified market symbol of the market the position is held in
|
2187
2221
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2188
2222
|
:returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -2395,7 +2429,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2395
2429
|
|
2396
2430
|
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
2397
2431
|
"""
|
2398
|
-
|
2432
|
+
@ignore
|
2399
2433
|
helper function to build request
|
2400
2434
|
:param str symbol: unified symbol of the market to create an order in
|
2401
2435
|
:param str type: 'market' or 'limit'
|
@@ -2558,9 +2592,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
2558
2592
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
2559
2593
|
"""
|
2560
2594
|
create a trade order
|
2561
|
-
|
2562
|
-
|
2563
|
-
|
2595
|
+
|
2596
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Trade%20order
|
2597
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Create%20an%20Order
|
2598
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Trade%20order
|
2599
|
+
|
2564
2600
|
:param str symbol: unified symbol of the market to create an order in
|
2565
2601
|
:param str type: 'market' or 'limit'
|
2566
2602
|
:param str side: 'buy' or 'sell'
|
@@ -2674,8 +2710,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
2674
2710
|
async def create_orders(self, orders: List[OrderRequest], params={}):
|
2675
2711
|
"""
|
2676
2712
|
create a list of trade orders
|
2677
|
-
|
2678
|
-
|
2713
|
+
|
2714
|
+
https://bingx-api.github.io/docs/#/spot/trade-api.html#Batch%20Placing%20Orders
|
2715
|
+
https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Bulk%20order
|
2716
|
+
|
2679
2717
|
: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
|
2680
2718
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2681
2719
|
:param boolean [params.sync]: *spot only* if True, multiple orders are ordered serially and all orders do not require the same symbol/side/type
|
@@ -3169,9 +3207,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
3169
3207
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
3170
3208
|
"""
|
3171
3209
|
cancels an open order
|
3172
|
-
|
3173
|
-
|
3174
|
-
|
3210
|
+
|
3211
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20Order
|
3212
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20Order
|
3213
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Cancel%20an%20Order
|
3214
|
+
|
3175
3215
|
:param str id: order id
|
3176
3216
|
:param str symbol: unified symbol of the market the order was made in
|
3177
3217
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -3308,9 +3348,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
3308
3348
|
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
3309
3349
|
"""
|
3310
3350
|
cancel all open orders
|
3311
|
-
|
3312
|
-
|
3313
|
-
|
3351
|
+
|
3352
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20orders%20by%20symbol
|
3353
|
+
https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20All%20Orders
|
3354
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Cancel%20all%20orders
|
3355
|
+
|
3314
3356
|
:param str [symbol]: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
3315
3357
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3316
3358
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -3445,8 +3487,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
3445
3487
|
async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
|
3446
3488
|
"""
|
3447
3489
|
cancel multiple orders
|
3448
|
-
|
3449
|
-
|
3490
|
+
|
3491
|
+
https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20a%20Batch%20of%20Orders
|
3492
|
+
https://bingx-api.github.io/docs/#/spot/trade-api.html#Cancel%20a%20Batch%20of%20Orders
|
3493
|
+
|
3450
3494
|
:param str[] ids: order ids
|
3451
3495
|
:param str symbol: unified market symbol, default is None
|
3452
3496
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -3544,8 +3588,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
3544
3588
|
async def cancel_all_orders_after(self, timeout: Int, params={}):
|
3545
3589
|
"""
|
3546
3590
|
dead man's switch, cancel all orders after the given timeout
|
3547
|
-
|
3548
|
-
|
3591
|
+
|
3592
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20all%20orders%20in%20countdown
|
3593
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20all%20orders%20in%20countdown
|
3594
|
+
|
3549
3595
|
:param number timeout: time in milliseconds, 0 represents cancel the timer
|
3550
3596
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3551
3597
|
:param str [params.type]: spot or swap market
|
@@ -3582,9 +3628,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
3582
3628
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
3583
3629
|
"""
|
3584
3630
|
fetches information on an order made by the user
|
3585
|
-
|
3586
|
-
|
3587
|
-
|
3631
|
+
|
3632
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20details
|
3633
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20details
|
3634
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order
|
3635
|
+
|
3588
3636
|
:param str id: the order id
|
3589
3637
|
:param str symbol: unified symbol of the market the order was made in
|
3590
3638
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -3716,7 +3764,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
3716
3764
|
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
3717
3765
|
"""
|
3718
3766
|
fetches information on multiple orders made by the user
|
3719
|
-
|
3767
|
+
|
3768
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#User's%20All%20Orders
|
3769
|
+
|
3720
3770
|
:param str symbol: unified market symbol of the market orders were made in
|
3721
3771
|
:param int [since]: the earliest time in ms to fetch orders for
|
3722
3772
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -3804,9 +3854,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
3804
3854
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
3805
3855
|
"""
|
3806
3856
|
fetch all unfilled currently open orders
|
3807
|
-
|
3808
|
-
|
3809
|
-
|
3857
|
+
|
3858
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Current%20Open%20Orders
|
3859
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Current%20All%20Open%20Orders
|
3860
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20all%20current%20pending%20orders
|
3861
|
+
|
3810
3862
|
:param str symbol: unified market symbol
|
3811
3863
|
:param int [since]: the earliest time in ms to fetch open orders for
|
3812
3864
|
:param int [limit]: the maximum number of open order structures to retrieve
|
@@ -3947,10 +3999,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
3947
3999
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
3948
4000
|
"""
|
3949
4001
|
fetches information on multiple closed orders made by the user
|
3950
|
-
|
3951
|
-
|
3952
|
-
|
3953
|
-
|
4002
|
+
|
4003
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
|
4004
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
|
4005
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
|
4006
|
+
https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
|
4007
|
+
|
3954
4008
|
:param str symbol: unified market symbol of the closed orders
|
3955
4009
|
:param int [since]: timestamp in ms of the earliest order
|
3956
4010
|
:param int [limit]: the max number of closed orders to return
|
@@ -3966,10 +4020,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
3966
4020
|
async def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3967
4021
|
"""
|
3968
4022
|
fetches information on multiple canceled orders made by the user
|
3969
|
-
|
3970
|
-
|
3971
|
-
|
3972
|
-
|
4023
|
+
|
4024
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
|
4025
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
|
4026
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
|
4027
|
+
https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
|
4028
|
+
|
3973
4029
|
:param str symbol: unified market symbol of the canceled orders
|
3974
4030
|
:param int [since]: timestamp in ms of the earliest order
|
3975
4031
|
:param int [limit]: the max number of canceled orders to return
|
@@ -3985,10 +4041,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
3985
4041
|
async def fetch_canceled_and_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3986
4042
|
"""
|
3987
4043
|
fetches information on multiple closed orders made by the user
|
3988
|
-
|
3989
|
-
|
3990
|
-
|
3991
|
-
|
4044
|
+
|
4045
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
|
4046
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
|
4047
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
|
4048
|
+
https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
|
4049
|
+
|
3992
4050
|
:param str [symbol]: unified market symbol of the market orders were made in
|
3993
4051
|
:param int [since]: the earliest time in ms to fetch orders for
|
3994
4052
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -4132,7 +4190,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
4132
4190
|
async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
4133
4191
|
"""
|
4134
4192
|
transfer currency internally between wallets on the same account
|
4135
|
-
|
4193
|
+
|
4194
|
+
https://bingx-api.github.io/docs/#/spot/account-api.html#User%20Universal%20Transfer
|
4195
|
+
|
4136
4196
|
:param str code: unified currency code
|
4137
4197
|
:param float amount: amount to transfer
|
4138
4198
|
:param str fromAccount: account to transfer from
|
@@ -4171,7 +4231,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
4171
4231
|
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
4172
4232
|
"""
|
4173
4233
|
fetch a history of internal transfers made on an account
|
4174
|
-
|
4234
|
+
|
4235
|
+
https://bingx-api.github.io/docs/#/spot/account-api.html#Query%20User%20Universal%20Transfer%20History%20(USER_DATA)
|
4236
|
+
|
4175
4237
|
:param str [code]: unified currency code of the currency transferred
|
4176
4238
|
:param int [since]: the earliest time in ms to fetch transfers for
|
4177
4239
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
@@ -4242,7 +4304,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
4242
4304
|
async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
4243
4305
|
"""
|
4244
4306
|
fetch the deposit addresses for a currency associated with self account
|
4245
|
-
|
4307
|
+
|
4308
|
+
https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
|
4309
|
+
|
4246
4310
|
:param str code: unified currency code
|
4247
4311
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4248
4312
|
:returns dict: a dictionary `address structures <https://docs.ccxt.com/#/?id=address-structure>`, indexed by the network
|
@@ -4283,7 +4347,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
4283
4347
|
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
4284
4348
|
"""
|
4285
4349
|
fetch the deposit address for a currency associated with self account
|
4286
|
-
|
4350
|
+
|
4351
|
+
https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
|
4352
|
+
|
4287
4353
|
:param str code: unified currency code
|
4288
4354
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4289
4355
|
:param str [params.network]: The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency
|
@@ -4333,7 +4399,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
4333
4399
|
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
4334
4400
|
"""
|
4335
4401
|
fetch all deposits made to an account
|
4336
|
-
|
4402
|
+
|
4403
|
+
https://bingx-api.github.io/docs/#/spot/account-api.html#Deposit%20History(supporting%20network)
|
4404
|
+
|
4337
4405
|
:param str [code]: unified currency code
|
4338
4406
|
:param int [since]: the earliest time in ms to fetch deposits for
|
4339
4407
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -4374,7 +4442,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
4374
4442
|
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
4375
4443
|
"""
|
4376
4444
|
fetch all withdrawals made from an account
|
4377
|
-
|
4445
|
+
|
4446
|
+
https://bingx-api.github.io/docs/#/spot/account-api.html#Withdraw%20History%20(supporting%20network)
|
4447
|
+
|
4378
4448
|
:param str [code]: unified currency code
|
4379
4449
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
4380
4450
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -4529,8 +4599,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
4529
4599
|
async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
4530
4600
|
"""
|
4531
4601
|
set margin mode to 'cross' or 'isolated'
|
4532
|
-
|
4533
|
-
|
4602
|
+
|
4603
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Change%20Margin%20Type
|
4604
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Set%20Margin%20Type
|
4605
|
+
|
4534
4606
|
:param str marginMode: 'cross' or 'isolated'
|
4535
4607
|
:param str symbol: unified market symbol
|
4536
4608
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -4573,7 +4645,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
4573
4645
|
async def set_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
4574
4646
|
"""
|
4575
4647
|
Either adds or reduces margin in an isolated position in order to set the margin to a specific value
|
4576
|
-
|
4648
|
+
|
4649
|
+
https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Adjust%20isolated%20margin
|
4650
|
+
|
4577
4651
|
:param str symbol: unified market symbol of the market to set margin in
|
4578
4652
|
:param float amount: the amount to set the margin to
|
4579
4653
|
:param dict [params]: parameters specific to the bingx api endpoint
|
@@ -4628,8 +4702,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
4628
4702
|
async def fetch_leverage(self, symbol: str, params={}) -> Leverage:
|
4629
4703
|
"""
|
4630
4704
|
fetch the set leverage for a market
|
4631
|
-
|
4632
|
-
|
4705
|
+
|
4706
|
+
https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20Leverage
|
4707
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Leverage
|
4708
|
+
|
4633
4709
|
:param str symbol: unified market symbol
|
4634
4710
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4635
4711
|
:returns dict: a `leverage structure <https://docs.ccxt.com/#/?id=leverage-structure>`
|
@@ -4722,8 +4798,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
4722
4798
|
async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
4723
4799
|
"""
|
4724
4800
|
set the level of leverage for a market
|
4725
|
-
|
4726
|
-
|
4801
|
+
|
4802
|
+
https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Switch%20Leverage
|
4803
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Modify%20Leverage
|
4804
|
+
|
4727
4805
|
:param float leverage: the rate of leverage
|
4728
4806
|
:param str symbol: unified market symbol
|
4729
4807
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -4781,9 +4859,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
4781
4859
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4782
4860
|
"""
|
4783
4861
|
fetch all trades made by the user
|
4784
|
-
|
4785
|
-
|
4786
|
-
|
4862
|
+
|
4863
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20transaction%20details
|
4864
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20orders
|
4865
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order%20Trade%20Detail
|
4866
|
+
|
4787
4867
|
:param str [symbol]: unified market symbol
|
4788
4868
|
:param int [since]: the earliest time in ms to fetch trades for
|
4789
4869
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -4968,7 +5048,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
4968
5048
|
async def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
|
4969
5049
|
"""
|
4970
5050
|
fetch deposit and withdraw fees
|
4971
|
-
|
5051
|
+
|
5052
|
+
https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins'%20Information
|
5053
|
+
|
4972
5054
|
:param str[]|None codes: list of unified currency codes
|
4973
5055
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4974
5056
|
:returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -4981,7 +5063,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
4981
5063
|
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4982
5064
|
"""
|
4983
5065
|
make a withdrawal
|
4984
|
-
|
5066
|
+
|
5067
|
+
https://bingx-api.github.io/docs/#/en-us/spot/wallet-api.html#Withdraw
|
5068
|
+
|
4985
5069
|
:param str code: unified currency code
|
4986
5070
|
:param float amount: the amount to withdraw
|
4987
5071
|
:param str address: the address to withdraw to
|
@@ -5042,8 +5126,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
5042
5126
|
async def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5043
5127
|
"""
|
5044
5128
|
retrieves the users liquidated positions
|
5045
|
-
|
5046
|
-
|
5129
|
+
|
5130
|
+
https://bingx-api.github.io/docs/#/swapV2/trade-api.html#User's%20Force%20Orders
|
5131
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20force%20orders
|
5132
|
+
|
5047
5133
|
:param str [symbol]: unified CCXT market symbol
|
5048
5134
|
:param int [since]: the earliest time in ms to fetch liquidations for
|
5049
5135
|
:param int [limit]: the maximum number of liquidation structures to retrieve
|
@@ -5177,8 +5263,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
5177
5263
|
async def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
|
5178
5264
|
"""
|
5179
5265
|
closes open positions for a market
|
5180
|
-
|
5181
|
-
|
5266
|
+
|
5267
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
|
5268
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Close%20all%20positions%20in%20bulk
|
5269
|
+
|
5182
5270
|
:param str symbol: Unified CCXT market symbol
|
5183
5271
|
:param str [side]: not used by bingx
|
5184
5272
|
:param dict [params]: extra parameters specific to the bingx api endpoint
|
@@ -5243,8 +5331,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
5243
5331
|
async def close_all_positions(self, params={}) -> List[Position]:
|
5244
5332
|
"""
|
5245
5333
|
closes open positions for a market
|
5246
|
-
|
5247
|
-
|
5334
|
+
|
5335
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
|
5336
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Close%20all%20positions%20in%20bulk
|
5337
|
+
|
5248
5338
|
:param dict [params]: extra parameters specific to the bingx api endpoint
|
5249
5339
|
:param str [params.recvWindow]: request valid time window value
|
5250
5340
|
:returns dict[]: `a list of position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -5301,7 +5391,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
5301
5391
|
async def fetch_position_mode(self, symbol: Str = None, params={}):
|
5302
5392
|
"""
|
5303
5393
|
fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
|
5304
|
-
|
5394
|
+
|
5395
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Get%20Position%20Mode
|
5396
|
+
|
5305
5397
|
:param str symbol: unified symbol of the market to fetch the order book for
|
5306
5398
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5307
5399
|
:returns dict: an object detailing whether the market is in hedged or one-way mode
|
@@ -5327,7 +5419,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
5327
5419
|
async def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
|
5328
5420
|
"""
|
5329
5421
|
set hedged to True or False for a market
|
5330
|
-
|
5422
|
+
|
5423
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
|
5424
|
+
|
5331
5425
|
:param bool hedged: set to True to use dualSidePosition
|
5332
5426
|
:param str symbol: not used by bingx setPositionMode()
|
5333
5427
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -5354,8 +5448,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
5354
5448
|
async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}) -> Order:
|
5355
5449
|
"""
|
5356
5450
|
cancels an order and places a new order
|
5357
|
-
|
5358
|
-
|
5451
|
+
|
5452
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20order%20and%20place%20a%20new%20order # spot
|
5453
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20an%20order%20and%20then%20Place%20a%20new%20order # swap
|
5454
|
+
|
5359
5455
|
:param str id: order id
|
5360
5456
|
:param str symbol: unified symbol of the market to create an order in
|
5361
5457
|
:param str type: 'market' or 'limit'
|
@@ -5368,8 +5464,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
5368
5464
|
:param float [params.takeProfit.triggerPrice]: take profit trigger price
|
5369
5465
|
:param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
5370
5466
|
:param float [params.stopLoss.triggerPrice]: stop loss trigger price
|
5371
|
-
|
5372
|
-
|
5467
|
+
|
5468
|
+
EXCHANGE SPECIFIC PARAMETERS
|
5373
5469
|
:param str [params.cancelClientOrderID]: the user-defined id of the order to be canceled, 1-40 characters, different orders cannot use the same clientOrderID, only supports a query range of 2 hours
|
5374
5470
|
:param str [params.cancelRestrictions]: cancel orders with specified status, NEW: New order, PENDING: Pending order, PARTIALLY_FILLED: Partially filled
|
5375
5471
|
:param str [params.cancelReplaceMode]: STOP_ON_FAILURE - if the cancel order fails, it will not continue to place a new order, ALLOW_FAILURE - regardless of whether the cancel order succeeds or fails, it will continue to place a new order
|
@@ -5488,8 +5584,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
5488
5584
|
async def fetch_margin_mode(self, symbol: str, params={}) -> MarginMode:
|
5489
5585
|
"""
|
5490
5586
|
fetches the margin mode of the trading pair
|
5491
|
-
|
5492
|
-
|
5587
|
+
|
5588
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Margin%20Type
|
5589
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Margin%20Type
|
5590
|
+
|
5493
5591
|
:param str symbol: unified symbol of the market to fetch the margin mode for
|
5494
5592
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5495
5593
|
:returns dict: a `margin mode structure <https://docs.ccxt.com/#/?id=margin-mode-structure>`
|
@@ -5542,9 +5640,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
5542
5640
|
async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
5543
5641
|
"""
|
5544
5642
|
fetch the trading fees for a market
|
5545
|
-
|
5546
|
-
|
5547
|
-
|
5643
|
+
|
5644
|
+
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Trading%20Commission%20Rate
|
5645
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20Trading%20Commission%20Rate
|
5646
|
+
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Trade%20Commission%20Rate
|
5647
|
+
|
5548
5648
|
:param str symbol: unified market symbol
|
5549
5649
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5550
5650
|
:returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
|