ccxt 4.3.29__py2.py3-none-any.whl → 4.3.31__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +1 -1
- ccxt/abstract/binance.py +2 -0
- ccxt/abstract/binancecoinm.py +2 -0
- ccxt/abstract/binanceus.py +2 -0
- ccxt/abstract/binanceusdm.py +2 -0
- ccxt/ace.py +14 -14
- ccxt/alpaca.py +16 -16
- ccxt/ascendex.py +46 -46
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +14 -14
- ccxt/async_support/alpaca.py +16 -16
- ccxt/async_support/ascendex.py +46 -46
- ccxt/async_support/base/exchange.py +23 -23
- ccxt/async_support/base/ws/aiohttp_client.py +1 -0
- ccxt/async_support/base/ws/future.py +27 -29
- ccxt/async_support/bigone.py +32 -32
- ccxt/async_support/binance.py +105 -96
- ccxt/async_support/bingx.py +22 -22
- ccxt/async_support/bit2c.py +13 -13
- ccxt/async_support/bitbank.py +19 -19
- ccxt/async_support/bitbns.py +17 -17
- ccxt/async_support/bitfinex.py +24 -24
- ccxt/async_support/bitfinex2.py +142 -109
- ccxt/async_support/bitflyer.py +23 -23
- ccxt/async_support/bitget.py +76 -76
- ccxt/async_support/bithumb.py +20 -20
- ccxt/async_support/bitmart.py +55 -55
- ccxt/async_support/bitmex.py +41 -41
- ccxt/async_support/bitopro.py +30 -30
- ccxt/async_support/bitrue.py +37 -37
- ccxt/async_support/bitso.py +30 -30
- ccxt/async_support/bitstamp.py +31 -31
- ccxt/async_support/bitteam.py +26 -26
- ccxt/async_support/bitvavo.py +27 -27
- ccxt/async_support/bl3p.py +8 -8
- ccxt/async_support/blockchaincom.py +24 -24
- ccxt/async_support/blofin.py +37 -37
- ccxt/async_support/btcalpha.py +19 -19
- ccxt/async_support/btcbox.py +11 -11
- ccxt/async_support/btcmarkets.py +22 -22
- ccxt/async_support/btcturk.py +13 -13
- ccxt/async_support/bybit.py +96 -96
- ccxt/async_support/cex.py +21 -21
- ccxt/async_support/coinbase.py +53 -53
- ccxt/async_support/coinbaseexchange.py +29 -29
- ccxt/async_support/coinbaseinternational.py +32 -32
- ccxt/async_support/coincheck.py +14 -14
- ccxt/async_support/coinex.py +424 -448
- ccxt/async_support/coinlist.py +35 -35
- ccxt/async_support/coinmate.py +22 -22
- ccxt/async_support/coinmetro.py +22 -22
- ccxt/async_support/coinone.py +18 -18
- ccxt/async_support/coinsph.py +32 -32
- ccxt/async_support/coinspot.py +8 -8
- ccxt/async_support/cryptocom.py +43 -43
- ccxt/async_support/currencycom.py +33 -33
- ccxt/async_support/delta.py +35 -35
- ccxt/async_support/deribit.py +54 -54
- ccxt/async_support/digifinex.py +56 -56
- ccxt/async_support/exmo.py +34 -34
- ccxt/async_support/gate.py +60 -60
- ccxt/async_support/gemini.py +24 -24
- ccxt/async_support/hitbtc.py +51 -51
- ccxt/async_support/hollaex.py +29 -29
- ccxt/async_support/htx.py +73 -73
- ccxt/async_support/huobijp.py +30 -30
- ccxt/async_support/hyperliquid.py +58 -58
- ccxt/async_support/idex.py +33 -33
- ccxt/async_support/independentreserve.py +12 -12
- ccxt/async_support/indodax.py +21 -21
- ccxt/async_support/kraken.py +46 -51
- ccxt/async_support/krakenfutures.py +29 -29
- ccxt/async_support/kucoin.py +51 -51
- ccxt/async_support/kucoinfutures.py +33 -33
- ccxt/async_support/kuna.py +27 -27
- ccxt/async_support/latoken.py +27 -27
- ccxt/async_support/lbank.py +35 -35
- ccxt/async_support/luno.py +19 -19
- ccxt/async_support/lykke.py +20 -20
- ccxt/async_support/mercado.py +17 -17
- ccxt/async_support/mexc.py +64 -64
- ccxt/async_support/ndax.py +38 -38
- ccxt/async_support/novadax.py +26 -26
- ccxt/async_support/oceanex.py +21 -21
- ccxt/async_support/okcoin.py +35 -35
- ccxt/async_support/okx.py +85 -85
- ccxt/async_support/onetrading.py +32 -32
- ccxt/async_support/p2b.py +14 -14
- ccxt/async_support/paymium.py +12 -12
- ccxt/async_support/phemex.py +50 -50
- ccxt/async_support/poloniex.py +35 -35
- ccxt/async_support/poloniexfutures.py +25 -21
- ccxt/async_support/probit.py +30 -30
- ccxt/async_support/timex.py +22 -22
- ccxt/async_support/tokocrypto.py +26 -26
- ccxt/async_support/tradeogre.py +12 -12
- ccxt/async_support/upbit.py +28 -28
- ccxt/async_support/wavesexchange.py +33 -33
- ccxt/async_support/wazirx.py +21 -21
- ccxt/async_support/whitebit.py +80 -40
- ccxt/async_support/woo.py +51 -51
- ccxt/async_support/woofipro.py +46 -46
- ccxt/async_support/yobit.py +20 -20
- ccxt/async_support/zaif.py +12 -12
- ccxt/async_support/zonda.py +22 -22
- ccxt/base/exchange.py +39 -35
- ccxt/base/types.py +13 -0
- ccxt/bigone.py +32 -32
- ccxt/binance.py +105 -96
- ccxt/bingx.py +22 -22
- ccxt/bit2c.py +13 -13
- ccxt/bitbank.py +19 -19
- ccxt/bitbns.py +17 -17
- ccxt/bitfinex.py +24 -24
- ccxt/bitfinex2.py +142 -109
- ccxt/bitflyer.py +23 -23
- ccxt/bitget.py +76 -76
- ccxt/bithumb.py +20 -20
- ccxt/bitmart.py +55 -55
- ccxt/bitmex.py +41 -41
- ccxt/bitopro.py +30 -30
- ccxt/bitrue.py +37 -37
- ccxt/bitso.py +30 -30
- ccxt/bitstamp.py +31 -31
- ccxt/bitteam.py +26 -26
- ccxt/bitvavo.py +27 -27
- ccxt/bl3p.py +8 -8
- ccxt/blockchaincom.py +24 -24
- ccxt/blofin.py +37 -37
- ccxt/btcalpha.py +19 -19
- ccxt/btcbox.py +11 -11
- ccxt/btcmarkets.py +22 -22
- ccxt/btcturk.py +13 -13
- ccxt/bybit.py +96 -96
- ccxt/cex.py +21 -21
- ccxt/coinbase.py +53 -53
- ccxt/coinbaseexchange.py +29 -29
- ccxt/coinbaseinternational.py +32 -32
- ccxt/coincheck.py +14 -14
- ccxt/coinex.py +424 -448
- ccxt/coinlist.py +35 -35
- ccxt/coinmate.py +22 -22
- ccxt/coinmetro.py +22 -22
- ccxt/coinone.py +18 -18
- ccxt/coinsph.py +32 -32
- ccxt/coinspot.py +8 -8
- ccxt/cryptocom.py +43 -43
- ccxt/currencycom.py +33 -33
- ccxt/delta.py +35 -35
- ccxt/deribit.py +54 -54
- ccxt/digifinex.py +56 -56
- ccxt/exmo.py +34 -34
- ccxt/gate.py +60 -60
- ccxt/gemini.py +24 -24
- ccxt/hitbtc.py +51 -51
- ccxt/hollaex.py +29 -29
- ccxt/htx.py +73 -73
- ccxt/huobijp.py +30 -30
- ccxt/hyperliquid.py +58 -58
- ccxt/idex.py +33 -33
- ccxt/independentreserve.py +12 -12
- ccxt/indodax.py +21 -21
- ccxt/kraken.py +46 -51
- ccxt/krakenfutures.py +29 -29
- ccxt/kucoin.py +51 -51
- ccxt/kucoinfutures.py +33 -33
- ccxt/kuna.py +27 -27
- ccxt/latoken.py +27 -27
- ccxt/lbank.py +35 -35
- ccxt/luno.py +19 -19
- ccxt/lykke.py +20 -20
- ccxt/mercado.py +17 -17
- ccxt/mexc.py +64 -64
- ccxt/ndax.py +38 -38
- ccxt/novadax.py +26 -26
- ccxt/oceanex.py +21 -21
- ccxt/okcoin.py +35 -35
- ccxt/okx.py +85 -85
- ccxt/onetrading.py +32 -32
- ccxt/p2b.py +14 -14
- ccxt/paymium.py +12 -12
- ccxt/phemex.py +50 -50
- ccxt/poloniex.py +35 -35
- ccxt/poloniexfutures.py +25 -21
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +8 -8
- ccxt/pro/ascendex.py +4 -4
- ccxt/pro/binance.py +56 -56
- ccxt/pro/bingx.py +5 -5
- ccxt/pro/bitfinex.py +6 -6
- ccxt/pro/bitfinex2.py +10 -10
- ccxt/pro/bitget.py +17 -17
- ccxt/pro/bithumb.py +6 -6
- ccxt/pro/bitmart.py +8 -8
- ccxt/pro/bitmex.py +16 -16
- ccxt/pro/bitopro.py +4 -4
- ccxt/pro/bitrue.py +8 -8
- ccxt/pro/bitstamp.py +5 -5
- ccxt/pro/bitvavo.py +14 -14
- ccxt/pro/blockchaincom.py +7 -7
- ccxt/pro/bybit.py +12 -12
- ccxt/pro/cex.py +19 -19
- ccxt/pro/coinbase.py +2 -2
- ccxt/pro/coinbaseexchange.py +10 -10
- ccxt/pro/coinbaseinternational.py +4 -4
- ccxt/pro/coincheck.py +2 -2
- ccxt/pro/coinex.py +15 -15
- ccxt/pro/coinone.py +4 -4
- ccxt/pro/cryptocom.py +11 -11
- ccxt/pro/currencycom.py +4 -4
- ccxt/pro/deribit.py +9 -9
- ccxt/pro/exmo.py +9 -9
- ccxt/pro/gate.py +12 -12
- ccxt/pro/gemini.py +11 -11
- ccxt/pro/hitbtc.py +13 -13
- ccxt/pro/hollaex.py +6 -6
- ccxt/pro/htx.py +15 -15
- ccxt/pro/huobijp.py +16 -16
- ccxt/pro/hyperliquid.py +9 -9
- ccxt/pro/idex.py +12 -12
- ccxt/pro/independentreserve.py +2 -2
- ccxt/pro/kraken.py +14 -14
- ccxt/pro/krakenfutures.py +12 -12
- ccxt/pro/kucoin.py +12 -12
- ccxt/pro/kucoinfutures.py +16 -16
- ccxt/pro/lbank.py +12 -12
- ccxt/pro/luno.py +4 -4
- ccxt/pro/mexc.py +14 -14
- ccxt/pro/ndax.py +12 -12
- ccxt/pro/okcoin.py +6 -6
- ccxt/pro/okx.py +30 -30
- ccxt/pro/onetrading.py +13 -13
- ccxt/pro/p2b.py +2 -2
- ccxt/pro/phemex.py +9 -9
- ccxt/pro/poloniex.py +9 -9
- ccxt/pro/poloniexfutures.py +10 -10
- ccxt/pro/probit.py +8 -8
- ccxt/pro/upbit.py +1 -1
- ccxt/pro/wazirx.py +10 -10
- ccxt/pro/whitebit.py +8 -8
- ccxt/pro/woo.py +14 -14
- ccxt/pro/woofipro.py +14 -14
- ccxt/probit.py +30 -30
- ccxt/test/base/test_shared_methods.py +1 -0
- ccxt/timex.py +22 -22
- ccxt/tokocrypto.py +26 -26
- ccxt/tradeogre.py +12 -12
- ccxt/upbit.py +28 -28
- ccxt/wavesexchange.py +33 -33
- ccxt/wazirx.py +21 -21
- ccxt/whitebit.py +80 -40
- ccxt/woo.py +51 -51
- ccxt/woofipro.py +46 -46
- ccxt/yobit.py +20 -20
- ccxt/zaif.py +12 -12
- ccxt/zonda.py +22 -22
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/RECORD +260 -260
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
- {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
ccxt/async_support/bitvavo.py
CHANGED
@@ -494,12 +494,12 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
494
494
|
# },
|
495
495
|
# ]
|
496
496
|
#
|
497
|
-
result = {}
|
497
|
+
result: dict = {}
|
498
498
|
for i in range(0, len(currencies)):
|
499
499
|
currency = currencies[i]
|
500
500
|
id = self.safe_string(currency, 'symbol')
|
501
501
|
code = self.safe_currency_code(id)
|
502
|
-
networks = {}
|
502
|
+
networks: dict = {}
|
503
503
|
networksArray = self.safe_value(currency, 'networks', [])
|
504
504
|
networksLength = len(networksArray)
|
505
505
|
isOneNetwork = (networksLength == 1)
|
@@ -569,7 +569,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
569
569
|
"""
|
570
570
|
await self.load_markets()
|
571
571
|
market = self.market(symbol)
|
572
|
-
request = {
|
572
|
+
request: dict = {
|
573
573
|
'market': market['id'],
|
574
574
|
}
|
575
575
|
response = await self.publicGetTicker24h(self.extend(request, params))
|
@@ -687,7 +687,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
687
687
|
paginate, params = self.handle_option_and_params(params, 'fetchTrades', 'paginate')
|
688
688
|
if paginate:
|
689
689
|
return await self.fetch_paginated_call_dynamic('fetchTrades', symbol, since, limit, params)
|
690
|
-
request = {
|
690
|
+
request: dict = {
|
691
691
|
'market': market['id'],
|
692
692
|
# "limit": 500, # default 500, max 1000
|
693
693
|
# "start": since,
|
@@ -714,7 +714,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
714
714
|
#
|
715
715
|
return self.parse_trades(response, market, since, limit)
|
716
716
|
|
717
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
717
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
718
718
|
#
|
719
719
|
# fetchTrades(public)
|
720
720
|
#
|
@@ -841,7 +841,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
841
841
|
feesValue = self.safe_value(fees, 'fees')
|
842
842
|
maker = self.safe_number(feesValue, 'maker')
|
843
843
|
taker = self.safe_number(feesValue, 'taker')
|
844
|
-
result = {}
|
844
|
+
result: dict = {}
|
845
845
|
for i in range(0, len(self.symbols)):
|
846
846
|
symbol = self.symbols[i]
|
847
847
|
result[symbol] = {
|
@@ -865,7 +865,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
865
865
|
"""
|
866
866
|
await self.load_markets()
|
867
867
|
market = self.market(symbol)
|
868
|
-
request = {
|
868
|
+
request: dict = {
|
869
869
|
'market': market['id'],
|
870
870
|
}
|
871
871
|
if limit is not None:
|
@@ -913,7 +913,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
913
913
|
|
914
914
|
def fetch_ohlcv_request(self, symbol: Str, timeframe='1m', since: Int = None, limit: Int = None, params={}):
|
915
915
|
market = self.market(symbol)
|
916
|
-
request = {
|
916
|
+
request: dict = {
|
917
917
|
'market': market['id'],
|
918
918
|
'interval': self.safe_string(self.timeframes, timeframe, timeframe),
|
919
919
|
# "limit": 1440, # default 1440, max 1440
|
@@ -965,7 +965,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
965
965
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
966
966
|
|
967
967
|
def parse_balance(self, response) -> Balances:
|
968
|
-
result = {
|
968
|
+
result: dict = {
|
969
969
|
'info': response,
|
970
970
|
'timestamp': None,
|
971
971
|
'datetime': None,
|
@@ -1009,7 +1009,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1009
1009
|
"""
|
1010
1010
|
await self.load_markets()
|
1011
1011
|
currency = self.currency(code)
|
1012
|
-
request = {
|
1012
|
+
request: dict = {
|
1013
1013
|
'symbol': currency['id'],
|
1014
1014
|
}
|
1015
1015
|
response = await self.privateGetDeposit(self.extend(request, params))
|
@@ -1032,7 +1032,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1032
1032
|
|
1033
1033
|
def create_order_request(self, symbol: Str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
1034
1034
|
market = self.market(symbol)
|
1035
|
-
request = {
|
1035
|
+
request: dict = {
|
1036
1036
|
'market': market['id'],
|
1037
1037
|
'side': side,
|
1038
1038
|
'orderType': type,
|
@@ -1153,7 +1153,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1153
1153
|
return self.parse_order(response, market)
|
1154
1154
|
|
1155
1155
|
def edit_order_request(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
1156
|
-
request = {}
|
1156
|
+
request: dict = {}
|
1157
1157
|
market = self.market(symbol)
|
1158
1158
|
amountRemaining = self.safe_number(params, 'amountRemaining')
|
1159
1159
|
triggerPrice = self.safe_string_n(params, ['triggerPrice', 'stopPrice', 'triggerAmount'])
|
@@ -1198,7 +1198,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1198
1198
|
if symbol is None:
|
1199
1199
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
|
1200
1200
|
market = self.market(symbol)
|
1201
|
-
request = {
|
1201
|
+
request: dict = {
|
1202
1202
|
'market': market['id'],
|
1203
1203
|
}
|
1204
1204
|
clientOrderId = self.safe_string(params, 'clientOrderId')
|
@@ -1236,7 +1236,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1236
1236
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1237
1237
|
"""
|
1238
1238
|
await self.load_markets()
|
1239
|
-
request = {}
|
1239
|
+
request: dict = {}
|
1240
1240
|
market = None
|
1241
1241
|
if symbol is not None:
|
1242
1242
|
market = self.market(symbol)
|
@@ -1263,7 +1263,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1263
1263
|
raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
|
1264
1264
|
await self.load_markets()
|
1265
1265
|
market = self.market(symbol)
|
1266
|
-
request = {
|
1266
|
+
request: dict = {
|
1267
1267
|
'market': market['id'],
|
1268
1268
|
}
|
1269
1269
|
clientOrderId = self.safe_string(params, 'clientOrderId')
|
@@ -1308,7 +1308,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1308
1308
|
|
1309
1309
|
def fetch_orders_request(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1310
1310
|
market = self.market(symbol)
|
1311
|
-
request = {
|
1311
|
+
request: dict = {
|
1312
1312
|
'market': market['id'],
|
1313
1313
|
# "limit": 500,
|
1314
1314
|
# "start": since,
|
@@ -1393,7 +1393,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1393
1393
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1394
1394
|
"""
|
1395
1395
|
await self.load_markets()
|
1396
|
-
request = {
|
1396
|
+
request: dict = {
|
1397
1397
|
# "market": market["id"], # rate limit 25 without a market, 1 with market specified
|
1398
1398
|
}
|
1399
1399
|
market = None
|
@@ -1439,8 +1439,8 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1439
1439
|
#
|
1440
1440
|
return self.parse_orders(response, market, since, limit)
|
1441
1441
|
|
1442
|
-
def parse_order_status(self, status):
|
1443
|
-
statuses = {
|
1442
|
+
def parse_order_status(self, status: Str):
|
1443
|
+
statuses: dict = {
|
1444
1444
|
'new': 'open',
|
1445
1445
|
'canceled': 'canceled',
|
1446
1446
|
'canceledAuction': 'canceled',
|
@@ -1457,7 +1457,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1457
1457
|
}
|
1458
1458
|
return self.safe_string(statuses, status, status)
|
1459
1459
|
|
1460
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1460
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1461
1461
|
#
|
1462
1462
|
# cancelOrder, cancelAllOrders
|
1463
1463
|
#
|
@@ -1561,7 +1561,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1561
1561
|
|
1562
1562
|
def fetch_my_trades_request(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1563
1563
|
market = self.market(symbol)
|
1564
|
-
request = {
|
1564
|
+
request: dict = {
|
1565
1565
|
'market': market['id'],
|
1566
1566
|
# "limit": 500,
|
1567
1567
|
# "start": since,
|
@@ -1619,7 +1619,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1619
1619
|
|
1620
1620
|
def withdraw_request(self, code: Str, amount, address, tag=None, params={}):
|
1621
1621
|
currency = self.currency(code)
|
1622
|
-
request = {
|
1622
|
+
request: dict = {
|
1623
1623
|
'symbol': currency['id'],
|
1624
1624
|
'amount': self.currency_to_precision(code, amount),
|
1625
1625
|
'address': address, # address or IBAN
|
@@ -1656,7 +1656,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1656
1656
|
return self.parse_transaction(response, currency)
|
1657
1657
|
|
1658
1658
|
def fetch_withdrawals_request(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1659
|
-
request = {
|
1659
|
+
request: dict = {
|
1660
1660
|
# 'symbol': currency['id'],
|
1661
1661
|
# 'limit': 500, # default 500, max 1000
|
1662
1662
|
# 'start': since,
|
@@ -1705,7 +1705,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1705
1705
|
return self.parse_transactions(response, currency, since, limit, {'type': 'withdrawal'})
|
1706
1706
|
|
1707
1707
|
def fetch_deposits_request(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1708
|
-
request = {
|
1708
|
+
request: dict = {
|
1709
1709
|
# 'symbol': currency['id'],
|
1710
1710
|
# 'limit': 500, # default 500, max 1000
|
1711
1711
|
# 'start': since,
|
@@ -1752,7 +1752,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1752
1752
|
return self.parse_transactions(response, currency, since, limit, {'type': 'deposit'})
|
1753
1753
|
|
1754
1754
|
def parse_transaction_status(self, status):
|
1755
|
-
statuses = {
|
1755
|
+
statuses: dict = {
|
1756
1756
|
'awaiting_processing': 'pending',
|
1757
1757
|
'awaiting_email_confirmation': 'pending',
|
1758
1758
|
'awaiting_bitvavo_inspection': 'pending',
|
@@ -1765,7 +1765,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1765
1765
|
}
|
1766
1766
|
return self.safe_string(statuses, status, status)
|
1767
1767
|
|
1768
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1768
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1769
1769
|
#
|
1770
1770
|
# withdraw
|
1771
1771
|
#
|
@@ -1861,7 +1861,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1861
1861
|
# "message": ""
|
1862
1862
|
# }
|
1863
1863
|
#
|
1864
|
-
result = {
|
1864
|
+
result: dict = {
|
1865
1865
|
'info': fee,
|
1866
1866
|
'withdraw': {
|
1867
1867
|
'fee': self.safe_number(fee, 'withdrawalFee'),
|
ccxt/async_support/bl3p.py
CHANGED
@@ -127,7 +127,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
127
127
|
def parse_balance(self, response) -> Balances:
|
128
128
|
data = self.safe_value(response, 'data', {})
|
129
129
|
wallets = self.safe_value(data, 'wallets', {})
|
130
|
-
result = {'info': data}
|
130
|
+
result: dict = {'info': data}
|
131
131
|
codes = list(self.currencies.keys())
|
132
132
|
for i in range(0, len(codes)):
|
133
133
|
code = codes[i]
|
@@ -171,7 +171,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
171
171
|
:returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
|
172
172
|
"""
|
173
173
|
market = self.market(symbol)
|
174
|
-
request = {
|
174
|
+
request: dict = {
|
175
175
|
'market': market['id'],
|
176
176
|
}
|
177
177
|
response = await self.publicGetMarketOrderbook(self.extend(request, params))
|
@@ -230,7 +230,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
230
230
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
231
231
|
"""
|
232
232
|
market = self.market(symbol)
|
233
|
-
request = {
|
233
|
+
request: dict = {
|
234
234
|
'market': market['id'],
|
235
235
|
}
|
236
236
|
ticker = await self.publicGetMarketTicker(self.extend(request, params))
|
@@ -251,7 +251,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
251
251
|
#
|
252
252
|
return self.parse_ticker(ticker, market)
|
253
253
|
|
254
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
254
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
255
255
|
#
|
256
256
|
# fetchTrades
|
257
257
|
#
|
@@ -354,7 +354,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
354
354
|
data = self.safe_value(response, 'data', {})
|
355
355
|
feeString = self.safe_string(data, 'trade_fee')
|
356
356
|
fee = self.parse_number(Precise.string_div(feeString, '100'))
|
357
|
-
result = {}
|
357
|
+
result: dict = {}
|
358
358
|
for i in range(0, len(self.symbols)):
|
359
359
|
symbol = self.symbols[i]
|
360
360
|
result[symbol] = {
|
@@ -386,7 +386,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
386
386
|
market = self.market(symbol)
|
387
387
|
amountString = self.number_to_string(amount)
|
388
388
|
priceString = self.number_to_string(price)
|
389
|
-
order = {
|
389
|
+
order: dict = {
|
390
390
|
'market': market['id'],
|
391
391
|
'amount_int': int(Precise.string_mul(amountString, '100000000')),
|
392
392
|
'fee_currency': market['quote'],
|
@@ -410,7 +410,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
410
410
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
411
411
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
412
412
|
"""
|
413
|
-
request = {
|
413
|
+
request: dict = {
|
414
414
|
'order_id': id,
|
415
415
|
}
|
416
416
|
return await self.privatePostMarketMoneyOrderCancel(self.extend(request, params))
|
@@ -425,7 +425,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
425
425
|
"""
|
426
426
|
await self.load_markets()
|
427
427
|
currency = self.currency(code)
|
428
|
-
request = {
|
428
|
+
request: dict = {
|
429
429
|
'currency': currency['id'],
|
430
430
|
}
|
431
431
|
response = await self.privatePostGENMKTMoneyNewDepositAddress(self.extend(request, params))
|
@@ -373,7 +373,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
373
373
|
"""
|
374
374
|
await self.load_markets()
|
375
375
|
market = self.market(symbol)
|
376
|
-
request = {
|
376
|
+
request: dict = {
|
377
377
|
'symbol': market['id'],
|
378
378
|
}
|
379
379
|
if limit is not None:
|
@@ -384,7 +384,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
384
384
|
async def fetch_l2_order_book(self, symbol: str, limit: Int = None, params={}):
|
385
385
|
await self.load_markets()
|
386
386
|
market = self.market(symbol)
|
387
|
-
request = {
|
387
|
+
request: dict = {
|
388
388
|
'symbol': market['id'],
|
389
389
|
}
|
390
390
|
if limit is not None:
|
@@ -439,7 +439,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
439
439
|
"""
|
440
440
|
await self.load_markets()
|
441
441
|
market = self.market(symbol)
|
442
|
-
request = {
|
442
|
+
request: dict = {
|
443
443
|
'symbol': market['id'],
|
444
444
|
}
|
445
445
|
response = await self.publicGetTickersSymbol(self.extend(request, params))
|
@@ -458,7 +458,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
458
458
|
return self.parse_tickers(tickers, symbols)
|
459
459
|
|
460
460
|
def parse_order_state(self, state):
|
461
|
-
states = {
|
461
|
+
states: dict = {
|
462
462
|
'OPEN': 'open',
|
463
463
|
'REJECTED': 'rejected',
|
464
464
|
'FILLED': 'closed',
|
@@ -468,7 +468,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
468
468
|
}
|
469
469
|
return self.safe_string(states, state, state)
|
470
470
|
|
471
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
471
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
472
472
|
#
|
473
473
|
# {
|
474
474
|
# "clOrdId": "00001",
|
@@ -542,7 +542,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
542
542
|
uppercaseOrderType = orderType.upper()
|
543
543
|
clientOrderId = self.safe_string_2(params, 'clientOrderId', 'clOrdId', self.uuid16())
|
544
544
|
params = self.omit(params, ['ordType', 'clientOrderId', 'clOrdId'])
|
545
|
-
request = {
|
545
|
+
request: dict = {
|
546
546
|
# 'stopPx' : limit price
|
547
547
|
# 'timeInForce' : "GTC" for Good Till Cancel, "IOC" for Immediate or Cancel, "FOK" for Fill or Kill, "GTD" Good Till Date
|
548
548
|
# 'expireDate' : expiry date in the format YYYYMMDD
|
@@ -585,7 +585,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
585
585
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
586
586
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
587
587
|
"""
|
588
|
-
request = {
|
588
|
+
request: dict = {
|
589
589
|
'orderId': id,
|
590
590
|
}
|
591
591
|
response = await self.privateDeleteOrdersOrderId(self.extend(request, params))
|
@@ -605,7 +605,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
605
605
|
# cancels all open orders if no symbol specified
|
606
606
|
# cancels all open orders of specified symbol, if symbol is specified
|
607
607
|
await self.load_markets()
|
608
|
-
request = {
|
608
|
+
request: dict = {
|
609
609
|
# 'symbol': marketId,
|
610
610
|
}
|
611
611
|
if symbol is not None:
|
@@ -635,7 +635,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
635
635
|
#
|
636
636
|
makerFee = self.safe_number(response, 'makerRate')
|
637
637
|
takerFee = self.safe_number(response, 'takerRate')
|
638
|
-
result = {}
|
638
|
+
result: dict = {}
|
639
639
|
for i in range(0, len(self.symbols)):
|
640
640
|
symbol = self.symbols[i]
|
641
641
|
result[symbol] = {
|
@@ -687,7 +687,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
687
687
|
|
688
688
|
async def fetch_orders_by_state(self, state, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
689
689
|
await self.load_markets()
|
690
|
-
request = {
|
690
|
+
request: dict = {
|
691
691
|
# 'to': unix epoch ms
|
692
692
|
# 'from': unix epoch ms
|
693
693
|
'status': state,
|
@@ -700,7 +700,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
700
700
|
response = await self.privateGetOrders(self.extend(request, params))
|
701
701
|
return self.parse_orders(response, market, since, limit)
|
702
702
|
|
703
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
703
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
704
704
|
#
|
705
705
|
# {
|
706
706
|
# "exOrdId":281685751028507,
|
@@ -756,7 +756,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
756
756
|
:returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
757
757
|
"""
|
758
758
|
await self.load_markets()
|
759
|
-
request = {}
|
759
|
+
request: dict = {}
|
760
760
|
if limit is not None:
|
761
761
|
request['limit'] = limit
|
762
762
|
market = None
|
@@ -776,7 +776,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
776
776
|
"""
|
777
777
|
await self.load_markets()
|
778
778
|
currency = self.currency(code)
|
779
|
-
request = {
|
779
|
+
request: dict = {
|
780
780
|
'currency': currency['id'],
|
781
781
|
}
|
782
782
|
response = await self.privatePostDepositsCurrency(self.extend(request, params))
|
@@ -788,7 +788,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
788
788
|
# if a tag or memo is used it is separated by a colon in the 'address' value
|
789
789
|
tag = self.safe_string(addressParts, 0)
|
790
790
|
address = self.safe_string(addressParts, 1)
|
791
|
-
result = {'info': response}
|
791
|
+
result: dict = {'info': response}
|
792
792
|
result['currency'] = currency['code']
|
793
793
|
result['address'] = address
|
794
794
|
if tag is not None:
|
@@ -796,7 +796,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
796
796
|
return result
|
797
797
|
|
798
798
|
def parse_transaction_state(self, state):
|
799
|
-
states = {
|
799
|
+
states: dict = {
|
800
800
|
'COMPLETED': 'ok', #
|
801
801
|
'REJECTED': 'failed',
|
802
802
|
'PENDING': 'pending',
|
@@ -805,7 +805,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
805
805
|
}
|
806
806
|
return self.safe_string(states, state, state)
|
807
807
|
|
808
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
808
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
809
809
|
#
|
810
810
|
# deposit
|
811
811
|
#
|
@@ -886,7 +886,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
886
886
|
"""
|
887
887
|
await self.load_markets()
|
888
888
|
currency = self.currency(code)
|
889
|
-
request = {
|
889
|
+
request: dict = {
|
890
890
|
'amount': amount,
|
891
891
|
'currency': currency['id'],
|
892
892
|
'beneficiary': address,
|
@@ -917,7 +917,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
917
917
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
918
918
|
"""
|
919
919
|
await self.load_markets()
|
920
|
-
request = {
|
920
|
+
request: dict = {
|
921
921
|
# 'from' : integer timestamp in ms
|
922
922
|
# 'to' : integer timestamp in ms
|
923
923
|
}
|
@@ -939,7 +939,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
939
939
|
:returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
940
940
|
"""
|
941
941
|
await self.load_markets()
|
942
|
-
request = {
|
942
|
+
request: dict = {
|
943
943
|
'withdrawalId': id,
|
944
944
|
}
|
945
945
|
response = await self.privateGetWithdrawalsWithdrawalId(self.extend(request, params))
|
@@ -956,7 +956,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
956
956
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
957
957
|
"""
|
958
958
|
await self.load_markets()
|
959
|
-
request = {
|
959
|
+
request: dict = {
|
960
960
|
# 'from' : integer timestamp in ms
|
961
961
|
# 'to' : integer timestap in ms
|
962
962
|
}
|
@@ -979,7 +979,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
979
979
|
"""
|
980
980
|
await self.load_markets()
|
981
981
|
depositId = self.safe_string(params, 'depositId', id)
|
982
|
-
request = {
|
982
|
+
request: dict = {
|
983
983
|
'depositId': depositId,
|
984
984
|
}
|
985
985
|
deposit = await self.privateGetDepositsDepositId(self.extend(request, params))
|
@@ -995,7 +995,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
995
995
|
await self.load_markets()
|
996
996
|
accountName = self.safe_string(params, 'account', 'primary')
|
997
997
|
params = self.omit(params, 'account')
|
998
|
-
request = {
|
998
|
+
request: dict = {
|
999
999
|
'account': accountName,
|
1000
1000
|
}
|
1001
1001
|
response = await self.privateGetAccounts(self.extend(request, params))
|
@@ -1017,7 +1017,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
1017
1017
|
balances = self.safe_value(response, accountName)
|
1018
1018
|
if balances is None:
|
1019
1019
|
raise ExchangeError(self.id + ' fetchBalance() could not find the "' + accountName + '" account')
|
1020
|
-
result = {'info': response}
|
1020
|
+
result: dict = {'info': response}
|
1021
1021
|
for i in range(0, len(balances)):
|
1022
1022
|
entry = balances[i]
|
1023
1023
|
currencyId = self.safe_string(entry, 'currency')
|
@@ -1039,7 +1039,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
1039
1039
|
# note: only works with exchange-order-id
|
1040
1040
|
# does not work with clientOrderId
|
1041
1041
|
await self.load_markets()
|
1042
|
-
request = {
|
1042
|
+
request: dict = {
|
1043
1043
|
'orderId': id,
|
1044
1044
|
}
|
1045
1045
|
response = await self.privateGetOrdersOrderId(self.extend(request, params))
|