ccxt 4.1.54__py2.py3-none-any.whl → 4.1.56__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +2 -2
- ccxt/abstract/binance.py +1 -0
- ccxt/abstract/binancecoinm.py +1 -0
- ccxt/abstract/binanceus.py +1 -0
- ccxt/abstract/binanceusdm.py +1 -0
- ccxt/abstract/bitbank.py +1 -0
- ccxt/abstract/coinbase.py +2 -0
- ccxt/abstract/htx.py +3 -0
- ccxt/abstract/huobi.py +3 -0
- ccxt/abstract/huobipro.py +3 -0
- ccxt/abstract/okex.py +3 -1
- ccxt/abstract/okex5.py +3 -1
- ccxt/abstract/okx.py +3 -1
- ccxt/ace.py +23 -23
- ccxt/alpaca.py +8 -8
- ccxt/ascendex.py +26 -26
- ccxt/async_support/__init__.py +2 -2
- ccxt/async_support/ace.py +23 -23
- ccxt/async_support/alpaca.py +8 -8
- ccxt/async_support/ascendex.py +26 -26
- ccxt/async_support/base/exchange.py +4 -2216
- ccxt/async_support/bigone.py +21 -24
- ccxt/async_support/binance.py +61 -54
- ccxt/async_support/bingx.py +28 -28
- ccxt/async_support/bit2c.py +9 -9
- ccxt/async_support/bitbank.py +11 -10
- ccxt/async_support/bitbns.py +11 -11
- ccxt/async_support/bitfinex.py +15 -15
- ccxt/async_support/bitfinex2.py +22 -22
- ccxt/async_support/bitflyer.py +13 -13
- ccxt/async_support/bitforex.py +10 -10
- ccxt/async_support/bitget.py +44 -44
- ccxt/async_support/bithumb.py +9 -9
- ccxt/async_support/bitmart.py +85 -104
- ccxt/async_support/bitmex.py +27 -27
- ccxt/async_support/bitopro.py +18 -18
- ccxt/async_support/bitpanda.py +18 -18
- ccxt/async_support/bitrue.py +14 -14
- ccxt/async_support/bitso.py +17 -17
- ccxt/async_support/bitstamp.py +17 -17
- ccxt/async_support/bittrex.py +22 -24
- ccxt/async_support/bitvavo.py +15 -15
- ccxt/async_support/bl3p.py +4 -4
- ccxt/async_support/blockchaincom.py +17 -17
- ccxt/async_support/btcalpha.py +14 -14
- ccxt/async_support/btcbox.py +9 -9
- ccxt/async_support/btcmarkets.py +17 -17
- ccxt/async_support/btcturk.py +9 -9
- ccxt/async_support/bybit.py +46 -46
- ccxt/async_support/cex.py +10 -10
- ccxt/async_support/coinbase.py +69 -25
- ccxt/async_support/coinbasepro.py +19 -19
- ccxt/async_support/coincheck.py +10 -10
- ccxt/async_support/coinex.py +57 -66
- ccxt/async_support/coinlist.py +22 -22
- ccxt/async_support/coinmate.py +10 -10
- ccxt/async_support/coinone.py +10 -10
- ccxt/async_support/coinsph.py +17 -17
- ccxt/async_support/coinspot.py +5 -5
- ccxt/async_support/cryptocom.py +27 -27
- ccxt/async_support/currencycom.py +18 -18
- ccxt/async_support/delta.py +21 -21
- ccxt/async_support/deribit.py +24 -24
- ccxt/async_support/digifinex.py +35 -35
- ccxt/async_support/exmo.py +19 -19
- ccxt/async_support/gate.py +38 -38
- ccxt/async_support/gemini.py +11 -11
- ccxt/async_support/hitbtc.py +27 -27
- ccxt/async_support/hollaex.py +19 -19
- ccxt/async_support/htx.py +47 -44
- ccxt/async_support/huobijp.py +22 -22
- ccxt/async_support/idex.py +20 -20
- ccxt/async_support/independentreserve.py +9 -9
- ccxt/async_support/indodax.py +10 -10
- ccxt/async_support/kraken.py +25 -25
- ccxt/async_support/krakenfutures.py +17 -17
- ccxt/async_support/kucoin.py +27 -27
- ccxt/async_support/kucoinfutures.py +20 -20
- ccxt/async_support/kuna.py +19 -19
- ccxt/async_support/latoken.py +14 -14
- ccxt/async_support/lbank.py +18 -18
- ccxt/async_support/luno.py +14 -14
- ccxt/async_support/lykke.py +12 -12
- ccxt/async_support/mercado.py +11 -11
- ccxt/async_support/mexc.py +36 -36
- ccxt/async_support/ndax.py +18 -18
- ccxt/async_support/novadax.py +17 -17
- ccxt/async_support/oceanex.py +12 -12
- ccxt/async_support/okcoin.py +19 -19
- ccxt/async_support/okx.py +48 -45
- ccxt/async_support/p2b.py +6 -6
- ccxt/async_support/paymium.py +6 -6
- ccxt/async_support/phemex.py +57 -57
- ccxt/async_support/poloniex.py +31 -30
- ccxt/async_support/poloniexfutures.py +16 -16
- ccxt/async_support/probit.py +22 -22
- ccxt/async_support/tidex.py +15 -15
- ccxt/async_support/timex.py +20 -20
- ccxt/async_support/tokocrypto.py +16 -16
- ccxt/async_support/upbit.py +15 -15
- ccxt/async_support/wavesexchange.py +12 -12
- ccxt/async_support/wazirx.py +13 -13
- ccxt/async_support/whitebit.py +26 -26
- ccxt/async_support/woo.py +47 -47
- ccxt/async_support/yobit.py +8 -8
- ccxt/async_support/zaif.py +10 -10
- ccxt/async_support/zonda.py +16 -16
- ccxt/base/errors.py +17 -16
- ccxt/base/exchange.py +57 -97
- ccxt/base/types.py +138 -139
- ccxt/bigone.py +21 -24
- ccxt/binance.py +61 -54
- ccxt/bingx.py +28 -28
- ccxt/bit2c.py +9 -9
- ccxt/bitbank.py +11 -10
- ccxt/bitbns.py +11 -11
- ccxt/bitfinex.py +15 -15
- ccxt/bitfinex2.py +22 -22
- ccxt/bitflyer.py +13 -13
- ccxt/bitforex.py +10 -10
- ccxt/bitget.py +44 -44
- ccxt/bithumb.py +9 -9
- ccxt/bitmart.py +85 -104
- ccxt/bitmex.py +27 -27
- ccxt/bitopro.py +18 -18
- ccxt/bitpanda.py +18 -18
- ccxt/bitrue.py +14 -14
- ccxt/bitso.py +17 -17
- ccxt/bitstamp.py +17 -17
- ccxt/bittrex.py +22 -24
- ccxt/bitvavo.py +15 -15
- ccxt/bl3p.py +4 -4
- ccxt/blockchaincom.py +17 -17
- ccxt/btcalpha.py +14 -14
- ccxt/btcbox.py +9 -9
- ccxt/btcmarkets.py +17 -17
- ccxt/btcturk.py +9 -9
- ccxt/bybit.py +46 -46
- ccxt/cex.py +10 -10
- ccxt/coinbase.py +69 -25
- ccxt/coinbasepro.py +19 -19
- ccxt/coincheck.py +10 -10
- ccxt/coinex.py +57 -66
- ccxt/coinlist.py +22 -22
- ccxt/coinmate.py +10 -10
- ccxt/coinone.py +10 -10
- ccxt/coinsph.py +17 -17
- ccxt/coinspot.py +5 -5
- ccxt/cryptocom.py +27 -27
- ccxt/currencycom.py +18 -18
- ccxt/delta.py +21 -21
- ccxt/deribit.py +24 -24
- ccxt/digifinex.py +35 -35
- ccxt/exmo.py +19 -19
- ccxt/gate.py +38 -38
- ccxt/gemini.py +11 -11
- ccxt/hitbtc.py +27 -27
- ccxt/hollaex.py +19 -19
- ccxt/htx.py +47 -44
- ccxt/huobijp.py +22 -22
- ccxt/idex.py +20 -20
- ccxt/independentreserve.py +9 -9
- ccxt/indodax.py +10 -10
- ccxt/kraken.py +25 -25
- ccxt/krakenfutures.py +17 -17
- ccxt/kucoin.py +27 -27
- ccxt/kucoinfutures.py +20 -20
- ccxt/kuna.py +19 -19
- ccxt/latoken.py +14 -14
- ccxt/lbank.py +18 -18
- ccxt/luno.py +14 -14
- ccxt/lykke.py +12 -12
- ccxt/mercado.py +11 -11
- ccxt/mexc.py +36 -36
- ccxt/ndax.py +18 -18
- ccxt/novadax.py +17 -17
- ccxt/oceanex.py +12 -12
- ccxt/okcoin.py +19 -19
- ccxt/okx.py +48 -45
- ccxt/p2b.py +6 -6
- ccxt/paymium.py +6 -6
- ccxt/phemex.py +57 -57
- ccxt/poloniex.py +31 -30
- ccxt/poloniexfutures.py +16 -16
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +3 -3
- ccxt/pro/ascendex.py +2 -2
- ccxt/pro/binance.py +9 -9
- ccxt/pro/bingx.py +3 -3
- ccxt/pro/bitfinex.py +3 -3
- ccxt/pro/bitfinex2.py +3 -3
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bitmart.py +2 -2
- ccxt/pro/bitmex.py +3 -3
- ccxt/pro/bitpanda.py +3 -3
- ccxt/pro/bitrue.py +2 -2
- ccxt/pro/bitstamp.py +2 -2
- ccxt/pro/bittrex.py +3 -3
- ccxt/pro/bitvavo.py +3 -3
- ccxt/pro/blockchaincom.py +2 -2
- ccxt/pro/bybit.py +4 -4
- ccxt/pro/cex.py +3 -3
- ccxt/pro/coinbasepro.py +3 -3
- ccxt/pro/coinex.py +2 -2
- ccxt/pro/cryptocom.py +5 -5
- ccxt/pro/deribit.py +3 -3
- ccxt/pro/exmo.py +2 -2
- ccxt/pro/gate.py +3 -3
- ccxt/pro/gemini.py +2 -2
- ccxt/pro/hitbtc.py +4 -4
- ccxt/pro/hollaex.py +3 -3
- ccxt/pro/htx.py +3 -3
- ccxt/pro/idex.py +3 -3
- ccxt/pro/kraken.py +7 -7
- ccxt/pro/krakenfutures.py +4 -4
- ccxt/pro/kucoin.py +3 -3
- ccxt/pro/kucoinfutures.py +3 -3
- ccxt/pro/mexc.py +3 -3
- ccxt/pro/okcoin.py +2 -2
- ccxt/pro/okx.py +6 -6
- ccxt/pro/phemex.py +3 -3
- ccxt/pro/poloniex.py +3 -3
- ccxt/pro/poloniexfutures.py +3 -3
- ccxt/pro/probit.py +3 -3
- ccxt/pro/wazirx.py +3 -3
- ccxt/pro/whitebit.py +3 -3
- ccxt/pro/woo.py +2 -2
- ccxt/probit.py +22 -22
- ccxt/test/base/test_shared_methods.py +3 -3
- ccxt/test/test_async.py +543 -535
- ccxt/test/test_sync.py +542 -534
- ccxt/tidex.py +15 -15
- ccxt/timex.py +20 -20
- ccxt/tokocrypto.py +16 -16
- ccxt/upbit.py +15 -15
- ccxt/wavesexchange.py +12 -12
- ccxt/wazirx.py +13 -13
- ccxt/whitebit.py +26 -26
- ccxt/woo.py +47 -47
- ccxt/yobit.py +8 -8
- ccxt/zaif.py +10 -10
- ccxt/zonda.py +16 -16
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/METADATA +10 -8
- ccxt-4.1.56.dist-info/RECORD +449 -0
- ccxt/async_support/bitstamp1.py +0 -402
- ccxt/async_support/lbank2.py +0 -2620
- ccxt/bitstamp1.py +0 -402
- ccxt/lbank2.py +0 -2619
- ccxt-4.1.54.dist-info/RECORD +0 -453
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/WHEEL +0 -0
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/top_level.txt +0 -0
ccxt/async_support/bitget.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.bitget import ImplicitAPI
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import json
|
11
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory,
|
11
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory, Str, Strings, Ticker, Tickers, Trade, Transaction
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
14
|
from ccxt.base.errors import PermissionDenied
|
@@ -1861,7 +1861,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1861
1861
|
result = self.safe_value(response, 'data', [])
|
1862
1862
|
return self.parse_market_leverage_tiers(result, market)
|
1863
1863
|
|
1864
|
-
def parse_market_leverage_tiers(self, info, market=None):
|
1864
|
+
def parse_market_leverage_tiers(self, info, market: Market = None):
|
1865
1865
|
#
|
1866
1866
|
# swap and future
|
1867
1867
|
#
|
@@ -1925,7 +1925,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1925
1925
|
minNotional = maxNotional
|
1926
1926
|
return tiers
|
1927
1927
|
|
1928
|
-
async def fetch_deposits(self, code:
|
1928
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1929
1929
|
"""
|
1930
1930
|
fetch all deposits made to an account
|
1931
1931
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-deposit-list
|
@@ -2068,7 +2068,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2068
2068
|
result['network'] = chain
|
2069
2069
|
return result
|
2070
2070
|
|
2071
|
-
async def fetch_withdrawals(self, code:
|
2071
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2072
2072
|
"""
|
2073
2073
|
fetch all withdrawals made from an account
|
2074
2074
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-withdraw-list
|
@@ -2125,7 +2125,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2125
2125
|
rawTransactions = self.safe_value(response, 'data', [])
|
2126
2126
|
return self.parse_transactions(rawTransactions, currency, since, limit)
|
2127
2127
|
|
2128
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
2128
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2129
2129
|
#
|
2130
2130
|
# {
|
2131
2131
|
# "id": "925607360021839872",
|
@@ -2223,7 +2223,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2223
2223
|
data = self.safe_value(response, 'data', {})
|
2224
2224
|
return self.parse_deposit_address(data, currency)
|
2225
2225
|
|
2226
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
2226
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
2227
2227
|
#
|
2228
2228
|
# {
|
2229
2229
|
# "address": "1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv",
|
@@ -2282,7 +2282,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2282
2282
|
timestamp = self.safe_integer(data, 'timestamp')
|
2283
2283
|
return self.parse_order_book(data, symbol, timestamp)
|
2284
2284
|
|
2285
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
2285
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
2286
2286
|
#
|
2287
2287
|
# spot
|
2288
2288
|
#
|
@@ -2520,7 +2520,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2520
2520
|
data = self.safe_value(response, 'data')
|
2521
2521
|
return self.parse_tickers(data, symbols)
|
2522
2522
|
|
2523
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
2523
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
2524
2524
|
#
|
2525
2525
|
# spot
|
2526
2526
|
#
|
@@ -2807,7 +2807,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2807
2807
|
result[symbol] = fee
|
2808
2808
|
return result
|
2809
2809
|
|
2810
|
-
def parse_trading_fee(self, data, market=None):
|
2810
|
+
def parse_trading_fee(self, data, market: Market = None):
|
2811
2811
|
marketId = self.safe_string(data, 'symbol')
|
2812
2812
|
return {
|
2813
2813
|
'info': data,
|
@@ -2816,7 +2816,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2816
2816
|
'taker': self.safe_number(data, 'takerFeeRate'),
|
2817
2817
|
}
|
2818
2818
|
|
2819
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
2819
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
2820
2820
|
#
|
2821
2821
|
# spot
|
2822
2822
|
#
|
@@ -3165,7 +3165,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3165
3165
|
}
|
3166
3166
|
return self.safe_string(statuses, status, status)
|
3167
3167
|
|
3168
|
-
def parse_order(self, order, market=None) -> Order:
|
3168
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
3169
3169
|
#
|
3170
3170
|
# spot
|
3171
3171
|
# {
|
@@ -3716,7 +3716,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3716
3716
|
data = self.safe_value(response, 'data')
|
3717
3717
|
return self.parse_order(data, market)
|
3718
3718
|
|
3719
|
-
async def cancel_order(self, id: str, symbol:
|
3719
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
3720
3720
|
"""
|
3721
3721
|
cancels an open order
|
3722
3722
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#cancel-order
|
@@ -3834,7 +3834,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3834
3834
|
order = resultList[0]
|
3835
3835
|
return self.parse_order(order, market)
|
3836
3836
|
|
3837
|
-
async def cancel_orders(self, ids, symbol:
|
3837
|
+
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
3838
3838
|
"""
|
3839
3839
|
cancel multiple orders
|
3840
3840
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#cancel-order-in-batch-v2-single-instruments
|
@@ -3909,7 +3909,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3909
3909
|
#
|
3910
3910
|
return response
|
3911
3911
|
|
3912
|
-
async def cancel_all_orders(self, symbol:
|
3912
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
3913
3913
|
"""
|
3914
3914
|
cancel all open orders
|
3915
3915
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#cancel-all-order
|
@@ -3980,7 +3980,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3980
3980
|
#
|
3981
3981
|
return response
|
3982
3982
|
|
3983
|
-
async def fetch_order(self, id: str, symbol:
|
3983
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
3984
3984
|
"""
|
3985
3985
|
fetches information on an order made by the user
|
3986
3986
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-order-details
|
@@ -4062,7 +4062,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4062
4062
|
first = self.safe_value(data, 0, data)
|
4063
4063
|
return self.parse_order(first, market)
|
4064
4064
|
|
4065
|
-
async def fetch_open_orders(self, symbol:
|
4065
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
4066
4066
|
"""
|
4067
4067
|
fetch all unfilled currently open orders
|
4068
4068
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-order-list
|
@@ -4278,7 +4278,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4278
4278
|
return self.add_pagination_cursor_to_result(data, result)
|
4279
4279
|
return self.parse_orders(data, market, since, limit)
|
4280
4280
|
|
4281
|
-
async def fetch_closed_orders(self, symbol:
|
4281
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
4282
4282
|
"""
|
4283
4283
|
fetches information on multiple closed orders made by the user
|
4284
4284
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-order-history
|
@@ -4313,7 +4313,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4313
4313
|
result.append(entry)
|
4314
4314
|
return self.parse_orders(result, market, since, limit)
|
4315
4315
|
|
4316
|
-
async def fetch_canceled_orders(self, symbol:
|
4316
|
+
async def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4317
4317
|
"""
|
4318
4318
|
fetches information on multiple canceled orders made by the user
|
4319
4319
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-order-history
|
@@ -4348,7 +4348,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4348
4348
|
result.append(entry)
|
4349
4349
|
return self.parse_orders(result, market, since, limit)
|
4350
4350
|
|
4351
|
-
async def fetch_canceled_and_closed_orders(self, symbol:
|
4351
|
+
async def fetch_canceled_and_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4352
4352
|
await self.load_markets()
|
4353
4353
|
market = self.market(symbol)
|
4354
4354
|
marketType = None
|
@@ -4580,7 +4580,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4580
4580
|
data[dataLength - 1] = last
|
4581
4581
|
return data
|
4582
4582
|
|
4583
|
-
async def fetch_ledger(self, code:
|
4583
|
+
async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
4584
4584
|
"""
|
4585
4585
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-bills
|
4586
4586
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
@@ -4629,7 +4629,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4629
4629
|
data = self.safe_value(response, 'data')
|
4630
4630
|
return self.parse_ledger(data, currency, since, limit)
|
4631
4631
|
|
4632
|
-
def parse_ledger_entry(self, item, currency=None):
|
4632
|
+
def parse_ledger_entry(self, item, currency: Currency = None):
|
4633
4633
|
#
|
4634
4634
|
# {
|
4635
4635
|
# "billId": "881626974170554368",
|
@@ -4674,7 +4674,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4674
4674
|
'fee': fee,
|
4675
4675
|
}
|
4676
4676
|
|
4677
|
-
async def fetch_my_trades(self, symbol:
|
4677
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4678
4678
|
"""
|
4679
4679
|
fetch all trades made by the user
|
4680
4680
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-transaction-details
|
@@ -4821,7 +4821,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4821
4821
|
return self.parse_trades(fills, market, since, limit)
|
4822
4822
|
return self.parse_trades(data, market, since, limit)
|
4823
4823
|
|
4824
|
-
async def fetch_order_trades(self, id: str, symbol:
|
4824
|
+
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4825
4825
|
"""
|
4826
4826
|
fetch all the trades made from a single order
|
4827
4827
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-transaction-details
|
@@ -5031,7 +5031,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5031
5031
|
symbols = self.market_symbols(symbols)
|
5032
5032
|
return self.filter_by_array_positions(result, 'symbol', symbols, False)
|
5033
5033
|
|
5034
|
-
def parse_position(self, position, market=None):
|
5034
|
+
def parse_position(self, position, market: Market = None):
|
5035
5035
|
#
|
5036
5036
|
# {
|
5037
5037
|
# "marginCoin": "USDT",
|
@@ -5161,7 +5161,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5161
5161
|
'takeProfitPrice': None,
|
5162
5162
|
})
|
5163
5163
|
|
5164
|
-
async def fetch_funding_rate_history(self, symbol:
|
5164
|
+
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5165
5165
|
"""
|
5166
5166
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#get-history-funding-rate
|
5167
5167
|
fetches historical funding rate prices
|
@@ -5250,7 +5250,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5250
5250
|
data = self.safe_value(response, 'data', {})
|
5251
5251
|
return self.parse_funding_rate(data, market)
|
5252
5252
|
|
5253
|
-
def parse_funding_rate(self, contract, market=None):
|
5253
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
5254
5254
|
#
|
5255
5255
|
# {
|
5256
5256
|
# "symbol": "BTCUSDT_UMCBL",
|
@@ -5279,7 +5279,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5279
5279
|
'previousFundingDatetime': None,
|
5280
5280
|
}
|
5281
5281
|
|
5282
|
-
async def fetch_funding_history(self, symbol:
|
5282
|
+
async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5283
5283
|
"""
|
5284
5284
|
fetch the funding history
|
5285
5285
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#get-account-bill
|
@@ -5332,7 +5332,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5332
5332
|
result = self.safe_value(data, 'result', [])
|
5333
5333
|
return self.parse_funding_histories(result, market, since, limit)
|
5334
5334
|
|
5335
|
-
def parse_funding_history(self, contract, market=None):
|
5335
|
+
def parse_funding_history(self, contract, market: Market = None):
|
5336
5336
|
#
|
5337
5337
|
# {
|
5338
5338
|
# "id": "892962903462432768",
|
@@ -5402,7 +5402,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5402
5402
|
'type': type,
|
5403
5403
|
})
|
5404
5404
|
|
5405
|
-
def parse_margin_modification(self, data, market=None):
|
5405
|
+
def parse_margin_modification(self, data, market: Market = None):
|
5406
5406
|
errorCode = self.safe_string(data, 'code')
|
5407
5407
|
status = 'ok' if (errorCode == '00000') else 'failed'
|
5408
5408
|
code = market['quote'] if (market['linear']) else market['base']
|
@@ -5488,7 +5488,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5488
5488
|
#
|
5489
5489
|
return response
|
5490
5490
|
|
5491
|
-
async def set_leverage(self, leverage, symbol:
|
5491
|
+
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
5492
5492
|
"""
|
5493
5493
|
set the level of leverage for a market
|
5494
5494
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#change-leverage
|
@@ -5508,7 +5508,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5508
5508
|
}
|
5509
5509
|
return await self.privateMixPostMixV1AccountSetLeverage(self.extend(request, params))
|
5510
5510
|
|
5511
|
-
async def set_margin_mode(self, marginMode, symbol:
|
5511
|
+
async def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
5512
5512
|
"""
|
5513
5513
|
set margin mode to 'cross' or 'isolated'
|
5514
5514
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#change-margin-mode
|
@@ -5534,7 +5534,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5534
5534
|
}
|
5535
5535
|
return await self.privateMixPostMixV1AccountSetMarginMode(self.extend(request, params))
|
5536
5536
|
|
5537
|
-
async def set_position_mode(self, hedged, symbol:
|
5537
|
+
async def set_position_mode(self, hedged, symbol: Str = None, params={}):
|
5538
5538
|
"""
|
5539
5539
|
set hedged to True or False for a market
|
5540
5540
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#change-hold-mode
|
@@ -5601,7 +5601,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5601
5601
|
data = self.safe_value(response, 'data', {})
|
5602
5602
|
return self.parse_open_interest(data, market)
|
5603
5603
|
|
5604
|
-
async def fetch_transfers(self, code:
|
5604
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
5605
5605
|
"""
|
5606
5606
|
fetch a history of internal transfers made on an account
|
5607
5607
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-transfer-list
|
@@ -5697,7 +5697,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5697
5697
|
#
|
5698
5698
|
return self.parse_transfer(response, currency)
|
5699
5699
|
|
5700
|
-
def parse_transfer(self, transfer, currency=None):
|
5700
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
5701
5701
|
#
|
5702
5702
|
# transfer
|
5703
5703
|
#
|
@@ -5746,7 +5746,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5746
5746
|
'status': self.parse_transfer_status(msg),
|
5747
5747
|
}
|
5748
5748
|
|
5749
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
5749
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
5750
5750
|
#
|
5751
5751
|
# {
|
5752
5752
|
# "chains": [
|
@@ -5830,7 +5830,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5830
5830
|
}
|
5831
5831
|
return self.safe_string(statuses, status, status)
|
5832
5832
|
|
5833
|
-
def parse_open_interest(self, interest, market=None):
|
5833
|
+
def parse_open_interest(self, interest, market: Market = None):
|
5834
5834
|
#
|
5835
5835
|
# {
|
5836
5836
|
# "symbol": "BTCUSDT_UMCBL",
|
@@ -5851,7 +5851,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5851
5851
|
'info': interest,
|
5852
5852
|
}, market)
|
5853
5853
|
|
5854
|
-
async def borrow_margin(self, code: str, amount, symbol:
|
5854
|
+
async def borrow_margin(self, code: str, amount, symbol: Str = None, params={}):
|
5855
5855
|
"""
|
5856
5856
|
create a loan to borrow margin
|
5857
5857
|
:see: https://bitgetlimited.github.io/apidoc/en/margin/#cross-borrow
|
@@ -5913,7 +5913,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5913
5913
|
data = self.safe_value(response, 'data', {})
|
5914
5914
|
return self.parse_margin_loan(data, currency)
|
5915
5915
|
|
5916
|
-
async def repay_margin(self, code: str, amount, symbol:
|
5916
|
+
async def repay_margin(self, code: str, amount, symbol: Str = None, params={}):
|
5917
5917
|
"""
|
5918
5918
|
repay borrowed margin and interest
|
5919
5919
|
:see: https://bitgetlimited.github.io/apidoc/en/margin/#cross-repay
|
@@ -5977,7 +5977,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5977
5977
|
data = self.safe_value(response, 'data', {})
|
5978
5978
|
return self.parse_margin_loan(data, currency)
|
5979
5979
|
|
5980
|
-
def parse_margin_loan(self, info, currency=None):
|
5980
|
+
def parse_margin_loan(self, info, currency: Currency = None):
|
5981
5981
|
#
|
5982
5982
|
# isolated: borrowMargin
|
5983
5983
|
#
|
@@ -6030,7 +6030,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6030
6030
|
'info': info,
|
6031
6031
|
}
|
6032
6032
|
|
6033
|
-
async def fetch_my_liquidations(self, symbol:
|
6033
|
+
async def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6034
6034
|
"""
|
6035
6035
|
retrieves the users liquidated positions
|
6036
6036
|
:see: https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-liquidation-records
|
@@ -6122,7 +6122,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6122
6122
|
liquidations = self.safe_value(data, 'resultList', [])
|
6123
6123
|
return self.parse_liquidations(liquidations, market, since, limit)
|
6124
6124
|
|
6125
|
-
def parse_liquidation(self, liquidation, market=None):
|
6125
|
+
def parse_liquidation(self, liquidation, market: Market = None):
|
6126
6126
|
#
|
6127
6127
|
# isolated
|
6128
6128
|
#
|
@@ -6272,7 +6272,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6272
6272
|
first['timestamp'] = timestamp
|
6273
6273
|
return self.parse_borrow_rate(first, currency)
|
6274
6274
|
|
6275
|
-
def parse_borrow_rate(self, info, currency=None):
|
6275
|
+
def parse_borrow_rate(self, info, currency: Currency = None):
|
6276
6276
|
#
|
6277
6277
|
# isolated
|
6278
6278
|
#
|
@@ -6354,7 +6354,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6354
6354
|
'info': info,
|
6355
6355
|
}
|
6356
6356
|
|
6357
|
-
async def fetch_borrow_interest(self, code:
|
6357
|
+
async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6358
6358
|
"""
|
6359
6359
|
fetch the interest owed by the user for borrowing currency for margin trading
|
6360
6360
|
:see: https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-interest-records
|
@@ -6443,7 +6443,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6443
6443
|
interest = self.parse_borrow_interests(rows, market)
|
6444
6444
|
return self.filter_by_currency_since_limit(interest, code, since, limit)
|
6445
6445
|
|
6446
|
-
def parse_borrow_interest(self, info, market=None):
|
6446
|
+
def parse_borrow_interest(self, info, market: Market = None):
|
6447
6447
|
#
|
6448
6448
|
# isolated
|
6449
6449
|
#
|
ccxt/async_support/bithumb.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bithumb import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -339,7 +339,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
339
339
|
timestamp = self.safe_integer(data, 'timestamp')
|
340
340
|
return self.parse_order_book(data, symbol, timestamp, 'bids', 'asks', 'price', 'quantity')
|
341
341
|
|
342
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
342
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
343
343
|
#
|
344
344
|
# fetchTicker, fetchTickers
|
345
345
|
#
|
@@ -476,7 +476,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
476
476
|
data = self.safe_value(response, 'data', {})
|
477
477
|
return self.parse_ticker(data, market)
|
478
478
|
|
479
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
479
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
480
480
|
#
|
481
481
|
# [
|
482
482
|
# 1576823400000, # 기준 시간
|
@@ -540,7 +540,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
540
540
|
data = self.safe_value(response, 'data', [])
|
541
541
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
542
542
|
|
543
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
543
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
544
544
|
#
|
545
545
|
# fetchTrades(public)
|
546
546
|
#
|
@@ -683,7 +683,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
683
683
|
'id': id,
|
684
684
|
}, market)
|
685
685
|
|
686
|
-
async def fetch_order(self, id: str, symbol:
|
686
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
687
687
|
"""
|
688
688
|
fetches information on an order made by the user
|
689
689
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -738,7 +738,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
738
738
|
}
|
739
739
|
return self.safe_string(statuses, status, status)
|
740
740
|
|
741
|
-
def parse_order(self, order, market=None) -> Order:
|
741
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
742
742
|
#
|
743
743
|
#
|
744
744
|
# fetchOrder
|
@@ -831,7 +831,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
831
831
|
'trades': rawTrades,
|
832
832
|
}, market)
|
833
833
|
|
834
|
-
async def fetch_open_orders(self, symbol:
|
834
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
835
835
|
"""
|
836
836
|
fetch all unfilled currently open orders
|
837
837
|
:param str symbol: unified market symbol
|
@@ -873,7 +873,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
873
873
|
data = self.safe_value(response, 'data', [])
|
874
874
|
return self.parse_orders(data, market, since, limit)
|
875
875
|
|
876
|
-
async def cancel_order(self, id: str, symbol:
|
876
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
877
877
|
"""
|
878
878
|
cancels an open order
|
879
879
|
:param str id: order id
|
@@ -934,7 +934,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
934
934
|
#
|
935
935
|
return self.parse_transaction(response, currency)
|
936
936
|
|
937
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
937
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
938
938
|
#
|
939
939
|
# withdraw
|
940
940
|
#
|