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/woo.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.woo 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, Num, Str, Bool, Strings, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import BadRequest
|
@@ -346,11 +346,11 @@ class woo(Exchange, ImplicitAPI):
|
|
346
346
|
quoteId = self.safe_string(parts, 2)
|
347
347
|
base = self.safe_currency_code(baseId)
|
348
348
|
quote = self.safe_currency_code(quoteId)
|
349
|
-
settleId = None
|
350
|
-
settle = None
|
349
|
+
settleId: Str = None
|
350
|
+
settle: Str = None
|
351
351
|
symbol = base + '/' + quote
|
352
|
-
contractSize = None
|
353
|
-
linear = None
|
352
|
+
contractSize: Num = None
|
353
|
+
linear: Bool = None
|
354
354
|
margin = True
|
355
355
|
contract = isSwap
|
356
356
|
if contract:
|
@@ -460,7 +460,7 @@ class woo(Exchange, ImplicitAPI):
|
|
460
460
|
resultResponse = self.safe_value(response, 'rows', {})
|
461
461
|
return self.parse_trades(resultResponse, market, since, limit)
|
462
462
|
|
463
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
463
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
464
464
|
#
|
465
465
|
# public/market_trades
|
466
466
|
#
|
@@ -500,7 +500,7 @@ class woo(Exchange, ImplicitAPI):
|
|
500
500
|
cost = Precise.string_mul(price, amount)
|
501
501
|
side = self.safe_string_lower(trade, 'side')
|
502
502
|
id = self.safe_string(trade, 'id')
|
503
|
-
takerOrMaker = None
|
503
|
+
takerOrMaker: Str = None
|
504
504
|
if isFromFetchOrder:
|
505
505
|
isMaker = self.safe_string(trade, 'is_maker') == '1'
|
506
506
|
takerOrMaker = 'maker' if isMaker else 'taker'
|
@@ -660,7 +660,7 @@ class woo(Exchange, ImplicitAPI):
|
|
660
660
|
currencyId = currencyIds[i]
|
661
661
|
networks = networksByCurrencyId[currencyId]
|
662
662
|
code = self.safe_currency_code(currencyId)
|
663
|
-
name = None
|
663
|
+
name: Str = None
|
664
664
|
minPrecision = None
|
665
665
|
resultingNetworks = {}
|
666
666
|
for j in range(0, len(networks)):
|
@@ -931,7 +931,7 @@ class woo(Exchange, ImplicitAPI):
|
|
931
931
|
data = self.safe_value(response, 'data', {})
|
932
932
|
return self.parse_order(data, market)
|
933
933
|
|
934
|
-
def cancel_order(self, id: str, symbol:
|
934
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
935
935
|
"""
|
936
936
|
:see: https://docs.woo.org/#cancel-algo-order
|
937
937
|
:see: https://docs.woo.org/#cancel-order
|
@@ -948,7 +948,7 @@ class woo(Exchange, ImplicitAPI):
|
|
948
948
|
if not stop:
|
949
949
|
self.check_required_symbol('cancelOrder', symbol)
|
950
950
|
self.load_markets()
|
951
|
-
market = None
|
951
|
+
market: Market = None
|
952
952
|
if symbol is not None:
|
953
953
|
market = self.market(symbol)
|
954
954
|
request = {}
|
@@ -978,7 +978,7 @@ class woo(Exchange, ImplicitAPI):
|
|
978
978
|
extendParams['id'] = id
|
979
979
|
return self.extend(self.parse_order(response), extendParams)
|
980
980
|
|
981
|
-
def cancel_all_orders(self, symbol:
|
981
|
+
def cancel_all_orders(self, symbol: Str = None, params={}):
|
982
982
|
"""
|
983
983
|
:see: https://docs.woo.org/#cancel-all-pending-orders
|
984
984
|
:see: https://docs.woo.org/#cancel-orders
|
@@ -1008,7 +1008,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1008
1008
|
#
|
1009
1009
|
return response
|
1010
1010
|
|
1011
|
-
def fetch_order(self, id: str, symbol:
|
1011
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1012
1012
|
"""
|
1013
1013
|
:see: https://docs.woo.org/#get-algo-order
|
1014
1014
|
:see: https://docs.woo.org/#get-order
|
@@ -1072,7 +1072,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1072
1072
|
orders = self.safe_value(response, 'data', response)
|
1073
1073
|
return self.parse_order(orders, market)
|
1074
1074
|
|
1075
|
-
def fetch_orders(self, symbol:
|
1075
|
+
def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1076
1076
|
"""
|
1077
1077
|
:see: https://docs.woo.org/#get-orders
|
1078
1078
|
:see: https://docs.woo.org/#get-algo-orders
|
@@ -1088,7 +1088,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1088
1088
|
"""
|
1089
1089
|
self.load_markets()
|
1090
1090
|
request = {}
|
1091
|
-
market = None
|
1091
|
+
market: Market = None
|
1092
1092
|
stop = self.safe_value(params, 'stop')
|
1093
1093
|
params = self.omit(params, 'stop')
|
1094
1094
|
if symbol is not None:
|
@@ -1149,7 +1149,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1149
1149
|
}
|
1150
1150
|
return self.safe_string(timeInForces, timeInForce, None)
|
1151
1151
|
|
1152
|
-
def parse_order(self, order, market=None) -> Order:
|
1152
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1153
1153
|
#
|
1154
1154
|
# Possible input functions:
|
1155
1155
|
# * createOrder
|
@@ -1213,8 +1213,8 @@ class woo(Exchange, ImplicitAPI):
|
|
1213
1213
|
feeCurrency = self.safe_string_2(order, 'fee_asset', 'feeAsset')
|
1214
1214
|
transactions = self.safe_value(order, 'Transactions')
|
1215
1215
|
stopPrice = self.safe_number(order, 'triggerPrice')
|
1216
|
-
takeProfitPrice = None
|
1217
|
-
stopLossPrice = None
|
1216
|
+
takeProfitPrice: Num = None
|
1217
|
+
stopLossPrice: Num = None
|
1218
1218
|
childOrders = self.safe_value(order, 'childOrders')
|
1219
1219
|
if childOrders is not None:
|
1220
1220
|
first = self.safe_value(childOrders, 0)
|
@@ -1363,7 +1363,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1363
1363
|
data = self.safe_value(response, 'rows', [])
|
1364
1364
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
1365
1365
|
|
1366
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1366
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1367
1367
|
# example response in fetchOHLCV
|
1368
1368
|
return [
|
1369
1369
|
self.safe_integer(ohlcv, 'start_timestamp'),
|
@@ -1374,7 +1374,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1374
1374
|
self.safe_number(ohlcv, 'volume'),
|
1375
1375
|
]
|
1376
1376
|
|
1377
|
-
def fetch_order_trades(self, id: str, symbol:
|
1377
|
+
def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1378
1378
|
"""
|
1379
1379
|
fetch all the trades made from a single order
|
1380
1380
|
:param str id: order id
|
@@ -1385,7 +1385,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1385
1385
|
:returns dict[]: a list of `trade structures <https://github.com/ccxt/ccxt/wiki/Manual#trade-structure>`
|
1386
1386
|
"""
|
1387
1387
|
self.load_markets()
|
1388
|
-
market = None
|
1388
|
+
market: Market = None
|
1389
1389
|
if symbol is not None:
|
1390
1390
|
market = self.market(symbol)
|
1391
1391
|
request = {
|
@@ -1413,7 +1413,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1413
1413
|
trades = self.safe_value(response, 'rows', [])
|
1414
1414
|
return self.parse_trades(trades, market, since, limit, params)
|
1415
1415
|
|
1416
|
-
def fetch_my_trades(self, symbol:
|
1416
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1417
1417
|
"""
|
1418
1418
|
fetch all trades made by the user
|
1419
1419
|
:param str symbol: unified market symbol
|
@@ -1424,7 +1424,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1424
1424
|
"""
|
1425
1425
|
self.load_markets()
|
1426
1426
|
request = {}
|
1427
|
-
market = None
|
1427
|
+
market: Market = None
|
1428
1428
|
if symbol is not None:
|
1429
1429
|
market = self.market(symbol)
|
1430
1430
|
request['symbol'] = market['id']
|
@@ -1583,10 +1583,10 @@ class woo(Exchange, ImplicitAPI):
|
|
1583
1583
|
'info': response,
|
1584
1584
|
}
|
1585
1585
|
|
1586
|
-
def get_asset_history_rows(self, code:
|
1586
|
+
def get_asset_history_rows(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1587
1587
|
self.load_markets()
|
1588
1588
|
request = {}
|
1589
|
-
currency = None
|
1589
|
+
currency: Currency = None
|
1590
1590
|
if code is not None:
|
1591
1591
|
currency = self.currency(code)
|
1592
1592
|
request['balance_token'] = currency['id']
|
@@ -1635,7 +1635,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1635
1635
|
# }
|
1636
1636
|
return [currency, self.safe_value(response, 'rows', {})]
|
1637
1637
|
|
1638
|
-
def fetch_ledger(self, code:
|
1638
|
+
def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1639
1639
|
"""
|
1640
1640
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
1641
1641
|
:param str code: unified currency code, default is None
|
@@ -1647,7 +1647,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1647
1647
|
currency, rows = self.get_asset_history_rows(code, since, limit, params)
|
1648
1648
|
return self.parse_ledger(rows, currency, since, limit, params)
|
1649
1649
|
|
1650
|
-
def parse_ledger_entry(self, item, currency=None):
|
1650
|
+
def parse_ledger_entry(self, item, currency: Currency = None):
|
1651
1651
|
networkizedCode = self.safe_string(item, 'token')
|
1652
1652
|
currencyDefined = self.get_currency_from_chaincode(networkizedCode, currency)
|
1653
1653
|
code = currencyDefined['code']
|
@@ -1694,7 +1694,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1694
1694
|
currency = self.safe_currency(currencyId)
|
1695
1695
|
return currency
|
1696
1696
|
|
1697
|
-
def fetch_deposits(self, code:
|
1697
|
+
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1698
1698
|
"""
|
1699
1699
|
fetch all deposits made to an account
|
1700
1700
|
:param str code: unified currency code
|
@@ -1708,7 +1708,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1708
1708
|
}
|
1709
1709
|
return self.fetch_deposits_withdrawals(code, since, limit, self.extend(request, params))
|
1710
1710
|
|
1711
|
-
def fetch_withdrawals(self, code:
|
1711
|
+
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1712
1712
|
"""
|
1713
1713
|
fetch all withdrawals made from an account
|
1714
1714
|
:param str code: unified currency code
|
@@ -1722,7 +1722,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1722
1722
|
}
|
1723
1723
|
return self.fetch_deposits_withdrawals(code, since, limit, self.extend(request, params))
|
1724
1724
|
|
1725
|
-
def fetch_deposits_withdrawals(self, code:
|
1725
|
+
def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1726
1726
|
"""
|
1727
1727
|
fetch history of deposits and withdrawals
|
1728
1728
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
@@ -1748,7 +1748,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1748
1748
|
#
|
1749
1749
|
return self.parse_transactions(rows, currency, since, limit, params)
|
1750
1750
|
|
1751
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1751
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1752
1752
|
# example in fetchLedger
|
1753
1753
|
networkizedCode = self.safe_string(transaction, 'token')
|
1754
1754
|
currencyDefined = self.get_currency_from_chaincode(networkizedCode, currency)
|
@@ -1827,7 +1827,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1827
1827
|
transfer['toAccount'] = toAccount
|
1828
1828
|
return transfer
|
1829
1829
|
|
1830
|
-
def fetch_transfers(self, code:
|
1830
|
+
def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1831
1831
|
"""
|
1832
1832
|
fetch a history of internal transfers made on an account
|
1833
1833
|
:param str code: unified currency code of the currency transferred
|
@@ -1842,7 +1842,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1842
1842
|
currency, rows = self.get_asset_history_rows(code, since, limit, self.extend(request, params))
|
1843
1843
|
return self.parse_transfers(rows, currency, since, limit, params)
|
1844
1844
|
|
1845
|
-
def parse_transfer(self, transfer, currency=None):
|
1845
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
1846
1846
|
#
|
1847
1847
|
# getAssetHistoryRows
|
1848
1848
|
# {
|
@@ -1876,8 +1876,8 @@ class woo(Exchange, ImplicitAPI):
|
|
1876
1876
|
movementDirection = self.safe_string_lower(transfer, 'token_side')
|
1877
1877
|
if movementDirection == 'withdraw':
|
1878
1878
|
movementDirection = 'withdrawal'
|
1879
|
-
fromAccount = None
|
1880
|
-
toAccount = None
|
1879
|
+
fromAccount: Str = None
|
1880
|
+
toAccount: Str = None
|
1881
1881
|
if movementDirection == 'withdraw':
|
1882
1882
|
fromAccount = None
|
1883
1883
|
toAccount = 'spot'
|
@@ -1886,7 +1886,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1886
1886
|
toAccount = None
|
1887
1887
|
timestamp = self.safe_timestamp(transfer, 'created_time')
|
1888
1888
|
success = self.safe_value(transfer, 'success')
|
1889
|
-
status = None
|
1889
|
+
status: Str = None
|
1890
1890
|
if success is not None:
|
1891
1891
|
status = 'ok' if success else 'failed'
|
1892
1892
|
return {
|
@@ -1949,7 +1949,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1949
1949
|
#
|
1950
1950
|
return self.parse_transaction(response, currency)
|
1951
1951
|
|
1952
|
-
def repay_margin(self, code: str, amount, symbol:
|
1952
|
+
def repay_margin(self, code: str, amount, symbol: Str = None, params={}):
|
1953
1953
|
"""
|
1954
1954
|
repay borrowed margin and interest
|
1955
1955
|
:see: https://docs.woo.org/#repay-interest
|
@@ -1960,7 +1960,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1960
1960
|
:returns dict: a `margin loan structure <https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure>`
|
1961
1961
|
"""
|
1962
1962
|
self.load_markets()
|
1963
|
-
market = None
|
1963
|
+
market: Market = None
|
1964
1964
|
if symbol is not None:
|
1965
1965
|
market = self.market(symbol)
|
1966
1966
|
symbol = market['symbol']
|
@@ -1981,7 +1981,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1981
1981
|
'symbol': symbol,
|
1982
1982
|
})
|
1983
1983
|
|
1984
|
-
def parse_margin_loan(self, info, currency=None):
|
1984
|
+
def parse_margin_loan(self, info, currency: Currency = None):
|
1985
1985
|
#
|
1986
1986
|
# {
|
1987
1987
|
# "success": True,
|
@@ -2068,7 +2068,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2068
2068
|
self.throw_exactly_matched_exception(self.exceptions['exact'], errorCode, feedback)
|
2069
2069
|
return None
|
2070
2070
|
|
2071
|
-
def parse_income(self, income, market=None):
|
2071
|
+
def parse_income(self, income, market: Market = None):
|
2072
2072
|
#
|
2073
2073
|
# {
|
2074
2074
|
# "id":666666,
|
@@ -2100,10 +2100,10 @@ class woo(Exchange, ImplicitAPI):
|
|
2100
2100
|
'rate': rate,
|
2101
2101
|
}
|
2102
2102
|
|
2103
|
-
def fetch_funding_history(self, symbol:
|
2103
|
+
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2104
2104
|
self.load_markets()
|
2105
2105
|
request = {}
|
2106
|
-
market = None
|
2106
|
+
market: Market = None
|
2107
2107
|
if symbol is not None:
|
2108
2108
|
market = self.market(symbol)
|
2109
2109
|
request['symbol'] = market['id']
|
@@ -2136,7 +2136,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2136
2136
|
result = self.safe_value(response, 'rows', [])
|
2137
2137
|
return self.parse_incomes(result, market, since, limit)
|
2138
2138
|
|
2139
|
-
def parse_funding_rate(self, fundingRate, market=None):
|
2139
|
+
def parse_funding_rate(self, fundingRate, market: Market = None):
|
2140
2140
|
#
|
2141
2141
|
# {
|
2142
2142
|
# "symbol":"PERP_AAVE_USDT",
|
@@ -2218,7 +2218,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2218
2218
|
result = self.parse_funding_rates(rows)
|
2219
2219
|
return self.filter_by_array(result, 'symbol', symbols)
|
2220
2220
|
|
2221
|
-
def fetch_funding_rate_history(self, symbol:
|
2221
|
+
def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2222
2222
|
"""
|
2223
2223
|
fetches historical funding rate prices
|
2224
2224
|
:see: https://docs.woo.org/#get-funding-rate-history-for-one-market-public
|
@@ -2317,7 +2317,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2317
2317
|
'leverage': leverage,
|
2318
2318
|
}
|
2319
2319
|
|
2320
|
-
def set_leverage(self, leverage, symbol:
|
2320
|
+
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
2321
2321
|
self.load_markets()
|
2322
2322
|
if (leverage < 1) or (leverage > 20):
|
2323
2323
|
raise BadRequest(self.id + ' leverage should be between 1 and 20')
|
@@ -2326,7 +2326,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2326
2326
|
}
|
2327
2327
|
return self.v1PrivatePostClientLeverage(self.extend(request, params))
|
2328
2328
|
|
2329
|
-
def fetch_position(self, symbol:
|
2329
|
+
def fetch_position(self, symbol: Str = None, params={}):
|
2330
2330
|
self.load_markets()
|
2331
2331
|
market = self.market(symbol)
|
2332
2332
|
request = {
|
@@ -2380,7 +2380,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2380
2380
|
positions = self.safe_value(result, 'positions', [])
|
2381
2381
|
return self.parse_positions(positions, symbols)
|
2382
2382
|
|
2383
|
-
def parse_position(self, position, market=None):
|
2383
|
+
def parse_position(self, position, market: Market = None):
|
2384
2384
|
#
|
2385
2385
|
# {
|
2386
2386
|
# "symbol": "0_symbol",
|
@@ -2399,7 +2399,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2399
2399
|
contract = self.safe_string(position, 'symbol')
|
2400
2400
|
market = self.safe_market(contract, market)
|
2401
2401
|
size = self.safe_string(position, 'holding')
|
2402
|
-
side = None
|
2402
|
+
side: Str = None
|
2403
2403
|
if Precise.string_gt(size, '0'):
|
2404
2404
|
side = 'long'
|
2405
2405
|
else:
|
ccxt/yobit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.yobit 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, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -496,7 +496,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
496
496
|
result[symbol] = self.parse_order_book(response[id], symbol)
|
497
497
|
return result
|
498
498
|
|
499
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
499
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
500
500
|
#
|
501
501
|
# {
|
502
502
|
# "high": 0.03497582,
|
@@ -585,7 +585,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
585
585
|
tickers = self.fetch_tickers([symbol], params)
|
586
586
|
return tickers[symbol]
|
587
587
|
|
588
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
588
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
589
589
|
#
|
590
590
|
# fetchTrades(public)
|
591
591
|
#
|
@@ -793,7 +793,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
793
793
|
result = self.safe_value(response, 'return')
|
794
794
|
return self.parse_order(result, market)
|
795
795
|
|
796
|
-
def cancel_order(self, id: str, symbol:
|
796
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
797
797
|
"""
|
798
798
|
:see: https://yobit.net/en/api
|
799
799
|
cancels an open order
|
@@ -838,7 +838,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
838
838
|
}
|
839
839
|
return self.safe_string(statuses, status, status)
|
840
840
|
|
841
|
-
def parse_order(self, order, market=None) -> Order:
|
841
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
842
842
|
#
|
843
843
|
# createOrder(private)
|
844
844
|
#
|
@@ -940,7 +940,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
940
940
|
'trades': None,
|
941
941
|
}, market)
|
942
942
|
|
943
|
-
def fetch_order(self, id: str, symbol:
|
943
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
944
944
|
"""
|
945
945
|
:see: https://yobit.net/en/api
|
946
946
|
fetches information on an order made by the user
|
@@ -973,7 +973,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
973
973
|
#
|
974
974
|
return self.parse_order(self.extend({'id': id}, orders[id]))
|
975
975
|
|
976
|
-
def fetch_open_orders(self, symbol:
|
976
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
977
977
|
"""
|
978
978
|
:see: https://yobit.net/en/api
|
979
979
|
fetch all unfilled currently open orders
|
@@ -1017,7 +1017,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
1017
1017
|
result = self.safe_value(response, 'return', {})
|
1018
1018
|
return self.parse_orders(result, market, since, limit)
|
1019
1019
|
|
1020
|
-
def fetch_my_trades(self, symbol:
|
1020
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1021
1021
|
"""
|
1022
1022
|
:see: https://yobit.net/en/api
|
1023
1023
|
fetch all trades made by the user
|
ccxt/zaif.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.zaif 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, Ticker, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import BadRequest
|
@@ -282,7 +282,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
282
282
|
response = self.publicGetDepthPair(self.extend(request, params))
|
283
283
|
return self.parse_order_book(response, market['symbol'])
|
284
284
|
|
285
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
285
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
286
286
|
#
|
287
287
|
# {
|
288
288
|
# "last": 9e-08,
|
@@ -350,7 +350,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
350
350
|
#
|
351
351
|
return self.parse_ticker(ticker, market)
|
352
352
|
|
353
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
353
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
354
354
|
#
|
355
355
|
# fetchTrades(public)
|
356
356
|
#
|
@@ -450,7 +450,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
450
450
|
'id': str(response['return']['order_id']),
|
451
451
|
}, market)
|
452
452
|
|
453
|
-
def cancel_order(self, id: str, symbol:
|
453
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
454
454
|
"""
|
455
455
|
:see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id37
|
456
456
|
cancels an open order
|
@@ -464,7 +464,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
464
464
|
}
|
465
465
|
return self.privatePostCancelOrder(self.extend(request, params))
|
466
466
|
|
467
|
-
def parse_order(self, order, market=None) -> Order:
|
467
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
468
468
|
#
|
469
469
|
# {
|
470
470
|
# "currency_pair": "btc_jpy",
|
@@ -508,7 +508,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
508
508
|
'average': None,
|
509
509
|
}, market)
|
510
510
|
|
511
|
-
def fetch_open_orders(self, symbol:
|
511
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
512
512
|
"""
|
513
513
|
:see: https://zaif-api-document.readthedocs.io/ja/latest/MarginTradingAPI.html#id28
|
514
514
|
fetch all unfilled currently open orders
|
@@ -519,7 +519,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
519
519
|
:returns Order[]: a list of `order structures <https://github.com/ccxt/ccxt/wiki/Manual#order-structure>`
|
520
520
|
"""
|
521
521
|
self.load_markets()
|
522
|
-
market = None
|
522
|
+
market: Market = None
|
523
523
|
request = {
|
524
524
|
# 'is_token': False,
|
525
525
|
# 'is_token_both': False,
|
@@ -530,7 +530,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
530
530
|
response = self.privatePostActiveOrders(self.extend(request, params))
|
531
531
|
return self.parse_orders(response['return'], market, since, limit)
|
532
532
|
|
533
|
-
def fetch_closed_orders(self, symbol:
|
533
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
534
534
|
"""
|
535
535
|
:see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id24
|
536
536
|
fetches information on multiple closed orders made by the user
|
@@ -541,7 +541,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
541
541
|
:returns Order[]: a list of `order structures <https://github.com/ccxt/ccxt/wiki/Manual#order-structure>`
|
542
542
|
"""
|
543
543
|
self.load_markets()
|
544
|
-
market = None
|
544
|
+
market: Market = None
|
545
545
|
request = {
|
546
546
|
# 'from': 0,
|
547
547
|
# 'count': 1000,
|
@@ -604,7 +604,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
604
604
|
returnData = self.safe_value(result, 'return')
|
605
605
|
return self.parse_transaction(returnData, currency)
|
606
606
|
|
607
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
607
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
608
608
|
#
|
609
609
|
# {
|
610
610
|
# "id": 23634,
|
ccxt/zonda.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.zonda 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
|
@@ -405,7 +405,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
405
405
|
'info': item,
|
406
406
|
}
|
407
407
|
|
408
|
-
def fetch_open_orders(self, symbol:
|
408
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
409
409
|
"""
|
410
410
|
:see: https://docs.zondacrypto.exchange/reference/active-orders
|
411
411
|
fetch all unfilled currently open orders
|
@@ -421,7 +421,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
421
421
|
items = self.safe_value(response, 'items', [])
|
422
422
|
return self.parse_orders(items, None, since, limit, {'status': 'open'})
|
423
423
|
|
424
|
-
def parse_order(self, order, market=None) -> Order:
|
424
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
425
425
|
#
|
426
426
|
# {
|
427
427
|
# "market": "ETH-EUR",
|
@@ -471,7 +471,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
471
471
|
'trades': None,
|
472
472
|
}, market)
|
473
473
|
|
474
|
-
def fetch_my_trades(self, symbol:
|
474
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
475
475
|
"""
|
476
476
|
:see: https://docs.zondacrypto.exchange/reference/transactions-history
|
477
477
|
fetch all trades made by the user
|
@@ -585,7 +585,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
585
585
|
'nonce': self.safe_integer(response, 'seqNo'),
|
586
586
|
}
|
587
587
|
|
588
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
588
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
589
589
|
#
|
590
590
|
# version 1
|
591
591
|
#
|
@@ -788,7 +788,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
788
788
|
items = self.safe_value(response, 'items')
|
789
789
|
return self.parse_tickers(items, symbols)
|
790
790
|
|
791
|
-
def fetch_ledger(self, code:
|
791
|
+
def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
792
792
|
"""
|
793
793
|
:see: https://docs.zondacrypto.exchange/reference/operations-history
|
794
794
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
@@ -814,7 +814,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
814
814
|
items = response['items']
|
815
815
|
return self.parse_ledger(items, None, since, limit)
|
816
816
|
|
817
|
-
def parse_ledger_entry(self, item, currency=None):
|
817
|
+
def parse_ledger_entry(self, item, currency: Currency = None):
|
818
818
|
#
|
819
819
|
# FUNDS_MIGRATION
|
820
820
|
# {
|
@@ -1132,7 +1132,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1132
1132
|
}
|
1133
1133
|
return self.safe_string(types, type, type)
|
1134
1134
|
|
1135
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1135
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1136
1136
|
#
|
1137
1137
|
# [
|
1138
1138
|
# "1582399800000",
|
@@ -1200,7 +1200,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1200
1200
|
items = self.safe_value(response, 'items', [])
|
1201
1201
|
return self.parse_ohlcvs(items, market, timeframe, since, limit)
|
1202
1202
|
|
1203
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
1203
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1204
1204
|
#
|
1205
1205
|
# createOrder trades
|
1206
1206
|
#
|
@@ -1237,7 +1237,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1237
1237
|
timestamp = self.safe_integer_2(trade, 'time', 't')
|
1238
1238
|
side = self.safe_string_lower_2(trade, 'userAction', 'ty')
|
1239
1239
|
wasTaker = self.safe_value(trade, 'wasTaker')
|
1240
|
-
takerOrMaker = None
|
1240
|
+
takerOrMaker: Str = None
|
1241
1241
|
if wasTaker is not None:
|
1242
1242
|
takerOrMaker = 'taker' if wasTaker else 'maker'
|
1243
1243
|
priceString = self.safe_string_2(trade, 'rate', 'r')
|
@@ -1255,7 +1255,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1255
1255
|
}
|
1256
1256
|
order = self.safe_string(trade, 'offerId')
|
1257
1257
|
# todo: check self logic
|
1258
|
-
type = None
|
1258
|
+
type: Str = None
|
1259
1259
|
if order is not None:
|
1260
1260
|
type = 'limit' if order else 'market'
|
1261
1261
|
return self.safe_trade({
|
@@ -1420,7 +1420,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1420
1420
|
'clientOrderId': None,
|
1421
1421
|
})
|
1422
1422
|
|
1423
|
-
def cancel_order(self, id: str, symbol:
|
1423
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1424
1424
|
"""
|
1425
1425
|
:see: https://docs.zondacrypto.exchange/reference/cancel-order
|
1426
1426
|
cancels an open order
|
@@ -1456,7 +1456,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1456
1456
|
}
|
1457
1457
|
return self.safe_value(fiatCurrencies, currency, False)
|
1458
1458
|
|
1459
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
1459
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1460
1460
|
#
|
1461
1461
|
# {
|
1462
1462
|
# "address": "33u5YAEhQbYfjHHPsfMfCoSdEjfwYjVcBE",
|
@@ -1590,7 +1590,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1590
1590
|
transfer['amount'] = amount
|
1591
1591
|
return transfer
|
1592
1592
|
|
1593
|
-
def parse_transfer(self, transfer, currency=None):
|
1593
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
1594
1594
|
#
|
1595
1595
|
# {
|
1596
1596
|
# "status": "Ok",
|
@@ -1684,7 +1684,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1684
1684
|
data = self.safe_value(response, 'data')
|
1685
1685
|
return self.parse_transaction(data, currency)
|
1686
1686
|
|
1687
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1687
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1688
1688
|
#
|
1689
1689
|
# withdraw
|
1690
1690
|
#
|
@@ -1733,7 +1733,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1733
1733
|
query = self.omit(params, self.extract_params(path))
|
1734
1734
|
url += '/' + self.implode_params(path, params)
|
1735
1735
|
nonce = str(self.milliseconds())
|
1736
|
-
payload = None
|
1736
|
+
payload: Str = None
|
1737
1737
|
if method != 'POST':
|
1738
1738
|
if query:
|
1739
1739
|
url += '?' + self.urlencode(query)
|