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/bitget.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bitget import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory,
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -1860,7 +1860,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1860
1860
|
result = self.safe_value(response, 'data', [])
|
1861
1861
|
return self.parse_market_leverage_tiers(result, market)
|
1862
1862
|
|
1863
|
-
def parse_market_leverage_tiers(self, info, market=None):
|
1863
|
+
def parse_market_leverage_tiers(self, info, market: Market = None):
|
1864
1864
|
#
|
1865
1865
|
# swap and future
|
1866
1866
|
#
|
@@ -1924,7 +1924,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1924
1924
|
minNotional = maxNotional
|
1925
1925
|
return tiers
|
1926
1926
|
|
1927
|
-
def fetch_deposits(self, code:
|
1927
|
+
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1928
1928
|
"""
|
1929
1929
|
fetch all deposits made to an account
|
1930
1930
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-deposit-list
|
@@ -2067,7 +2067,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2067
2067
|
result['network'] = chain
|
2068
2068
|
return result
|
2069
2069
|
|
2070
|
-
def fetch_withdrawals(self, code:
|
2070
|
+
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2071
2071
|
"""
|
2072
2072
|
fetch all withdrawals made from an account
|
2073
2073
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-withdraw-list
|
@@ -2124,7 +2124,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2124
2124
|
rawTransactions = self.safe_value(response, 'data', [])
|
2125
2125
|
return self.parse_transactions(rawTransactions, currency, since, limit)
|
2126
2126
|
|
2127
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
2127
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2128
2128
|
#
|
2129
2129
|
# {
|
2130
2130
|
# "id": "925607360021839872",
|
@@ -2222,7 +2222,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2222
2222
|
data = self.safe_value(response, 'data', {})
|
2223
2223
|
return self.parse_deposit_address(data, currency)
|
2224
2224
|
|
2225
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
2225
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
2226
2226
|
#
|
2227
2227
|
# {
|
2228
2228
|
# "address": "1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv",
|
@@ -2281,7 +2281,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2281
2281
|
timestamp = self.safe_integer(data, 'timestamp')
|
2282
2282
|
return self.parse_order_book(data, symbol, timestamp)
|
2283
2283
|
|
2284
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
2284
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
2285
2285
|
#
|
2286
2286
|
# spot
|
2287
2287
|
#
|
@@ -2519,7 +2519,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2519
2519
|
data = self.safe_value(response, 'data')
|
2520
2520
|
return self.parse_tickers(data, symbols)
|
2521
2521
|
|
2522
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
2522
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
2523
2523
|
#
|
2524
2524
|
# spot
|
2525
2525
|
#
|
@@ -2806,7 +2806,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2806
2806
|
result[symbol] = fee
|
2807
2807
|
return result
|
2808
2808
|
|
2809
|
-
def parse_trading_fee(self, data, market=None):
|
2809
|
+
def parse_trading_fee(self, data, market: Market = None):
|
2810
2810
|
marketId = self.safe_string(data, 'symbol')
|
2811
2811
|
return {
|
2812
2812
|
'info': data,
|
@@ -2815,7 +2815,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2815
2815
|
'taker': self.safe_number(data, 'takerFeeRate'),
|
2816
2816
|
}
|
2817
2817
|
|
2818
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
2818
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
2819
2819
|
#
|
2820
2820
|
# spot
|
2821
2821
|
#
|
@@ -3164,7 +3164,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3164
3164
|
}
|
3165
3165
|
return self.safe_string(statuses, status, status)
|
3166
3166
|
|
3167
|
-
def parse_order(self, order, market=None) -> Order:
|
3167
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
3168
3168
|
#
|
3169
3169
|
# spot
|
3170
3170
|
# {
|
@@ -3715,7 +3715,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3715
3715
|
data = self.safe_value(response, 'data')
|
3716
3716
|
return self.parse_order(data, market)
|
3717
3717
|
|
3718
|
-
def cancel_order(self, id: str, symbol:
|
3718
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
3719
3719
|
"""
|
3720
3720
|
cancels an open order
|
3721
3721
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#cancel-order
|
@@ -3833,7 +3833,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3833
3833
|
order = resultList[0]
|
3834
3834
|
return self.parse_order(order, market)
|
3835
3835
|
|
3836
|
-
def cancel_orders(self, ids, symbol:
|
3836
|
+
def cancel_orders(self, ids, symbol: Str = None, params={}):
|
3837
3837
|
"""
|
3838
3838
|
cancel multiple orders
|
3839
3839
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#cancel-order-in-batch-v2-single-instruments
|
@@ -3908,7 +3908,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3908
3908
|
#
|
3909
3909
|
return response
|
3910
3910
|
|
3911
|
-
def cancel_all_orders(self, symbol:
|
3911
|
+
def cancel_all_orders(self, symbol: Str = None, params={}):
|
3912
3912
|
"""
|
3913
3913
|
cancel all open orders
|
3914
3914
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#cancel-all-order
|
@@ -3979,7 +3979,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3979
3979
|
#
|
3980
3980
|
return response
|
3981
3981
|
|
3982
|
-
def fetch_order(self, id: str, symbol:
|
3982
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
3983
3983
|
"""
|
3984
3984
|
fetches information on an order made by the user
|
3985
3985
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-order-details
|
@@ -4061,7 +4061,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4061
4061
|
first = self.safe_value(data, 0, data)
|
4062
4062
|
return self.parse_order(first, market)
|
4063
4063
|
|
4064
|
-
def fetch_open_orders(self, symbol:
|
4064
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
4065
4065
|
"""
|
4066
4066
|
fetch all unfilled currently open orders
|
4067
4067
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-order-list
|
@@ -4277,7 +4277,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4277
4277
|
return self.add_pagination_cursor_to_result(data, result)
|
4278
4278
|
return self.parse_orders(data, market, since, limit)
|
4279
4279
|
|
4280
|
-
def fetch_closed_orders(self, symbol:
|
4280
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
4281
4281
|
"""
|
4282
4282
|
fetches information on multiple closed orders made by the user
|
4283
4283
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-order-history
|
@@ -4312,7 +4312,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4312
4312
|
result.append(entry)
|
4313
4313
|
return self.parse_orders(result, market, since, limit)
|
4314
4314
|
|
4315
|
-
def fetch_canceled_orders(self, symbol:
|
4315
|
+
def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4316
4316
|
"""
|
4317
4317
|
fetches information on multiple canceled orders made by the user
|
4318
4318
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-order-history
|
@@ -4347,7 +4347,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4347
4347
|
result.append(entry)
|
4348
4348
|
return self.parse_orders(result, market, since, limit)
|
4349
4349
|
|
4350
|
-
def fetch_canceled_and_closed_orders(self, symbol:
|
4350
|
+
def fetch_canceled_and_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4351
4351
|
self.load_markets()
|
4352
4352
|
market = self.market(symbol)
|
4353
4353
|
marketType = None
|
@@ -4579,7 +4579,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4579
4579
|
data[dataLength - 1] = last
|
4580
4580
|
return data
|
4581
4581
|
|
4582
|
-
def fetch_ledger(self, code:
|
4582
|
+
def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
4583
4583
|
"""
|
4584
4584
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-bills
|
4585
4585
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
@@ -4628,7 +4628,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4628
4628
|
data = self.safe_value(response, 'data')
|
4629
4629
|
return self.parse_ledger(data, currency, since, limit)
|
4630
4630
|
|
4631
|
-
def parse_ledger_entry(self, item, currency=None):
|
4631
|
+
def parse_ledger_entry(self, item, currency: Currency = None):
|
4632
4632
|
#
|
4633
4633
|
# {
|
4634
4634
|
# "billId": "881626974170554368",
|
@@ -4673,7 +4673,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4673
4673
|
'fee': fee,
|
4674
4674
|
}
|
4675
4675
|
|
4676
|
-
def fetch_my_trades(self, symbol:
|
4676
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4677
4677
|
"""
|
4678
4678
|
fetch all trades made by the user
|
4679
4679
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-transaction-details
|
@@ -4820,7 +4820,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4820
4820
|
return self.parse_trades(fills, market, since, limit)
|
4821
4821
|
return self.parse_trades(data, market, since, limit)
|
4822
4822
|
|
4823
|
-
def fetch_order_trades(self, id: str, symbol:
|
4823
|
+
def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4824
4824
|
"""
|
4825
4825
|
fetch all the trades made from a single order
|
4826
4826
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-transaction-details
|
@@ -5030,7 +5030,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5030
5030
|
symbols = self.market_symbols(symbols)
|
5031
5031
|
return self.filter_by_array_positions(result, 'symbol', symbols, False)
|
5032
5032
|
|
5033
|
-
def parse_position(self, position, market=None):
|
5033
|
+
def parse_position(self, position, market: Market = None):
|
5034
5034
|
#
|
5035
5035
|
# {
|
5036
5036
|
# "marginCoin": "USDT",
|
@@ -5160,7 +5160,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5160
5160
|
'takeProfitPrice': None,
|
5161
5161
|
})
|
5162
5162
|
|
5163
|
-
def fetch_funding_rate_history(self, symbol:
|
5163
|
+
def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5164
5164
|
"""
|
5165
5165
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#get-history-funding-rate
|
5166
5166
|
fetches historical funding rate prices
|
@@ -5249,7 +5249,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5249
5249
|
data = self.safe_value(response, 'data', {})
|
5250
5250
|
return self.parse_funding_rate(data, market)
|
5251
5251
|
|
5252
|
-
def parse_funding_rate(self, contract, market=None):
|
5252
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
5253
5253
|
#
|
5254
5254
|
# {
|
5255
5255
|
# "symbol": "BTCUSDT_UMCBL",
|
@@ -5278,7 +5278,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5278
5278
|
'previousFundingDatetime': None,
|
5279
5279
|
}
|
5280
5280
|
|
5281
|
-
def fetch_funding_history(self, symbol:
|
5281
|
+
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5282
5282
|
"""
|
5283
5283
|
fetch the funding history
|
5284
5284
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#get-account-bill
|
@@ -5331,7 +5331,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5331
5331
|
result = self.safe_value(data, 'result', [])
|
5332
5332
|
return self.parse_funding_histories(result, market, since, limit)
|
5333
5333
|
|
5334
|
-
def parse_funding_history(self, contract, market=None):
|
5334
|
+
def parse_funding_history(self, contract, market: Market = None):
|
5335
5335
|
#
|
5336
5336
|
# {
|
5337
5337
|
# "id": "892962903462432768",
|
@@ -5401,7 +5401,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5401
5401
|
'type': type,
|
5402
5402
|
})
|
5403
5403
|
|
5404
|
-
def parse_margin_modification(self, data, market=None):
|
5404
|
+
def parse_margin_modification(self, data, market: Market = None):
|
5405
5405
|
errorCode = self.safe_string(data, 'code')
|
5406
5406
|
status = 'ok' if (errorCode == '00000') else 'failed'
|
5407
5407
|
code = market['quote'] if (market['linear']) else market['base']
|
@@ -5487,7 +5487,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5487
5487
|
#
|
5488
5488
|
return response
|
5489
5489
|
|
5490
|
-
def set_leverage(self, leverage, symbol:
|
5490
|
+
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
5491
5491
|
"""
|
5492
5492
|
set the level of leverage for a market
|
5493
5493
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#change-leverage
|
@@ -5507,7 +5507,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5507
5507
|
}
|
5508
5508
|
return self.privateMixPostMixV1AccountSetLeverage(self.extend(request, params))
|
5509
5509
|
|
5510
|
-
def set_margin_mode(self, marginMode, symbol:
|
5510
|
+
def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
5511
5511
|
"""
|
5512
5512
|
set margin mode to 'cross' or 'isolated'
|
5513
5513
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#change-margin-mode
|
@@ -5533,7 +5533,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5533
5533
|
}
|
5534
5534
|
return self.privateMixPostMixV1AccountSetMarginMode(self.extend(request, params))
|
5535
5535
|
|
5536
|
-
def set_position_mode(self, hedged, symbol:
|
5536
|
+
def set_position_mode(self, hedged, symbol: Str = None, params={}):
|
5537
5537
|
"""
|
5538
5538
|
set hedged to True or False for a market
|
5539
5539
|
:see: https://bitgetlimited.github.io/apidoc/en/mix/#change-hold-mode
|
@@ -5600,7 +5600,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5600
5600
|
data = self.safe_value(response, 'data', {})
|
5601
5601
|
return self.parse_open_interest(data, market)
|
5602
5602
|
|
5603
|
-
def fetch_transfers(self, code:
|
5603
|
+
def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
5604
5604
|
"""
|
5605
5605
|
fetch a history of internal transfers made on an account
|
5606
5606
|
:see: https://bitgetlimited.github.io/apidoc/en/spot/#get-transfer-list
|
@@ -5696,7 +5696,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5696
5696
|
#
|
5697
5697
|
return self.parse_transfer(response, currency)
|
5698
5698
|
|
5699
|
-
def parse_transfer(self, transfer, currency=None):
|
5699
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
5700
5700
|
#
|
5701
5701
|
# transfer
|
5702
5702
|
#
|
@@ -5745,7 +5745,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5745
5745
|
'status': self.parse_transfer_status(msg),
|
5746
5746
|
}
|
5747
5747
|
|
5748
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
5748
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
5749
5749
|
#
|
5750
5750
|
# {
|
5751
5751
|
# "chains": [
|
@@ -5829,7 +5829,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5829
5829
|
}
|
5830
5830
|
return self.safe_string(statuses, status, status)
|
5831
5831
|
|
5832
|
-
def parse_open_interest(self, interest, market=None):
|
5832
|
+
def parse_open_interest(self, interest, market: Market = None):
|
5833
5833
|
#
|
5834
5834
|
# {
|
5835
5835
|
# "symbol": "BTCUSDT_UMCBL",
|
@@ -5850,7 +5850,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5850
5850
|
'info': interest,
|
5851
5851
|
}, market)
|
5852
5852
|
|
5853
|
-
def borrow_margin(self, code: str, amount, symbol:
|
5853
|
+
def borrow_margin(self, code: str, amount, symbol: Str = None, params={}):
|
5854
5854
|
"""
|
5855
5855
|
create a loan to borrow margin
|
5856
5856
|
:see: https://bitgetlimited.github.io/apidoc/en/margin/#cross-borrow
|
@@ -5912,7 +5912,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5912
5912
|
data = self.safe_value(response, 'data', {})
|
5913
5913
|
return self.parse_margin_loan(data, currency)
|
5914
5914
|
|
5915
|
-
def repay_margin(self, code: str, amount, symbol:
|
5915
|
+
def repay_margin(self, code: str, amount, symbol: Str = None, params={}):
|
5916
5916
|
"""
|
5917
5917
|
repay borrowed margin and interest
|
5918
5918
|
:see: https://bitgetlimited.github.io/apidoc/en/margin/#cross-repay
|
@@ -5976,7 +5976,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5976
5976
|
data = self.safe_value(response, 'data', {})
|
5977
5977
|
return self.parse_margin_loan(data, currency)
|
5978
5978
|
|
5979
|
-
def parse_margin_loan(self, info, currency=None):
|
5979
|
+
def parse_margin_loan(self, info, currency: Currency = None):
|
5980
5980
|
#
|
5981
5981
|
# isolated: borrowMargin
|
5982
5982
|
#
|
@@ -6029,7 +6029,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6029
6029
|
'info': info,
|
6030
6030
|
}
|
6031
6031
|
|
6032
|
-
def fetch_my_liquidations(self, symbol:
|
6032
|
+
def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6033
6033
|
"""
|
6034
6034
|
retrieves the users liquidated positions
|
6035
6035
|
:see: https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-liquidation-records
|
@@ -6121,7 +6121,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6121
6121
|
liquidations = self.safe_value(data, 'resultList', [])
|
6122
6122
|
return self.parse_liquidations(liquidations, market, since, limit)
|
6123
6123
|
|
6124
|
-
def parse_liquidation(self, liquidation, market=None):
|
6124
|
+
def parse_liquidation(self, liquidation, market: Market = None):
|
6125
6125
|
#
|
6126
6126
|
# isolated
|
6127
6127
|
#
|
@@ -6271,7 +6271,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6271
6271
|
first['timestamp'] = timestamp
|
6272
6272
|
return self.parse_borrow_rate(first, currency)
|
6273
6273
|
|
6274
|
-
def parse_borrow_rate(self, info, currency=None):
|
6274
|
+
def parse_borrow_rate(self, info, currency: Currency = None):
|
6275
6275
|
#
|
6276
6276
|
# isolated
|
6277
6277
|
#
|
@@ -6353,7 +6353,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6353
6353
|
'info': info,
|
6354
6354
|
}
|
6355
6355
|
|
6356
|
-
def fetch_borrow_interest(self, code:
|
6356
|
+
def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6357
6357
|
"""
|
6358
6358
|
fetch the interest owed by the user for borrowing currency for margin trading
|
6359
6359
|
:see: https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-interest-records
|
@@ -6442,7 +6442,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6442
6442
|
interest = self.parse_borrow_interests(rows, market)
|
6443
6443
|
return self.filter_by_currency_since_limit(interest, code, since, limit)
|
6444
6444
|
|
6445
|
-
def parse_borrow_interest(self, info, market=None):
|
6445
|
+
def parse_borrow_interest(self, info, market: Market = None):
|
6446
6446
|
#
|
6447
6447
|
# isolated
|
6448
6448
|
#
|
ccxt/bithumb.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_order(self, id: str, symbol:
|
686
|
+
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
|
-
def fetch_open_orders(self, symbol:
|
834
|
+
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
|
-
def cancel_order(self, id: str, symbol:
|
876
|
+
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
|
#
|