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/bitget.py
CHANGED
@@ -1527,7 +1527,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
1527
1527
|
def fetch_time(self, params={}):
|
1528
1528
|
"""
|
1529
1529
|
fetches the current integer timestamp in milliseconds from the exchange server
|
1530
|
-
|
1530
|
+
|
1531
|
+
https://www.bitget.com/api-doc/common/public/Get-Server-Time
|
1532
|
+
|
1531
1533
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1532
1534
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
1533
1535
|
"""
|
@@ -1548,9 +1550,11 @@ class bitget(Exchange, ImplicitAPI):
|
|
1548
1550
|
def fetch_markets(self, params={}) -> List[Market]:
|
1549
1551
|
"""
|
1550
1552
|
retrieves data on all markets for bitget
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1553
|
+
|
1554
|
+
https://www.bitget.com/api-doc/spot/market/Get-Symbols
|
1555
|
+
https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
|
1556
|
+
https://www.bitget.com/api-doc/margin/common/support-currencies
|
1557
|
+
|
1554
1558
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1555
1559
|
:returns dict[]: an array of objects representing market data
|
1556
1560
|
"""
|
@@ -1803,7 +1807,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
1803
1807
|
def fetch_currencies(self, params={}) -> Currencies:
|
1804
1808
|
"""
|
1805
1809
|
fetches all available currencies on an exchange
|
1806
|
-
|
1810
|
+
|
1811
|
+
https://www.bitget.com/api-doc/spot/market/Get-Coin-List
|
1812
|
+
|
1807
1813
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1808
1814
|
:returns dict: an associative dictionary of currencies
|
1809
1815
|
"""
|
@@ -1924,9 +1930,11 @@ class bitget(Exchange, ImplicitAPI):
|
|
1924
1930
|
def fetch_market_leverage_tiers(self, symbol: str, params={}) -> List[LeverageTier]:
|
1925
1931
|
"""
|
1926
1932
|
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1933
|
+
|
1934
|
+
https://www.bitget.com/api-doc/contract/position/Get-Query-Position-Lever
|
1935
|
+
https://www.bitget.com/api-doc/margin/cross/account/Cross-Tier-Data
|
1936
|
+
https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Tier-Data
|
1937
|
+
|
1930
1938
|
:param str symbol: unified market symbol
|
1931
1939
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1932
1940
|
:param str [params.marginMode]: for spot margin 'cross' or 'isolated', default is 'isolated'
|
@@ -2072,8 +2080,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
2072
2080
|
maxNotional = self.safe_number_n(item, ['endUnit', 'maxBorrowableAmount', 'baseMaxBorrowableAmount'])
|
2073
2081
|
marginCurrency = self.safe_string_2(item, 'coin', 'baseCoin')
|
2074
2082
|
currencyId = marginCurrency if (marginCurrency is not None) else market['base']
|
2083
|
+
marketId = self.safe_string(item, 'symbol')
|
2075
2084
|
tiers.append({
|
2076
2085
|
'tier': self.safe_integer_2(item, 'level', 'tier'),
|
2086
|
+
'symbol': self.safe_symbol(marketId, market),
|
2077
2087
|
'currency': self.safe_currency_code(currencyId),
|
2078
2088
|
'minNotional': minNotional,
|
2079
2089
|
'maxNotional': maxNotional,
|
@@ -2087,7 +2097,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
2087
2097
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2088
2098
|
"""
|
2089
2099
|
fetch all deposits made to an account
|
2090
|
-
|
2100
|
+
|
2101
|
+
https://www.bitget.com/api-doc/spot/account/Get-Deposit-Record
|
2102
|
+
|
2091
2103
|
:param str code: unified currency code
|
2092
2104
|
:param int [since]: the earliest time in ms to fetch deposits for
|
2093
2105
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -2145,7 +2157,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
2145
2157
|
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2146
2158
|
"""
|
2147
2159
|
make a withdrawal
|
2148
|
-
|
2160
|
+
|
2161
|
+
https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
|
2162
|
+
|
2149
2163
|
:param str code: unified currency code
|
2150
2164
|
:param float amount: the amount to withdraw
|
2151
2165
|
:param str address: the address to withdraw to
|
@@ -2221,7 +2235,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
2221
2235
|
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2222
2236
|
"""
|
2223
2237
|
fetch all withdrawals made from an account
|
2224
|
-
|
2238
|
+
|
2239
|
+
https://www.bitget.com/api-doc/spot/account/Get-Withdraw-Record
|
2240
|
+
|
2225
2241
|
:param str code: unified currency code
|
2226
2242
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
2227
2243
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -2367,7 +2383,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
2367
2383
|
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2368
2384
|
"""
|
2369
2385
|
fetch the deposit address for a currency associated with self account
|
2370
|
-
|
2386
|
+
|
2387
|
+
https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address
|
2388
|
+
|
2371
2389
|
:param str code: unified currency code
|
2372
2390
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2373
2391
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -2429,8 +2447,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
2429
2447
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
2430
2448
|
"""
|
2431
2449
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
2432
|
-
|
2433
|
-
|
2450
|
+
|
2451
|
+
https://www.bitget.com/api-doc/spot/market/Get-Orderbook
|
2452
|
+
https://www.bitget.com/api-doc/contract/market/Get-Merge-Depth
|
2453
|
+
|
2434
2454
|
:param str symbol: unified symbol of the market to fetch the order book for
|
2435
2455
|
:param int [limit]: the maximum amount of order book entries to return
|
2436
2456
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -2594,8 +2614,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
2594
2614
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
2595
2615
|
"""
|
2596
2616
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
2597
|
-
|
2598
|
-
|
2617
|
+
|
2618
|
+
https://www.bitget.com/api-doc/spot/market/Get-Tickers
|
2619
|
+
https://www.bitget.com/api-doc/contract/market/Get-Ticker
|
2620
|
+
|
2599
2621
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
2600
2622
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2601
2623
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -2688,7 +2710,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
2688
2710
|
def fetch_mark_price(self, symbol: str, params={}) -> Ticker:
|
2689
2711
|
"""
|
2690
2712
|
fetches the mark price for a specific market
|
2691
|
-
|
2713
|
+
|
2714
|
+
https://www.bitget.com/api-doc/contract/market/Get-Symbol-Price
|
2715
|
+
|
2692
2716
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
2693
2717
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2694
2718
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -2718,8 +2742,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
2718
2742
|
def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
2719
2743
|
"""
|
2720
2744
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
2721
|
-
|
2722
|
-
|
2745
|
+
|
2746
|
+
https://www.bitget.com/api-doc/spot/market/Get-Tickers
|
2747
|
+
https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
|
2748
|
+
|
2723
2749
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
2724
2750
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2725
2751
|
:param str [params.subType]: *contract only* 'linear', 'inverse'
|
@@ -2932,10 +2958,12 @@ class bitget(Exchange, ImplicitAPI):
|
|
2932
2958
|
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
2933
2959
|
"""
|
2934
2960
|
get the list of most recent trades for a particular symbol
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
|
2961
|
+
|
2962
|
+
https://www.bitget.com/api-doc/spot/market/Get-Recent-Trades
|
2963
|
+
https://www.bitget.com/api-doc/spot/market/Get-Market-Trades
|
2964
|
+
https://www.bitget.com/api-doc/contract/market/Get-Recent-Fills
|
2965
|
+
https://www.bitget.com/api-doc/contract/market/Get-Fills-History
|
2966
|
+
|
2939
2967
|
:param str symbol: unified symbol of the market to fetch trades for
|
2940
2968
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
2941
2969
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -3036,7 +3064,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
3036
3064
|
def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
3037
3065
|
"""
|
3038
3066
|
fetch the trading fees for a market
|
3039
|
-
|
3067
|
+
|
3068
|
+
https://www.bitget.com/api-doc/common/public/Get-Trade-Rate
|
3069
|
+
|
3040
3070
|
:param str symbol: unified market symbol
|
3041
3071
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3042
3072
|
:param str [params.marginMode]: 'isolated' or 'cross', for finding the fee rate of spot margin trading pairs
|
@@ -3074,9 +3104,11 @@ class bitget(Exchange, ImplicitAPI):
|
|
3074
3104
|
def fetch_trading_fees(self, params={}) -> TradingFees:
|
3075
3105
|
"""
|
3076
3106
|
fetch the trading fees for multiple markets
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3107
|
+
|
3108
|
+
https://www.bitget.com/api-doc/spot/market/Get-Symbols
|
3109
|
+
https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
|
3110
|
+
https://www.bitget.com/api-doc/margin/common/support-currencies
|
3111
|
+
|
3080
3112
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3081
3113
|
:param str [params.productType]: *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
3082
3114
|
:param boolean [params.margin]: set to True for spot margin
|
@@ -3219,12 +3251,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
3219
3251
|
def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
3220
3252
|
"""
|
3221
3253
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3254
|
+
|
3255
|
+
https://www.bitget.com/api-doc/spot/market/Get-Candle-Data
|
3256
|
+
https://www.bitget.com/api-doc/spot/market/Get-History-Candle-Data
|
3257
|
+
https://www.bitget.com/api-doc/contract/market/Get-Candle-Data
|
3258
|
+
https://www.bitget.com/api-doc/contract/market/Get-History-Candle-Data
|
3259
|
+
https://www.bitget.com/api-doc/contract/market/Get-History-Index-Candle-Data
|
3260
|
+
https://www.bitget.com/api-doc/contract/market/Get-History-Mark-Candle-Data
|
3261
|
+
|
3228
3262
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
3229
3263
|
:param str timeframe: the length of time each candle represents
|
3230
3264
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -3339,12 +3373,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
3339
3373
|
def fetch_balance(self, params={}) -> Balances:
|
3340
3374
|
"""
|
3341
3375
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
3342
|
-
|
3343
|
-
|
3344
|
-
|
3345
|
-
|
3346
|
-
|
3347
|
-
|
3376
|
+
|
3377
|
+
https://www.bitget.com/api-doc/spot/account/Get-Account-Assets
|
3378
|
+
https://www.bitget.com/api-doc/contract/account/Get-Account-List
|
3379
|
+
https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Assets
|
3380
|
+
https://www.bitget.com/api-doc/margin/isolated/account/Get-Isolated-Assets
|
3381
|
+
https://bitgetlimited.github.io/apidoc/en/margin/#get-cross-assets
|
3382
|
+
https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-assets
|
3383
|
+
|
3348
3384
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3349
3385
|
:param str [params.productType]: *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
3350
3386
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
@@ -3945,9 +3981,11 @@ class bitget(Exchange, ImplicitAPI):
|
|
3945
3981
|
def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
3946
3982
|
"""
|
3947
3983
|
create a market buy order by providing the symbol and cost
|
3948
|
-
|
3949
|
-
|
3950
|
-
|
3984
|
+
|
3985
|
+
https://www.bitget.com/api-doc/spot/trade/Place-Order
|
3986
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
|
3987
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
|
3988
|
+
|
3951
3989
|
:param str symbol: unified symbol of the market to create an order in
|
3952
3990
|
:param float cost: how much you want to trade in units of the quote currency
|
3953
3991
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -3963,13 +4001,15 @@ class bitget(Exchange, ImplicitAPI):
|
|
3963
4001
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
3964
4002
|
"""
|
3965
4003
|
create a trade order
|
3966
|
-
|
3967
|
-
|
3968
|
-
|
3969
|
-
|
3970
|
-
|
3971
|
-
|
3972
|
-
|
4004
|
+
|
4005
|
+
https://www.bitget.com/api-doc/spot/trade/Place-Order
|
4006
|
+
https://www.bitget.com/api-doc/spot/plan/Place-Plan-Order
|
4007
|
+
https://www.bitget.com/api-doc/contract/trade/Place-Order
|
4008
|
+
https://www.bitget.com/api-doc/contract/plan/Place-Tpsl-Order
|
4009
|
+
https://www.bitget.com/api-doc/contract/plan/Place-Plan-Order
|
4010
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
|
4011
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
|
4012
|
+
|
3973
4013
|
:param str symbol: unified symbol of the market to create an order in
|
3974
4014
|
:param str type: 'market' or 'limit'
|
3975
4015
|
:param str side: 'buy' or 'sell'
|
@@ -4227,10 +4267,12 @@ class bitget(Exchange, ImplicitAPI):
|
|
4227
4267
|
def create_orders(self, orders: List[OrderRequest], params={}):
|
4228
4268
|
"""
|
4229
4269
|
create a list of trade orders(all orders should be of the same symbol)
|
4230
|
-
|
4231
|
-
|
4232
|
-
|
4233
|
-
|
4270
|
+
|
4271
|
+
https://www.bitget.com/api-doc/spot/trade/Batch-Place-Orders
|
4272
|
+
https://www.bitget.com/api-doc/contract/trade/Batch-Order
|
4273
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Order
|
4274
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Order
|
4275
|
+
|
4234
4276
|
: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
|
4235
4277
|
:param dict [params]: extra parameters specific to the api endpoint
|
4236
4278
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -4322,10 +4364,12 @@ class bitget(Exchange, ImplicitAPI):
|
|
4322
4364
|
def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
|
4323
4365
|
"""
|
4324
4366
|
edit a trade order
|
4325
|
-
|
4326
|
-
|
4327
|
-
|
4328
|
-
|
4367
|
+
|
4368
|
+
https://www.bitget.com/api-doc/spot/plan/Modify-Plan-Order
|
4369
|
+
https://www.bitget.com/api-doc/contract/trade/Modify-Order
|
4370
|
+
https://www.bitget.com/api-doc/contract/plan/Modify-Tpsl-Order
|
4371
|
+
https://www.bitget.com/api-doc/contract/plan/Modify-Plan-Order
|
4372
|
+
|
4329
4373
|
:param str id: cancel order id
|
4330
4374
|
:param str symbol: unified symbol of the market to create an order in
|
4331
4375
|
:param str type: 'market' or 'limit'
|
@@ -4472,12 +4516,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
4472
4516
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
4473
4517
|
"""
|
4474
4518
|
cancels an open order
|
4475
|
-
|
4476
|
-
|
4477
|
-
|
4478
|
-
|
4479
|
-
|
4480
|
-
|
4519
|
+
|
4520
|
+
https://www.bitget.com/api-doc/spot/trade/Cancel-Order
|
4521
|
+
https://www.bitget.com/api-doc/spot/plan/Cancel-Plan-Order
|
4522
|
+
https://www.bitget.com/api-doc/contract/trade/Cancel-Order
|
4523
|
+
https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
|
4524
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Cross-Cancel-Order
|
4525
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Cancel-Order
|
4526
|
+
|
4481
4527
|
:param str id: order id
|
4482
4528
|
:param str symbol: unified symbol of the market the order was made in
|
4483
4529
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -4593,11 +4639,13 @@ class bitget(Exchange, ImplicitAPI):
|
|
4593
4639
|
def cancel_orders(self, ids, symbol: Str = None, params={}):
|
4594
4640
|
"""
|
4595
4641
|
cancel multiple orders
|
4596
|
-
|
4597
|
-
|
4598
|
-
|
4599
|
-
|
4600
|
-
|
4642
|
+
|
4643
|
+
https://www.bitget.com/api-doc/spot/trade/Batch-Cancel-Orders
|
4644
|
+
https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
|
4645
|
+
https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
|
4646
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Cancel-Order
|
4647
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Cancel-Orders
|
4648
|
+
|
4601
4649
|
:param str[] ids: order ids
|
4602
4650
|
:param str symbol: unified market symbol, default is None
|
4603
4651
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -4673,11 +4721,13 @@ class bitget(Exchange, ImplicitAPI):
|
|
4673
4721
|
def cancel_all_orders(self, symbol: Str = None, params={}):
|
4674
4722
|
"""
|
4675
4723
|
cancel all open orders
|
4676
|
-
|
4677
|
-
|
4678
|
-
|
4679
|
-
|
4680
|
-
|
4724
|
+
|
4725
|
+
https://www.bitget.com/api-doc/spot/trade/Cancel-Symbol-Orders
|
4726
|
+
https://www.bitget.com/api-doc/spot/plan/Batch-Cancel-Plan-Order
|
4727
|
+
https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
|
4728
|
+
https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
|
4729
|
+
https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
|
4730
|
+
|
4681
4731
|
:param str symbol: unified market symbol
|
4682
4732
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4683
4733
|
:param str [params.marginMode]: 'isolated' or 'cross' for spot margin trading
|
@@ -4784,8 +4834,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
4784
4834
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
4785
4835
|
"""
|
4786
4836
|
fetches information on an order made by the user
|
4787
|
-
|
4788
|
-
|
4837
|
+
|
4838
|
+
https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
|
4839
|
+
https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
|
4840
|
+
|
4789
4841
|
:param str id: the order id
|
4790
4842
|
:param str symbol: unified symbol of the market the order was made in
|
4791
4843
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -4897,12 +4949,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
4897
4949
|
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
4898
4950
|
"""
|
4899
4951
|
fetch all unfilled currently open orders
|
4900
|
-
|
4901
|
-
|
4902
|
-
|
4903
|
-
|
4904
|
-
|
4905
|
-
|
4952
|
+
|
4953
|
+
https://www.bitget.com/api-doc/spot/trade/Get-Unfilled-Orders
|
4954
|
+
https://www.bitget.com/api-doc/spot/plan/Get-Current-Plan-Order
|
4955
|
+
https://www.bitget.com/api-doc/contract/trade/Get-Orders-Pending
|
4956
|
+
https://www.bitget.com/api-doc/contract/plan/get-orders-plan-pending
|
4957
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Open-Orders
|
4958
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Open-Orders
|
4959
|
+
|
4906
4960
|
:param str symbol: unified market symbol
|
4907
4961
|
:param int [since]: the earliest time in ms to fetch open orders for
|
4908
4962
|
:param int [limit]: the maximum number of open order structures to retrieve
|
@@ -5179,12 +5233,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
5179
5233
|
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
5180
5234
|
"""
|
5181
5235
|
fetches information on multiple closed orders made by the user
|
5182
|
-
|
5183
|
-
|
5184
|
-
|
5185
|
-
|
5186
|
-
|
5187
|
-
|
5236
|
+
|
5237
|
+
https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
|
5238
|
+
https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
|
5239
|
+
https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
|
5240
|
+
https://www.bitget.com/api-doc/contract/plan/orders-plan-history
|
5241
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
|
5242
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
|
5243
|
+
|
5188
5244
|
:param str symbol: unified market symbol of the closed orders
|
5189
5245
|
:param int [since]: timestamp in ms of the earliest order
|
5190
5246
|
:param int [limit]: the max number of closed orders to return
|
@@ -5203,12 +5259,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
5203
5259
|
def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5204
5260
|
"""
|
5205
5261
|
fetches information on multiple canceled orders made by the user
|
5206
|
-
|
5207
|
-
|
5208
|
-
|
5209
|
-
|
5210
|
-
|
5211
|
-
|
5262
|
+
|
5263
|
+
https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
|
5264
|
+
https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
|
5265
|
+
https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
|
5266
|
+
https://www.bitget.com/api-doc/contract/plan/orders-plan-history
|
5267
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
|
5268
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
|
5269
|
+
|
5212
5270
|
:param str symbol: unified market symbol of the canceled orders
|
5213
5271
|
:param int [since]: timestamp in ms of the earliest order
|
5214
5272
|
:param int [limit]: the max number of canceled orders to return
|
@@ -5226,12 +5284,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
5226
5284
|
|
5227
5285
|
def fetch_canceled_and_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5228
5286
|
"""
|
5229
|
-
|
5230
|
-
|
5231
|
-
|
5232
|
-
|
5233
|
-
|
5234
|
-
|
5287
|
+
|
5288
|
+
https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
|
5289
|
+
https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
|
5290
|
+
https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
|
5291
|
+
https://www.bitget.com/api-doc/contract/plan/orders-plan-history
|
5292
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
|
5293
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
|
5294
|
+
|
5235
5295
|
fetches information on multiple canceled and closed orders made by the user
|
5236
5296
|
:param str symbol: unified market symbol of the market orders were made in
|
5237
5297
|
:param int [since]: the earliest time in ms to fetch orders for
|
@@ -5508,8 +5568,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
5508
5568
|
def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
|
5509
5569
|
"""
|
5510
5570
|
fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
5511
|
-
|
5512
|
-
|
5571
|
+
|
5572
|
+
https://www.bitget.com/api-doc/spot/account/Get-Account-Bills
|
5573
|
+
https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
|
5574
|
+
|
5513
5575
|
:param str [code]: unified currency code, default is None
|
5514
5576
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
5515
5577
|
:param int [limit]: max number of ledger entries to return, default is None
|
@@ -5718,10 +5780,12 @@ class bitget(Exchange, ImplicitAPI):
|
|
5718
5780
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
5719
5781
|
"""
|
5720
5782
|
fetch all trades made by the user
|
5721
|
-
|
5722
|
-
|
5723
|
-
|
5724
|
-
|
5783
|
+
|
5784
|
+
https://www.bitget.com/api-doc/spot/trade/Get-Fills
|
5785
|
+
https://www.bitget.com/api-doc/contract/trade/Get-Order-Fills
|
5786
|
+
https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-Fills
|
5787
|
+
https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Transaction-Details
|
5788
|
+
|
5725
5789
|
:param str symbol: unified market symbol
|
5726
5790
|
:param int [since]: the earliest time in ms to fetch trades for
|
5727
5791
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -5887,7 +5951,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
5887
5951
|
def fetch_position(self, symbol: str, params={}):
|
5888
5952
|
"""
|
5889
5953
|
fetch data on a single open contract trade position
|
5890
|
-
|
5954
|
+
|
5955
|
+
https://www.bitget.com/api-doc/contract/position/get-single-position
|
5956
|
+
|
5891
5957
|
:param str symbol: unified market symbol of the market the position is held in
|
5892
5958
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5893
5959
|
:returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -5945,8 +6011,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
5945
6011
|
def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
|
5946
6012
|
"""
|
5947
6013
|
fetch all open positions
|
5948
|
-
|
5949
|
-
|
6014
|
+
|
6015
|
+
https://www.bitget.com/api-doc/contract/position/get-all-position
|
6016
|
+
https://www.bitget.com/api-doc/contract/position/Get-History-Position
|
6017
|
+
|
5950
6018
|
:param str[] [symbols]: list of unified market symbols
|
5951
6019
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5952
6020
|
:param str [params.marginCoin]: the settle currency of the positions, needs to match the productType
|
@@ -6245,7 +6313,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6245
6313
|
def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6246
6314
|
"""
|
6247
6315
|
fetches historical funding rate prices
|
6248
|
-
|
6316
|
+
|
6317
|
+
https://www.bitget.com/api-doc/contract/market/Get-History-Funding-Rate
|
6318
|
+
|
6249
6319
|
:param str symbol: unified symbol of the market to fetch the funding rate history for
|
6250
6320
|
:param int [since]: timestamp in ms of the earliest funding rate to fetch
|
6251
6321
|
:param int [limit]: the maximum amount of funding rate structures to fetch
|
@@ -6312,7 +6382,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6312
6382
|
def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
6313
6383
|
"""
|
6314
6384
|
fetch the current funding rate
|
6315
|
-
|
6385
|
+
|
6386
|
+
https://www.bitget.com/api-doc/contract/market/Get-Current-Funding-Rate
|
6387
|
+
|
6316
6388
|
:param str symbol: unified market symbol
|
6317
6389
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
6318
6390
|
:returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
|
@@ -6353,7 +6425,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6353
6425
|
def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
|
6354
6426
|
"""
|
6355
6427
|
fetch the current funding rates for all markets
|
6356
|
-
|
6428
|
+
|
6429
|
+
https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
|
6430
|
+
|
6357
6431
|
:param str[] [symbols]: list of unified market symbols
|
6358
6432
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
6359
6433
|
:param str [params.subType]: *contract only* 'linear', 'inverse'
|
@@ -6486,7 +6560,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6486
6560
|
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[FundingHistory]:
|
6487
6561
|
"""
|
6488
6562
|
fetch the funding history
|
6489
|
-
|
6563
|
+
|
6564
|
+
https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
|
6565
|
+
|
6490
6566
|
:param str symbol: unified market symbol
|
6491
6567
|
:param int [since]: the starting timestamp in milliseconds
|
6492
6568
|
:param int [limit]: the number of entries to return
|
@@ -6651,7 +6727,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6651
6727
|
def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
6652
6728
|
"""
|
6653
6729
|
remove margin from a position
|
6654
|
-
|
6730
|
+
|
6731
|
+
https://www.bitget.com/api-doc/contract/account/Change-Margin
|
6732
|
+
|
6655
6733
|
:param str symbol: unified market symbol
|
6656
6734
|
:param float amount: the amount of margin to remove
|
6657
6735
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6667,7 +6745,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6667
6745
|
def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
6668
6746
|
"""
|
6669
6747
|
add margin
|
6670
|
-
|
6748
|
+
|
6749
|
+
https://www.bitget.com/api-doc/contract/account/Change-Margin
|
6750
|
+
|
6671
6751
|
:param str symbol: unified market symbol
|
6672
6752
|
:param float amount: the amount of margin to add
|
6673
6753
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6681,7 +6761,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6681
6761
|
def fetch_leverage(self, symbol: str, params={}) -> Leverage:
|
6682
6762
|
"""
|
6683
6763
|
fetch the set leverage for a market
|
6684
|
-
|
6764
|
+
|
6765
|
+
https://www.bitget.com/api-doc/contract/account/Get-Single-Account
|
6766
|
+
|
6685
6767
|
:param str symbol: unified market symbol
|
6686
6768
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
6687
6769
|
:returns dict: a `leverage structure <https://docs.ccxt.com/#/?id=leverage-structure>`
|
@@ -6745,7 +6827,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6745
6827
|
def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
6746
6828
|
"""
|
6747
6829
|
set the level of leverage for a market
|
6748
|
-
|
6830
|
+
|
6831
|
+
https://www.bitget.com/api-doc/contract/account/Change-Leverage
|
6832
|
+
|
6749
6833
|
:param int leverage: the rate of leverage
|
6750
6834
|
:param str symbol: unified market symbol
|
6751
6835
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6792,7 +6876,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6792
6876
|
def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
6793
6877
|
"""
|
6794
6878
|
set margin mode to 'cross' or 'isolated'
|
6795
|
-
|
6879
|
+
|
6880
|
+
https://www.bitget.com/api-doc/contract/account/Change-Margin-Mode
|
6881
|
+
|
6796
6882
|
:param str marginMode: 'cross' or 'isolated'
|
6797
6883
|
:param str symbol: unified market symbol
|
6798
6884
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6841,7 +6927,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6841
6927
|
def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
|
6842
6928
|
"""
|
6843
6929
|
set hedged to True or False for a market
|
6844
|
-
|
6930
|
+
|
6931
|
+
https://www.bitget.com/api-doc/contract/account/Change-Hold-Mode
|
6932
|
+
|
6845
6933
|
:param bool hedged: set to True to use dualSidePosition
|
6846
6934
|
:param str symbol: not used by bitget setPositionMode()
|
6847
6935
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -6880,7 +6968,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6880
6968
|
def fetch_open_interest(self, symbol: str, params={}):
|
6881
6969
|
"""
|
6882
6970
|
retrieves the open interest of a contract trading pair
|
6883
|
-
|
6971
|
+
|
6972
|
+
https://www.bitget.com/api-doc/contract/market/Get-Open-Interest
|
6973
|
+
|
6884
6974
|
:param str symbol: unified CCXT market symbol
|
6885
6975
|
:param dict [params]: exchange specific parameters
|
6886
6976
|
:returns dict} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure:
|
@@ -6948,7 +7038,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
6948
7038
|
def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
6949
7039
|
"""
|
6950
7040
|
fetch a history of internal transfers made on an account
|
6951
|
-
|
7041
|
+
|
7042
|
+
https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords
|
7043
|
+
|
6952
7044
|
:param str code: unified currency code of the currency transferred
|
6953
7045
|
:param int [since]: the earliest time in ms to fetch transfers for
|
6954
7046
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
@@ -7003,7 +7095,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7003
7095
|
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
7004
7096
|
"""
|
7005
7097
|
transfer currency internally between wallets on the same account
|
7006
|
-
|
7098
|
+
|
7099
|
+
https://www.bitget.com/api-doc/spot/account/Wallet-Transfer
|
7100
|
+
|
7007
7101
|
:param str code: unified currency code
|
7008
7102
|
:param float amount: amount to transfer
|
7009
7103
|
:param str fromAccount: account to transfer from
|
@@ -7151,7 +7245,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7151
7245
|
def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
|
7152
7246
|
"""
|
7153
7247
|
fetch deposit and withdraw fees
|
7154
|
-
|
7248
|
+
|
7249
|
+
https://www.bitget.com/api-doc/spot/market/Get-Coin-List
|
7250
|
+
|
7155
7251
|
:param str[]|None codes: list of unified currency codes
|
7156
7252
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7157
7253
|
:returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -7193,7 +7289,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7193
7289
|
def borrow_cross_margin(self, code: str, amount: float, params={}):
|
7194
7290
|
"""
|
7195
7291
|
create a loan to borrow margin
|
7196
|
-
|
7292
|
+
|
7293
|
+
https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow
|
7294
|
+
|
7197
7295
|
:param str code: unified currency code of the currency to borrow
|
7198
7296
|
:param str amount: the amount to borrow
|
7199
7297
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -7224,7 +7322,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7224
7322
|
def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
|
7225
7323
|
"""
|
7226
7324
|
create a loan to borrow margin
|
7227
|
-
|
7325
|
+
|
7326
|
+
https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow
|
7327
|
+
|
7228
7328
|
:param str symbol: unified market symbol
|
7229
7329
|
:param str code: unified currency code of the currency to borrow
|
7230
7330
|
:param str amount: the amount to borrow
|
@@ -7259,7 +7359,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7259
7359
|
def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
|
7260
7360
|
"""
|
7261
7361
|
repay borrowed margin and interest
|
7262
|
-
|
7362
|
+
|
7363
|
+
https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Repay
|
7364
|
+
|
7263
7365
|
:param str symbol: unified market symbol
|
7264
7366
|
:param str code: unified currency code of the currency to repay
|
7265
7367
|
:param str amount: the amount to repay
|
@@ -7295,7 +7397,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7295
7397
|
def repay_cross_margin(self, code: str, amount, params={}):
|
7296
7398
|
"""
|
7297
7399
|
repay borrowed margin and interest
|
7298
|
-
|
7400
|
+
|
7401
|
+
https://www.bitget.com/api-doc/margin/cross/account/Cross-Repay
|
7402
|
+
|
7299
7403
|
:param str code: unified currency code of the currency to repay
|
7300
7404
|
:param str amount: the amount to repay
|
7301
7405
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -7380,8 +7484,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
7380
7484
|
def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
|
7381
7485
|
"""
|
7382
7486
|
retrieves the users liquidated positions
|
7383
|
-
|
7384
|
-
|
7487
|
+
|
7488
|
+
https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Liquidation-Records
|
7489
|
+
https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Liquidation-Records
|
7490
|
+
|
7385
7491
|
:param str [symbol]: unified CCXT market symbol
|
7386
7492
|
:param int [since]: the earliest time in ms to fetch liquidations for
|
7387
7493
|
:param int [limit]: the maximum number of liquidation structures to retrieve
|
@@ -7528,7 +7634,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7528
7634
|
def fetch_isolated_borrow_rate(self, symbol: str, params={}) -> IsolatedBorrowRate:
|
7529
7635
|
"""
|
7530
7636
|
fetch the rate of interest to borrow a currency for margin trading
|
7531
|
-
|
7637
|
+
|
7638
|
+
https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Margin-Interest-Rate-And-Max-Borrowable-Amount
|
7639
|
+
|
7532
7640
|
:param str symbol: unified market symbol
|
7533
7641
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7534
7642
|
:returns dict: an `isolated borrow rate structure <https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure>`
|
@@ -7641,7 +7749,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7641
7749
|
def fetch_cross_borrow_rate(self, code: str, params={}) -> CrossBorrowRate:
|
7642
7750
|
"""
|
7643
7751
|
fetch the rate of interest to borrow a currency for margin trading
|
7644
|
-
|
7752
|
+
|
7753
|
+
https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Margin-Interest-Rate-And-Borrowable
|
7754
|
+
|
7645
7755
|
:param str code: unified currency code
|
7646
7756
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7647
7757
|
:param str [params.symbol]: required for isolated margin
|
@@ -7719,8 +7829,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
7719
7829
|
def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
|
7720
7830
|
"""
|
7721
7831
|
fetch the interest owed by the user for borrowing currency for margin trading
|
7722
|
-
|
7723
|
-
|
7832
|
+
|
7833
|
+
https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Interest-Records
|
7834
|
+
https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Interest-Records
|
7835
|
+
|
7724
7836
|
:param str [code]: unified currency code
|
7725
7837
|
:param str [symbol]: unified market symbol when fetching interest in isolated markets
|
7726
7838
|
:param int [since]: the earliest time in ms to fetch borrow interest for
|
@@ -7861,7 +7973,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7861
7973
|
def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
|
7862
7974
|
"""
|
7863
7975
|
closes an open position for a market
|
7864
|
-
|
7976
|
+
|
7977
|
+
https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
|
7978
|
+
|
7865
7979
|
:param str symbol: unified CCXT market symbol
|
7866
7980
|
:param str [side]: one-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
|
7867
7981
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -7908,7 +8022,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7908
8022
|
def close_all_positions(self, params={}) -> List[Position]:
|
7909
8023
|
"""
|
7910
8024
|
closes all open positions for a market type
|
7911
|
-
|
8025
|
+
|
8026
|
+
https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
|
8027
|
+
|
7912
8028
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7913
8029
|
:param str [params.productType]: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
7914
8030
|
:returns dict[]: A list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -7944,7 +8060,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
7944
8060
|
def fetch_margin_mode(self, symbol: str, params={}) -> MarginMode:
|
7945
8061
|
"""
|
7946
8062
|
fetches the margin mode of a trading pair
|
7947
|
-
|
8063
|
+
|
8064
|
+
https://www.bitget.com/api-doc/contract/account/Get-Single-Account
|
8065
|
+
|
7948
8066
|
:param str symbol: unified symbol of the market to fetch the margin mode for
|
7949
8067
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7950
8068
|
:returns dict: a `margin mode structure <https://docs.ccxt.com/#/?id=margin-mode-structure>`
|
@@ -8008,14 +8126,16 @@ class bitget(Exchange, ImplicitAPI):
|
|
8008
8126
|
def fetch_positions_history(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}) -> List[Position]:
|
8009
8127
|
"""
|
8010
8128
|
fetches historical positions
|
8011
|
-
|
8129
|
+
|
8130
|
+
https://www.bitget.com/api-doc/contract/position/Get-History-Position
|
8131
|
+
|
8012
8132
|
:param str[] [symbols]: unified contract symbols
|
8013
8133
|
:param int [since]: timestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
|
8014
8134
|
:param int [limit]: the maximum amount of records to fetch, default=20, max=100
|
8015
8135
|
:param dict params: extra parameters specific to the exchange api endpoint
|
8016
8136
|
:param int [params.until]: timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
|
8017
|
-
|
8018
|
-
|
8137
|
+
|
8138
|
+
EXCHANGE SPECIFIC PARAMETERS
|
8019
8139
|
:param str [params.productType]: USDT-FUTURES(default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
|
8020
8140
|
:returns dict[]: a list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
8021
8141
|
"""
|
@@ -8072,7 +8192,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
8072
8192
|
def fetch_convert_quote(self, fromCode: str, toCode: str, amount: Num = None, params={}) -> Conversion:
|
8073
8193
|
"""
|
8074
8194
|
fetch a quote for converting from one currency to another
|
8075
|
-
|
8195
|
+
|
8196
|
+
https://www.bitget.com/api-doc/common/convert/Get-Quoted-Price
|
8197
|
+
|
8076
8198
|
:param str fromCode: the currency that you want to sell and convert from
|
8077
8199
|
:param str toCode: the currency that you want to buy and convert into
|
8078
8200
|
:param float [amount]: how much you want to trade in units of the from currency
|
@@ -8112,7 +8234,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
8112
8234
|
def create_convert_trade(self, id: str, fromCode: str, toCode: str, amount: Num = None, params={}) -> Conversion:
|
8113
8235
|
"""
|
8114
8236
|
convert from one currency to another
|
8115
|
-
|
8237
|
+
|
8238
|
+
https://www.bitget.com/api-doc/common/convert/Trade
|
8239
|
+
|
8116
8240
|
:param str id: the id of the trade that you want to make
|
8117
8241
|
:param str fromCode: the currency that you want to sell and convert from
|
8118
8242
|
:param str toCode: the currency that you want to buy and convert into
|
@@ -8160,7 +8284,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
8160
8284
|
def fetch_convert_trade_history(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Conversion]:
|
8161
8285
|
"""
|
8162
8286
|
fetch the users history of conversion trades
|
8163
|
-
|
8287
|
+
|
8288
|
+
https://www.bitget.com/api-doc/common/convert/Get-Convert-Record
|
8289
|
+
|
8164
8290
|
:param str [code]: the unified currency code
|
8165
8291
|
:param int [since]: the earliest time in ms to fetch conversions for
|
8166
8292
|
:param int [limit]: the maximum number of conversion structures to retrieve
|
@@ -8267,7 +8393,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
8267
8393
|
def fetch_convert_currencies(self, params={}) -> Currencies:
|
8268
8394
|
"""
|
8269
8395
|
fetches all available currencies that can be converted
|
8270
|
-
|
8396
|
+
|
8397
|
+
https://www.bitget.com/api-doc/common/convert/Get-Convert-Currencies
|
8398
|
+
|
8271
8399
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
8272
8400
|
:returns dict: an associative dictionary of currencies
|
8273
8401
|
"""
|
@@ -8327,7 +8455,9 @@ class bitget(Exchange, ImplicitAPI):
|
|
8327
8455
|
def fetch_funding_interval(self, symbol: str, params={}) -> FundingRate:
|
8328
8456
|
"""
|
8329
8457
|
fetch the current funding rate interval
|
8330
|
-
|
8458
|
+
|
8459
|
+
https://www.bitget.com/api-doc/contract/market/Get-Symbol-Next-Funding-Time
|
8460
|
+
|
8331
8461
|
:param str symbol: unified market symbol
|
8332
8462
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
8333
8463
|
:returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
|
@@ -8368,8 +8498,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
8368
8498
|
def fetch_long_short_ratio_history(self, symbol: Str = None, timeframe: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LongShortRatio]:
|
8369
8499
|
"""
|
8370
8500
|
fetches the long short ratio history for a unified market symbol
|
8371
|
-
|
8372
|
-
|
8501
|
+
|
8502
|
+
https://www.bitget.com/api-doc/common/apidata/Margin-Ls-Ratio
|
8503
|
+
https://www.bitget.com/api-doc/common/apidata/Account-Long-Short
|
8504
|
+
|
8373
8505
|
:param str symbol: unified symbol of the market to fetch the long short ratio for
|
8374
8506
|
:param str [timeframe]: the period for the ratio
|
8375
8507
|
:param int [since]: the earliest time in ms to fetch ratios for
|