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/bitmex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitmex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Market, 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
|
@@ -60,8 +60,8 @@ class bitmex(Exchange, ImplicitAPI):
|
|
60
60
|
'fetchDepositAddresses': False,
|
61
61
|
'fetchDepositAddressesByNetwork': False,
|
62
62
|
'fetchDepositsWithdrawals': 'emulated',
|
63
|
-
'
|
64
|
-
'
|
63
|
+
'fetchDepositWithdrawFee': 'emulated',
|
64
|
+
'fetchDepositWithdrawFees': True,
|
65
65
|
'fetchFundingHistory': False,
|
66
66
|
'fetchFundingRate': False,
|
67
67
|
'fetchFundingRateHistory': True,
|
@@ -813,7 +813,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
813
813
|
result['asks'] = self.sort_by(result['asks'], 0)
|
814
814
|
return result
|
815
815
|
|
816
|
-
async def fetch_order(self, id: str, symbol:
|
816
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
817
817
|
"""
|
818
818
|
fetches information on an order made by the user
|
819
819
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -831,7 +831,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
831
831
|
return response[0]
|
832
832
|
raise OrderNotFound(self.id + ': The order ' + id + ' not found.')
|
833
833
|
|
834
|
-
async def fetch_orders(self, symbol:
|
834
|
+
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
835
835
|
"""
|
836
836
|
:see: https://www.bitmex.com/api/explorer/#not /Order/Order_getOrders
|
837
837
|
fetches information on multiple orders made by the user
|
@@ -870,7 +870,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
870
870
|
response = await self.privateGetOrder(request)
|
871
871
|
return self.parse_orders(response, market, since, limit)
|
872
872
|
|
873
|
-
async def fetch_open_orders(self, symbol:
|
873
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
874
874
|
"""
|
875
875
|
fetch all unfilled currently open orders
|
876
876
|
:param str symbol: unified market symbol
|
@@ -886,7 +886,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
886
886
|
}
|
887
887
|
return await self.fetch_orders(symbol, since, limit, self.deep_extend(request, params))
|
888
888
|
|
889
|
-
async def fetch_closed_orders(self, symbol:
|
889
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
890
890
|
"""
|
891
891
|
fetches information on multiple closed orders made by the user
|
892
892
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -899,7 +899,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
899
899
|
orders = await self.fetch_orders(symbol, since, limit, params)
|
900
900
|
return self.filter_by_array(orders, 'status', ['closed', 'canceled'], False)
|
901
901
|
|
902
|
-
async def fetch_my_trades(self, symbol:
|
902
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
903
903
|
"""
|
904
904
|
:see: https://www.bitmex.com/api/explorer/#not /Execution/Execution_getTradeHistory
|
905
905
|
fetch all trades made by the user
|
@@ -1002,7 +1002,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1002
1002
|
}
|
1003
1003
|
return self.safe_string(types, type, type)
|
1004
1004
|
|
1005
|
-
def parse_ledger_entry(self, item, currency=None):
|
1005
|
+
def parse_ledger_entry(self, item, currency: Currency = None):
|
1006
1006
|
#
|
1007
1007
|
# {
|
1008
1008
|
# "transactID": "69573da3-7744-5467-3207-89fd6efe7a47",
|
@@ -1095,7 +1095,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1095
1095
|
'fee': fee,
|
1096
1096
|
}
|
1097
1097
|
|
1098
|
-
async def fetch_ledger(self, code:
|
1098
|
+
async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1099
1099
|
"""
|
1100
1100
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
1101
1101
|
:param str code: unified currency code, default is None
|
@@ -1142,7 +1142,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1142
1142
|
#
|
1143
1143
|
return self.parse_ledger(response, currency, since, limit)
|
1144
1144
|
|
1145
|
-
async def fetch_deposits_withdrawals(self, code:
|
1145
|
+
async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1146
1146
|
"""
|
1147
1147
|
fetch history of deposits and withdrawals
|
1148
1148
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
@@ -1180,7 +1180,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1180
1180
|
}
|
1181
1181
|
return self.safe_string(statuses, status, status)
|
1182
1182
|
|
1183
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1183
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1184
1184
|
#
|
1185
1185
|
# {
|
1186
1186
|
# "transactID": "ffe699c2-95ee-4c13-91f9-0faf41daec25",
|
@@ -1290,7 +1290,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1290
1290
|
result[symbol] = ticker
|
1291
1291
|
return self.filter_by_array_tickers(result, 'symbol', symbols)
|
1292
1292
|
|
1293
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
1293
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
1294
1294
|
# see response sample under "fetchMarkets" because same endpoint is being used here
|
1295
1295
|
marketId = self.safe_string(ticker, 'symbol')
|
1296
1296
|
symbol = self.safe_symbol(marketId, market)
|
@@ -1320,7 +1320,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1320
1320
|
'info': ticker,
|
1321
1321
|
}, market)
|
1322
1322
|
|
1323
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1323
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1324
1324
|
#
|
1325
1325
|
# {
|
1326
1326
|
# "timestamp":"2015-09-25T13:38:00.000Z",
|
@@ -1418,7 +1418,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1418
1418
|
result[i][0] = result[i][0] - duration
|
1419
1419
|
return result
|
1420
1420
|
|
1421
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
1421
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1422
1422
|
#
|
1423
1423
|
# fetchTrades(public)
|
1424
1424
|
#
|
@@ -1556,7 +1556,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1556
1556
|
}
|
1557
1557
|
return self.safe_string(timeInForces, timeInForce, timeInForce)
|
1558
1558
|
|
1559
|
-
def parse_order(self, order, market=None) -> Order:
|
1559
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1560
1560
|
#
|
1561
1561
|
# {
|
1562
1562
|
# "orderID":"56222c7a-9956-413a-82cf-99f4812c214b",
|
@@ -1776,7 +1776,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1776
1776
|
response = await self.privatePutOrder(self.extend(request, params))
|
1777
1777
|
return self.parse_order(response)
|
1778
1778
|
|
1779
|
-
async def cancel_order(self, id: str, symbol:
|
1779
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1780
1780
|
"""
|
1781
1781
|
cancels an open order
|
1782
1782
|
:param str id: order id
|
@@ -1801,7 +1801,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1801
1801
|
raise OrderNotFound(self.id + ' cancelOrder() failed: ' + error)
|
1802
1802
|
return self.parse_order(order)
|
1803
1803
|
|
1804
|
-
async def cancel_orders(self, ids, symbol:
|
1804
|
+
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
1805
1805
|
"""
|
1806
1806
|
cancel multiple orders
|
1807
1807
|
:param str[] ids: order ids
|
@@ -1822,7 +1822,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1822
1822
|
response = await self.privateDeleteOrder(self.extend(request, params))
|
1823
1823
|
return self.parse_orders(response)
|
1824
1824
|
|
1825
|
-
async def cancel_all_orders(self, symbol:
|
1825
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1826
1826
|
"""
|
1827
1827
|
cancel all open orders
|
1828
1828
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
@@ -1986,7 +1986,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
1986
1986
|
results = self.parse_positions(response, symbols)
|
1987
1987
|
return self.filter_by_array_positions(results, 'symbol', symbols, False)
|
1988
1988
|
|
1989
|
-
def parse_position(self, position, market=None):
|
1989
|
+
def parse_position(self, position, market: Market = None):
|
1990
1990
|
#
|
1991
1991
|
# {
|
1992
1992
|
# "account": 9371654,
|
@@ -2197,7 +2197,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2197
2197
|
result = self.parse_funding_rates(filteredResponse)
|
2198
2198
|
return self.filter_by_array(result, 'symbol', symbols)
|
2199
2199
|
|
2200
|
-
def parse_funding_rate(self, contract, market=None):
|
2200
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
2201
2201
|
# see response sample under "fetchMarkets" because same endpoint is being used here
|
2202
2202
|
datetime = self.safe_string(contract, 'timestamp')
|
2203
2203
|
marketId = self.safe_string(contract, 'symbol')
|
@@ -2222,7 +2222,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2222
2222
|
'previousFundingDatetime': None,
|
2223
2223
|
}
|
2224
2224
|
|
2225
|
-
async def fetch_funding_rate_history(self, symbol:
|
2225
|
+
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2226
2226
|
"""
|
2227
2227
|
Fetches the history of funding rates
|
2228
2228
|
:param str symbol: unified symbol of the market to fetch the funding rate history for
|
@@ -2276,7 +2276,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2276
2276
|
#
|
2277
2277
|
return self.parse_funding_rate_histories(response, market, since, limit)
|
2278
2278
|
|
2279
|
-
def parse_funding_rate_history(self, info, market=None):
|
2279
|
+
def parse_funding_rate_history(self, info, market: Market = None):
|
2280
2280
|
#
|
2281
2281
|
# {
|
2282
2282
|
# "timestamp": "2016-05-07T12:00:00.000Z",
|
@@ -2296,7 +2296,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2296
2296
|
'datetime': datetime,
|
2297
2297
|
}
|
2298
2298
|
|
2299
|
-
async def set_leverage(self, leverage, symbol:
|
2299
|
+
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
2300
2300
|
"""
|
2301
2301
|
set the level of leverage for a market
|
2302
2302
|
:param float leverage: the rate of leverage
|
@@ -2317,7 +2317,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2317
2317
|
}
|
2318
2318
|
return await self.privatePostPositionLeverage(self.extend(request, params))
|
2319
2319
|
|
2320
|
-
async def set_margin_mode(self, marginMode, symbol:
|
2320
|
+
async def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
2321
2321
|
"""
|
2322
2322
|
set margin mode to 'cross' or 'isolated'
|
2323
2323
|
:param str marginMode: 'cross' or 'isolated'
|
@@ -2375,7 +2375,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2375
2375
|
'info': response,
|
2376
2376
|
}
|
2377
2377
|
|
2378
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
2378
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
2379
2379
|
#
|
2380
2380
|
# {
|
2381
2381
|
# "asset": "XBT",
|
@@ -2526,7 +2526,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2526
2526
|
#
|
2527
2527
|
return self.parse_liquidations(response, market, since, limit)
|
2528
2528
|
|
2529
|
-
def parse_liquidation(self, liquidation, market=None):
|
2529
|
+
def parse_liquidation(self, liquidation, market: Market = None):
|
2530
2530
|
#
|
2531
2531
|
# {
|
2532
2532
|
# "orderID": "string",
|
ccxt/async_support/bitopro.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bitopro import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import math
|
10
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, 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 ArgumentsRequired
|
@@ -368,7 +368,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
368
368
|
'info': market,
|
369
369
|
}
|
370
370
|
|
371
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
371
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
372
372
|
#
|
373
373
|
# {
|
374
374
|
# "pair":"btc_twd",
|
@@ -503,7 +503,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
503
503
|
#
|
504
504
|
return self.parse_order_book(response, market['symbol'], None, 'bids', 'asks', 'price', 'amount')
|
505
505
|
|
506
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
506
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
507
507
|
#
|
508
508
|
# fetchTrades
|
509
509
|
# {
|
@@ -700,7 +700,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
700
700
|
}
|
701
701
|
return result
|
702
702
|
|
703
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
703
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
704
704
|
return [
|
705
705
|
self.safe_integer(ohlcv, 'timestamp'),
|
706
706
|
self.safe_number(ohlcv, 'open'),
|
@@ -858,7 +858,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
858
858
|
}
|
859
859
|
return self.safe_string(statuses, status, None)
|
860
860
|
|
861
|
-
def parse_order(self, order, market=None) -> Order:
|
861
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
862
862
|
#
|
863
863
|
# createOrder
|
864
864
|
# {
|
@@ -998,7 +998,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
998
998
|
#
|
999
999
|
return self.parse_order(response, market)
|
1000
1000
|
|
1001
|
-
async def cancel_order(self, id: str, symbol:
|
1001
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1002
1002
|
"""
|
1003
1003
|
cancels an open order
|
1004
1004
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/cancel_an_order.md
|
@@ -1026,7 +1026,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1026
1026
|
#
|
1027
1027
|
return self.parse_order(response, market)
|
1028
1028
|
|
1029
|
-
async def cancel_orders(self, ids, symbol:
|
1029
|
+
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
1030
1030
|
"""
|
1031
1031
|
cancel multiple orders
|
1032
1032
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/cancel_batch_orders.md
|
@@ -1054,7 +1054,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1054
1054
|
#
|
1055
1055
|
return response
|
1056
1056
|
|
1057
|
-
async def cancel_all_orders(self, symbol:
|
1057
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1058
1058
|
"""
|
1059
1059
|
cancel all open orders
|
1060
1060
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/cancel_all_orders.md
|
@@ -1086,7 +1086,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1086
1086
|
#
|
1087
1087
|
return result
|
1088
1088
|
|
1089
|
-
async def fetch_order(self, id: str, symbol:
|
1089
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1090
1090
|
"""
|
1091
1091
|
fetches information on an order made by the user
|
1092
1092
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_an_order_data.md
|
@@ -1127,7 +1127,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1127
1127
|
#
|
1128
1128
|
return self.parse_order(response, market)
|
1129
1129
|
|
1130
|
-
async def fetch_orders(self, symbol:
|
1130
|
+
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1131
1131
|
"""
|
1132
1132
|
fetches information on multiple orders made by the user
|
1133
1133
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_orders_data.md
|
@@ -1183,13 +1183,13 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1183
1183
|
#
|
1184
1184
|
return self.parse_orders(orders, market, since, limit)
|
1185
1185
|
|
1186
|
-
def fetch_open_orders(self, symbol:
|
1186
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1187
1187
|
request = {
|
1188
1188
|
'statusKind': 'OPEN',
|
1189
1189
|
}
|
1190
1190
|
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1191
1191
|
|
1192
|
-
async def fetch_closed_orders(self, symbol:
|
1192
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1193
1193
|
"""
|
1194
1194
|
fetches information on multiple closed orders made by the user
|
1195
1195
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_orders_data.md
|
@@ -1204,7 +1204,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1204
1204
|
}
|
1205
1205
|
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1206
1206
|
|
1207
|
-
async def fetch_my_trades(self, symbol:
|
1207
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1208
1208
|
"""
|
1209
1209
|
fetch all trades made by the user
|
1210
1210
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_trades_data.md
|
@@ -1257,7 +1257,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1257
1257
|
}
|
1258
1258
|
return self.safe_string(states, status, status)
|
1259
1259
|
|
1260
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1260
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1261
1261
|
#
|
1262
1262
|
# fetchDeposits
|
1263
1263
|
#
|
@@ -1338,7 +1338,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1338
1338
|
},
|
1339
1339
|
}
|
1340
1340
|
|
1341
|
-
async def fetch_deposits(self, code:
|
1341
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1342
1342
|
"""
|
1343
1343
|
fetch all deposits made to an account
|
1344
1344
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_deposit_invoices_data.md
|
@@ -1385,7 +1385,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1385
1385
|
#
|
1386
1386
|
return self.parse_transactions(result, currency, since, limit, {'type': 'deposit'})
|
1387
1387
|
|
1388
|
-
async def fetch_withdrawals(self, code:
|
1388
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1389
1389
|
"""
|
1390
1390
|
fetch all withdrawals made from an account
|
1391
1391
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_withdraw_invoices_data.md
|
@@ -1431,7 +1431,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1431
1431
|
#
|
1432
1432
|
return self.parse_transactions(result, currency, since, limit, {'type': 'withdrawal'})
|
1433
1433
|
|
1434
|
-
async def fetch_withdrawal(self, id: str, code:
|
1434
|
+
async def fetch_withdrawal(self, id: str, code: Str = None, params={}):
|
1435
1435
|
"""
|
1436
1436
|
fetch data on a currency withdrawal via the withdrawal id
|
1437
1437
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_an_withdraw_invoice_data.md
|
@@ -1515,7 +1515,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1515
1515
|
#
|
1516
1516
|
return self.parse_transaction(result, currency)
|
1517
1517
|
|
1518
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
1518
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
1519
1519
|
# {
|
1520
1520
|
# "currency":"eth",
|
1521
1521
|
# "withdrawFee":"0.007",
|
ccxt/async_support/bitpanda.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitpanda import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
8
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import PermissionDenied
|
@@ -538,7 +538,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
538
538
|
}
|
539
539
|
return result
|
540
540
|
|
541
|
-
def parse_fee_tiers(self, feeTiers, market=None):
|
541
|
+
def parse_fee_tiers(self, feeTiers, market: Market = None):
|
542
542
|
takerFees = []
|
543
543
|
makerFees = []
|
544
544
|
for i in range(0, len(feeTiers)):
|
@@ -555,7 +555,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
555
555
|
'taker': takerFees,
|
556
556
|
}
|
557
557
|
|
558
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
558
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
559
559
|
#
|
560
560
|
# fetchTicker, fetchTickers
|
561
561
|
#
|
@@ -757,7 +757,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
757
757
|
timestamp = self.parse8601(self.safe_string(response, 'time'))
|
758
758
|
return self.parse_order_book(response, market['symbol'], timestamp, 'bids', 'asks', 'price', 'amount')
|
759
759
|
|
760
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
760
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
761
761
|
#
|
762
762
|
# {
|
763
763
|
# "instrument_code":"BTC_EUR",
|
@@ -841,7 +841,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
841
841
|
#
|
842
842
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
843
843
|
|
844
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
844
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
845
845
|
#
|
846
846
|
# fetchTrades(public)
|
847
847
|
#
|
@@ -997,7 +997,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
997
997
|
#
|
998
998
|
return self.parse_balance(response)
|
999
999
|
|
1000
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
1000
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1001
1001
|
code = None
|
1002
1002
|
if currency is not None:
|
1003
1003
|
code = currency['code']
|
@@ -1059,7 +1059,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1059
1059
|
#
|
1060
1060
|
return self.parse_deposit_address(response, currency)
|
1061
1061
|
|
1062
|
-
async def fetch_deposits(self, code:
|
1062
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1063
1063
|
"""
|
1064
1064
|
fetch all deposits made to an account
|
1065
1065
|
:param str code: unified currency code
|
@@ -1117,7 +1117,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1117
1117
|
depositHistory = self.safe_value(response, 'deposit_history', [])
|
1118
1118
|
return self.parse_transactions(depositHistory, currency, since, limit, {'type': 'deposit'})
|
1119
1119
|
|
1120
|
-
async def fetch_withdrawals(self, code:
|
1120
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1121
1121
|
"""
|
1122
1122
|
fetch all withdrawals made from an account
|
1123
1123
|
:param str code: unified currency code
|
@@ -1231,7 +1231,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1231
1231
|
#
|
1232
1232
|
return self.parse_transaction(response, currency)
|
1233
1233
|
|
1234
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1234
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1235
1235
|
#
|
1236
1236
|
# fetchDeposits, fetchWithdrawals
|
1237
1237
|
#
|
@@ -1322,7 +1322,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1322
1322
|
}
|
1323
1323
|
return self.safe_string(statuses, status, status)
|
1324
1324
|
|
1325
|
-
def parse_order(self, order, market=None) -> Order:
|
1325
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1326
1326
|
#
|
1327
1327
|
# createOrder
|
1328
1328
|
#
|
@@ -1504,7 +1504,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1504
1504
|
#
|
1505
1505
|
return self.parse_order(response, market)
|
1506
1506
|
|
1507
|
-
async def cancel_order(self, id: str, symbol:
|
1507
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1508
1508
|
"""
|
1509
1509
|
cancels an open order
|
1510
1510
|
:param str id: order id
|
@@ -1528,7 +1528,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1528
1528
|
#
|
1529
1529
|
return response
|
1530
1530
|
|
1531
|
-
async def cancel_all_orders(self, symbol:
|
1531
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1532
1532
|
"""
|
1533
1533
|
cancel all open orders
|
1534
1534
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
@@ -1548,7 +1548,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1548
1548
|
#
|
1549
1549
|
return response
|
1550
1550
|
|
1551
|
-
async def cancel_orders(self, ids, symbol:
|
1551
|
+
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
1552
1552
|
"""
|
1553
1553
|
cancel multiple orders
|
1554
1554
|
:param str[] ids: order ids
|
@@ -1568,7 +1568,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1568
1568
|
#
|
1569
1569
|
return response
|
1570
1570
|
|
1571
|
-
async def fetch_order(self, id: str, symbol:
|
1571
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1572
1572
|
"""
|
1573
1573
|
fetches information on an order made by the user
|
1574
1574
|
:param str symbol: not used by bitpanda fetchOrder
|
@@ -1623,7 +1623,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1623
1623
|
#
|
1624
1624
|
return self.parse_order(response)
|
1625
1625
|
|
1626
|
-
async def fetch_open_orders(self, symbol:
|
1626
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1627
1627
|
"""
|
1628
1628
|
fetch all unfilled currently open orders
|
1629
1629
|
:param str symbol: unified market symbol
|
@@ -1737,7 +1737,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1737
1737
|
orderHistory = self.safe_value(response, 'order_history', [])
|
1738
1738
|
return self.parse_orders(orderHistory, market, since, limit)
|
1739
1739
|
|
1740
|
-
async def fetch_closed_orders(self, symbol:
|
1740
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1741
1741
|
"""
|
1742
1742
|
fetches information on multiple closed orders made by the user
|
1743
1743
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1751,7 +1751,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1751
1751
|
}
|
1752
1752
|
return await self.fetch_open_orders(symbol, since, limit, self.extend(request, params))
|
1753
1753
|
|
1754
|
-
async def fetch_order_trades(self, id: str, symbol:
|
1754
|
+
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1755
1755
|
"""
|
1756
1756
|
fetch all the trades made from a single order
|
1757
1757
|
:param str id: order id
|
@@ -1806,7 +1806,7 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
1806
1806
|
market = self.market(symbol)
|
1807
1807
|
return self.parse_trades(tradeHistory, market, since, limit)
|
1808
1808
|
|
1809
|
-
async def fetch_my_trades(self, symbol:
|
1809
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1810
1810
|
"""
|
1811
1811
|
fetch all trades made by the user
|
1812
1812
|
:param str symbol: unified market symbol
|
ccxt/async_support/bitrue.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bitrue import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, 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
|
@@ -787,7 +787,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
787
787
|
orderbook['nonce'] = self.safe_integer(response, 'lastUpdateId')
|
788
788
|
return orderbook
|
789
789
|
|
790
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
790
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
791
791
|
#
|
792
792
|
# fetchBidsAsks
|
793
793
|
#
|
@@ -921,7 +921,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
921
921
|
data = self.safe_value(response, 'data', [])
|
922
922
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
923
923
|
|
924
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
924
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
925
925
|
#
|
926
926
|
# {
|
927
927
|
# "i":"1660825020",
|
@@ -1013,7 +1013,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1013
1013
|
tickers[marketId] = data[marketIds[i]]
|
1014
1014
|
return self.parse_tickers(tickers, symbols)
|
1015
1015
|
|
1016
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
1016
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1017
1017
|
#
|
1018
1018
|
# aggregate trades
|
1019
1019
|
# - "T" is timestamp of *api-call* not trades. Use more expensive v1PublicGetHistoricalTrades if actual timestamp of trades matter
|
@@ -1170,7 +1170,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1170
1170
|
}
|
1171
1171
|
return self.safe_string(statuses, status, status)
|
1172
1172
|
|
1173
|
-
def parse_order(self, order, market=None) -> Order:
|
1173
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1174
1174
|
#
|
1175
1175
|
# createOrder
|
1176
1176
|
#
|
@@ -1319,7 +1319,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1319
1319
|
#
|
1320
1320
|
return self.parse_order(response, market)
|
1321
1321
|
|
1322
|
-
async def fetch_order(self, id: str, symbol:
|
1322
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1323
1323
|
"""
|
1324
1324
|
fetches information on an order made by the user
|
1325
1325
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -1341,7 +1341,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1341
1341
|
response = await self.v1PrivateGetOrder(self.extend(request, query))
|
1342
1342
|
return self.parse_order(response, market)
|
1343
1343
|
|
1344
|
-
async def fetch_closed_orders(self, symbol:
|
1344
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1345
1345
|
"""
|
1346
1346
|
fetches information on multiple closed orders made by the user
|
1347
1347
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1389,7 +1389,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1389
1389
|
#
|
1390
1390
|
return self.parse_orders(response, market, since, limit)
|
1391
1391
|
|
1392
|
-
async def fetch_open_orders(self, symbol:
|
1392
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1393
1393
|
"""
|
1394
1394
|
fetch all unfilled currently open orders
|
1395
1395
|
:param str symbol: unified market symbol
|
@@ -1429,7 +1429,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1429
1429
|
#
|
1430
1430
|
return self.parse_orders(response, market, since, limit)
|
1431
1431
|
|
1432
|
-
async def cancel_order(self, id: str, symbol:
|
1432
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1433
1433
|
"""
|
1434
1434
|
cancels an open order
|
1435
1435
|
:param str id: order id
|
@@ -1463,7 +1463,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1463
1463
|
#
|
1464
1464
|
return self.parse_order(response, market)
|
1465
1465
|
|
1466
|
-
async def fetch_my_trades(self, symbol:
|
1466
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1467
1467
|
"""
|
1468
1468
|
fetch all trades made by the user
|
1469
1469
|
:param str symbol: unified market symbol
|
@@ -1512,7 +1512,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1512
1512
|
#
|
1513
1513
|
return self.parse_trades(response, market, since, limit)
|
1514
1514
|
|
1515
|
-
async def fetch_deposits(self, code:
|
1515
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1516
1516
|
"""
|
1517
1517
|
fetch all deposits made to an account
|
1518
1518
|
:param str code: unified currency code
|
@@ -1578,7 +1578,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1578
1578
|
data = self.safe_value(response, 'data', [])
|
1579
1579
|
return self.parse_transactions(data, currency, since, limit)
|
1580
1580
|
|
1581
|
-
async def fetch_withdrawals(self, code:
|
1581
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1582
1582
|
"""
|
1583
1583
|
fetch all withdrawals made from an account
|
1584
1584
|
:param str code: unified currency code
|
@@ -1637,7 +1637,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1637
1637
|
statuses = self.safe_value(statusesByType, type, {})
|
1638
1638
|
return self.safe_string(statuses, status, status)
|
1639
1639
|
|
1640
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1640
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1641
1641
|
#
|
1642
1642
|
# fetchDeposits
|
1643
1643
|
#
|
@@ -1812,7 +1812,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1812
1812
|
data = self.safe_value(response, 'data')
|
1813
1813
|
return self.parse_transaction(data, currency)
|
1814
1814
|
|
1815
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
1815
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
1816
1816
|
#
|
1817
1817
|
# {
|
1818
1818
|
# "coin": "adx",
|