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/woo.py
CHANGED
@@ -524,7 +524,7 @@ class woo(Exchange, ImplicitAPI):
|
|
524
524
|
"""
|
525
525
|
self.load_markets()
|
526
526
|
market = self.market(symbol)
|
527
|
-
request = {
|
527
|
+
request: dict = {
|
528
528
|
'symbol': market['id'],
|
529
529
|
}
|
530
530
|
if limit is not None:
|
@@ -562,7 +562,7 @@ class woo(Exchange, ImplicitAPI):
|
|
562
562
|
resultResponse = self.safe_list(response, 'rows', [])
|
563
563
|
return self.parse_trades(resultResponse, market, since, limit)
|
564
564
|
|
565
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
565
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
566
566
|
#
|
567
567
|
# public/market_trades
|
568
568
|
#
|
@@ -674,7 +674,7 @@ class woo(Exchange, ImplicitAPI):
|
|
674
674
|
data = self.safe_dict(response, 'data', {})
|
675
675
|
maker = self.safe_string(data, 'makerFeeRate')
|
676
676
|
taker = self.safe_string(data, 'takerFeeRate')
|
677
|
-
result = {}
|
677
|
+
result: dict = {}
|
678
678
|
for i in range(0, len(self.symbols)):
|
679
679
|
symbol = self.symbols[i]
|
680
680
|
result[symbol] = {
|
@@ -694,7 +694,7 @@ class woo(Exchange, ImplicitAPI):
|
|
694
694
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
695
695
|
:returns dict: an associative dictionary of currencies
|
696
696
|
"""
|
697
|
-
result = {}
|
697
|
+
result: dict = {}
|
698
698
|
tokenResponse = self.v1PublicGetToken(params)
|
699
699
|
#
|
700
700
|
# {
|
@@ -765,7 +765,7 @@ class woo(Exchange, ImplicitAPI):
|
|
765
765
|
code = self.safe_currency_code(currencyId)
|
766
766
|
name: Str = None
|
767
767
|
minPrecision = None
|
768
|
-
resultingNetworks = {}
|
768
|
+
resultingNetworks: dict = {}
|
769
769
|
for j in range(0, len(networks)):
|
770
770
|
network = networks[j]
|
771
771
|
name = self.safe_string(network, 'fullname')
|
@@ -908,7 +908,7 @@ class woo(Exchange, ImplicitAPI):
|
|
908
908
|
self.load_markets()
|
909
909
|
market = self.market(symbol)
|
910
910
|
orderSide = side.upper()
|
911
|
-
request = {
|
911
|
+
request: dict = {
|
912
912
|
'symbol': market['id'],
|
913
913
|
'side': orderSide,
|
914
914
|
}
|
@@ -987,7 +987,7 @@ class woo(Exchange, ImplicitAPI):
|
|
987
987
|
request['algoType'] = 'STOP'
|
988
988
|
elif (stopLoss is not None) or (takeProfit is not None):
|
989
989
|
request['algoType'] = 'BRACKET'
|
990
|
-
outterOrder = {
|
990
|
+
outterOrder: dict = {
|
991
991
|
'symbol': market['id'],
|
992
992
|
'reduceOnly': False,
|
993
993
|
'algoType': 'POSITIONAL_TP_SL',
|
@@ -996,7 +996,7 @@ class woo(Exchange, ImplicitAPI):
|
|
996
996
|
closeSide = 'SELL' if (orderSide == 'BUY') else 'BUY'
|
997
997
|
if stopLoss is not None:
|
998
998
|
stopLossPrice = self.safe_number_2(stopLoss, 'triggerPrice', 'price', stopLoss)
|
999
|
-
stopLossOrder = {
|
999
|
+
stopLossOrder: dict = {
|
1000
1000
|
'side': closeSide,
|
1001
1001
|
'algoType': 'STOP_LOSS',
|
1002
1002
|
'triggerPrice': self.price_to_precision(symbol, stopLossPrice),
|
@@ -1006,7 +1006,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1006
1006
|
outterOrder['childOrders'].append(stopLossOrder)
|
1007
1007
|
if takeProfit is not None:
|
1008
1008
|
takeProfitPrice = self.safe_number_2(takeProfit, 'triggerPrice', 'price', takeProfit)
|
1009
|
-
takeProfitOrder = {
|
1009
|
+
takeProfitOrder: dict = {
|
1010
1010
|
'side': closeSide,
|
1011
1011
|
'algoType': 'TAKE_PROFIT',
|
1012
1012
|
'triggerPrice': self.price_to_precision(symbol, takeProfitPrice),
|
@@ -1078,7 +1078,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1078
1078
|
"""
|
1079
1079
|
self.load_markets()
|
1080
1080
|
market = self.market(symbol)
|
1081
|
-
request = {
|
1081
|
+
request: dict = {
|
1082
1082
|
# 'quantity': self.amount_to_precision(symbol, amount),
|
1083
1083
|
# 'price': self.price_to_precision(symbol, price),
|
1084
1084
|
}
|
@@ -1156,7 +1156,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1156
1156
|
market: Market = None
|
1157
1157
|
if symbol is not None:
|
1158
1158
|
market = self.market(symbol)
|
1159
|
-
request = {}
|
1159
|
+
request: dict = {}
|
1160
1160
|
clientOrderIdUnified = self.safe_string_2(params, 'clOrdID', 'clientOrderId')
|
1161
1161
|
clientOrderIdExchangeSpecific = self.safe_string(params, 'client_order_id', clientOrderIdUnified)
|
1162
1162
|
isByClientOrder = clientOrderIdExchangeSpecific is not None
|
@@ -1176,7 +1176,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1176
1176
|
#
|
1177
1177
|
# {success: True, status: "CANCEL_SENT"}
|
1178
1178
|
#
|
1179
|
-
extendParams = {'symbol': symbol}
|
1179
|
+
extendParams: dict = {'symbol': symbol}
|
1180
1180
|
if isByClientOrder:
|
1181
1181
|
extendParams['client_order_id'] = clientOrderIdExchangeSpecific
|
1182
1182
|
else:
|
@@ -1202,7 +1202,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1202
1202
|
if symbol is None:
|
1203
1203
|
raise ArgumentsRequired(self.id + ' cancelOrders() requires a symbol argument')
|
1204
1204
|
market = self.market(symbol)
|
1205
|
-
request = {
|
1205
|
+
request: dict = {
|
1206
1206
|
'symbol': market['id'],
|
1207
1207
|
}
|
1208
1208
|
response = self.v1PrivateDeleteOrders(self.extend(request, params))
|
@@ -1253,7 +1253,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1253
1253
|
market = self.market(symbol) if (symbol is not None) else None
|
1254
1254
|
stop = self.safe_bool_2(params, 'stop', 'trigger')
|
1255
1255
|
params = self.omit(params, ['stop', 'trigger'])
|
1256
|
-
request = {}
|
1256
|
+
request: dict = {}
|
1257
1257
|
clientOrderId = self.safe_string_2(params, 'clOrdID', 'clientOrderId')
|
1258
1258
|
response = None
|
1259
1259
|
if stop:
|
@@ -1324,7 +1324,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1324
1324
|
paginate, params = self.handle_option_and_params(params, 'fetchOrders', 'paginate')
|
1325
1325
|
if paginate:
|
1326
1326
|
return self.fetch_paginated_call_incremental('fetchOrders', symbol, since, limit, params, 'page', 500)
|
1327
|
-
request = {}
|
1327
|
+
request: dict = {}
|
1328
1328
|
market: Market = None
|
1329
1329
|
stop = self.safe_bool_2(params, 'stop', 'trigger')
|
1330
1330
|
trailing = self.safe_bool(params, 'trailing', False)
|
@@ -1425,15 +1425,15 @@ class woo(Exchange, ImplicitAPI):
|
|
1425
1425
|
extendedParams = self.extend(params, {'status': 'COMPLETED'})
|
1426
1426
|
return self.fetch_orders(symbol, since, limit, extendedParams)
|
1427
1427
|
|
1428
|
-
def parse_time_in_force(self, timeInForce):
|
1429
|
-
timeInForces = {
|
1428
|
+
def parse_time_in_force(self, timeInForce: Str):
|
1429
|
+
timeInForces: dict = {
|
1430
1430
|
'ioc': 'IOC',
|
1431
1431
|
'fok': 'FOK',
|
1432
1432
|
'post_only': 'PO',
|
1433
1433
|
}
|
1434
1434
|
return self.safe_string(timeInForces, timeInForce, None)
|
1435
1435
|
|
1436
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1436
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1437
1437
|
#
|
1438
1438
|
# Possible input functions:
|
1439
1439
|
# * createOrder
|
@@ -1542,9 +1542,9 @@ class woo(Exchange, ImplicitAPI):
|
|
1542
1542
|
'info': order,
|
1543
1543
|
}, market)
|
1544
1544
|
|
1545
|
-
def parse_order_status(self, status):
|
1545
|
+
def parse_order_status(self, status: Str):
|
1546
1546
|
if status is not None:
|
1547
|
-
statuses = {
|
1547
|
+
statuses: dict = {
|
1548
1548
|
'NEW': 'open',
|
1549
1549
|
'FILLED': 'closed',
|
1550
1550
|
'CANCEL_SENT': 'canceled',
|
@@ -1569,7 +1569,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1569
1569
|
"""
|
1570
1570
|
self.load_markets()
|
1571
1571
|
market = self.market(symbol)
|
1572
|
-
request = {
|
1572
|
+
request: dict = {
|
1573
1573
|
'symbol': market['id'],
|
1574
1574
|
}
|
1575
1575
|
if limit is not None:
|
@@ -1609,7 +1609,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1609
1609
|
"""
|
1610
1610
|
self.load_markets()
|
1611
1611
|
market = self.market(symbol)
|
1612
|
-
request = {
|
1612
|
+
request: dict = {
|
1613
1613
|
'symbol': market['id'],
|
1614
1614
|
'type': self.safe_string(self.timeframes, timeframe, timeframe),
|
1615
1615
|
}
|
@@ -1699,7 +1699,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1699
1699
|
market: Market = None
|
1700
1700
|
if symbol is not None:
|
1701
1701
|
market = self.market(symbol)
|
1702
|
-
request = {
|
1702
|
+
request: dict = {
|
1703
1703
|
'oid': id,
|
1704
1704
|
}
|
1705
1705
|
response = self.v1PrivateGetOrderOidTrades(self.extend(request, params))
|
@@ -1740,7 +1740,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1740
1740
|
paginate, params = self.handle_option_and_params(params, 'fetchMyTrades', 'paginate')
|
1741
1741
|
if paginate:
|
1742
1742
|
return self.fetch_paginated_call_incremental('fetchMyTrades', symbol, since, limit, params, 'page', 500)
|
1743
|
-
request = {}
|
1743
|
+
request: dict = {}
|
1744
1744
|
market: Market = None
|
1745
1745
|
if symbol is not None:
|
1746
1746
|
market = self.market(symbol)
|
@@ -1858,7 +1858,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1858
1858
|
return self.parse_balance(data)
|
1859
1859
|
|
1860
1860
|
def parse_balance(self, response) -> Balances:
|
1861
|
-
result = {
|
1861
|
+
result: dict = {
|
1862
1862
|
'info': response,
|
1863
1863
|
}
|
1864
1864
|
balances = self.safe_list(response, 'holding', [])
|
@@ -1886,7 +1886,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1886
1886
|
networkCode = self.safe_string(params, 'network', networkCodeDefault)
|
1887
1887
|
params = self.omit(params, 'network')
|
1888
1888
|
codeForExchange = networkCode + '_' + currency['code']
|
1889
|
-
request = {
|
1889
|
+
request: dict = {
|
1890
1890
|
'token': codeForExchange,
|
1891
1891
|
}
|
1892
1892
|
response = self.v1PrivateGetAssetDeposit(self.extend(request, params))
|
@@ -1908,7 +1908,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1908
1908
|
|
1909
1909
|
def get_asset_history_rows(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> Any:
|
1910
1910
|
self.load_markets()
|
1911
|
-
request = {}
|
1911
|
+
request: dict = {}
|
1912
1912
|
currency: Currency = None
|
1913
1913
|
if code is not None:
|
1914
1914
|
currency = self.currency(code)
|
@@ -1971,7 +1971,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1971
1971
|
currency, rows = self.get_asset_history_rows(code, since, limit, params)
|
1972
1972
|
return self.parse_ledger(rows, currency, since, limit, params)
|
1973
1973
|
|
1974
|
-
def parse_ledger_entry(self, item, currency: Currency = None):
|
1974
|
+
def parse_ledger_entry(self, item: dict, currency: Currency = None):
|
1975
1975
|
networkizedCode = self.safe_string(item, 'token')
|
1976
1976
|
currencyDefined = self.get_currency_from_chaincode(networkizedCode, currency)
|
1977
1977
|
code = currencyDefined['code']
|
@@ -1999,7 +1999,7 @@ class woo(Exchange, ImplicitAPI):
|
|
1999
1999
|
}
|
2000
2000
|
|
2001
2001
|
def parse_ledger_entry_type(self, type):
|
2002
|
-
types = {
|
2002
|
+
types: dict = {
|
2003
2003
|
'BALANCE': 'transaction', # Funds moved in/out wallet
|
2004
2004
|
'COLLATERAL': 'transfer', # Funds moved between portfolios
|
2005
2005
|
}
|
@@ -2028,7 +2028,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2028
2028
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2029
2029
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2030
2030
|
"""
|
2031
|
-
request = {
|
2031
|
+
request: dict = {
|
2032
2032
|
'token_side': 'DEPOSIT',
|
2033
2033
|
}
|
2034
2034
|
return self.fetch_deposits_withdrawals(code, since, limit, self.extend(request, params))
|
@@ -2043,7 +2043,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2043
2043
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2044
2044
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2045
2045
|
"""
|
2046
|
-
request = {
|
2046
|
+
request: dict = {
|
2047
2047
|
'token_side': 'WITHDRAW',
|
2048
2048
|
}
|
2049
2049
|
return self.fetch_deposits_withdrawals(code, since, limit, self.extend(request, params))
|
@@ -2058,7 +2058,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2058
2058
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2059
2059
|
:returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2060
2060
|
"""
|
2061
|
-
request = {
|
2061
|
+
request: dict = {
|
2062
2062
|
'type': 'BALANCE',
|
2063
2063
|
}
|
2064
2064
|
currency, rows = self.get_asset_history_rows(code, since, limit, self.extend(request, params))
|
@@ -2075,7 +2075,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2075
2075
|
#
|
2076
2076
|
return self.parse_transactions(rows, currency, since, limit, params)
|
2077
2077
|
|
2078
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2078
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2079
2079
|
# example in fetchLedger
|
2080
2080
|
networkizedCode = self.safe_string(transaction, 'token')
|
2081
2081
|
currencyDefined = self.get_currency_from_chaincode(networkizedCode, currency)
|
@@ -2111,7 +2111,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2111
2111
|
}
|
2112
2112
|
|
2113
2113
|
def parse_transaction_status(self, status):
|
2114
|
-
statuses = {
|
2114
|
+
statuses: dict = {
|
2115
2115
|
'NEW': 'pending',
|
2116
2116
|
'CONFIRMING': 'pending',
|
2117
2117
|
'PROCESSING': 'pending',
|
@@ -2133,7 +2133,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2133
2133
|
"""
|
2134
2134
|
self.load_markets()
|
2135
2135
|
currency = self.currency(code)
|
2136
|
-
request = {
|
2136
|
+
request: dict = {
|
2137
2137
|
'token': currency['id'],
|
2138
2138
|
'amount': self.parse_to_numeric(amount),
|
2139
2139
|
'from_application_id': fromAccount,
|
@@ -2166,7 +2166,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2166
2166
|
:param int [params.until]: the latest time in ms to fetch entries for
|
2167
2167
|
:returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
|
2168
2168
|
"""
|
2169
|
-
request = {}
|
2169
|
+
request: dict = {}
|
2170
2170
|
if limit is not None:
|
2171
2171
|
request['size'] = limit
|
2172
2172
|
if since is not None:
|
@@ -2246,7 +2246,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2246
2246
|
}
|
2247
2247
|
|
2248
2248
|
def parse_transfer_status(self, status: Str) -> Str:
|
2249
|
-
statuses = {
|
2249
|
+
statuses: dict = {
|
2250
2250
|
'NEW': 'pending',
|
2251
2251
|
'CONFIRMING': 'pending',
|
2252
2252
|
'PROCESSING': 'pending',
|
@@ -2270,7 +2270,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2270
2270
|
self.load_markets()
|
2271
2271
|
self.check_address(address)
|
2272
2272
|
currency = self.currency(code)
|
2273
|
-
request = {
|
2273
|
+
request: dict = {
|
2274
2274
|
'amount': amount,
|
2275
2275
|
'address': address,
|
2276
2276
|
}
|
@@ -2310,7 +2310,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2310
2310
|
market = self.market(symbol)
|
2311
2311
|
symbol = market['symbol']
|
2312
2312
|
currency = self.currency(code)
|
2313
|
-
request = {
|
2313
|
+
request: dict = {
|
2314
2314
|
'token': currency['id'], # interest token that you want to repay
|
2315
2315
|
'amount': self.currency_to_precision(code, amount),
|
2316
2316
|
}
|
@@ -2449,7 +2449,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2449
2449
|
|
2450
2450
|
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2451
2451
|
self.load_markets()
|
2452
|
-
request = {}
|
2452
|
+
request: dict = {}
|
2453
2453
|
market: Market = None
|
2454
2454
|
if symbol is not None:
|
2455
2455
|
market = self.market(symbol)
|
@@ -2523,7 +2523,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2523
2523
|
def fetch_funding_rate(self, symbol: str, params={}):
|
2524
2524
|
self.load_markets()
|
2525
2525
|
market = self.market(symbol)
|
2526
|
-
request = {
|
2526
|
+
request: dict = {
|
2527
2527
|
'symbol': market['id'],
|
2528
2528
|
}
|
2529
2529
|
response = self.v1PublicGetFundingRateSymbol(self.extend(request, params))
|
@@ -2582,7 +2582,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2582
2582
|
paginate, params = self.handle_option_and_params(params, 'fetchFundingRateHistory', 'paginate')
|
2583
2583
|
if paginate:
|
2584
2584
|
return self.fetch_paginated_call_incremental('fetchFundingRateHistory', symbol, since, limit, params, 'page', 25)
|
2585
|
-
request = {}
|
2585
|
+
request: dict = {}
|
2586
2586
|
if symbol is not None:
|
2587
2587
|
market = self.market(symbol)
|
2588
2588
|
symbol = market['symbol']
|
@@ -2640,7 +2640,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2640
2640
|
hedgeMode = 'HEDGE_MODE'
|
2641
2641
|
else:
|
2642
2642
|
hedgeMode = 'ONE_WAY'
|
2643
|
-
request = {
|
2643
|
+
request: dict = {
|
2644
2644
|
'position_mode': hedgeMode,
|
2645
2645
|
}
|
2646
2646
|
response = self.v1PrivatePostClientPositionMode(self.extend(request, params))
|
@@ -2709,7 +2709,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2709
2709
|
self.load_markets()
|
2710
2710
|
if (leverage < 1) or (leverage > 20):
|
2711
2711
|
raise BadRequest(self.id + ' leverage should be between 1 and 20')
|
2712
|
-
request = {
|
2712
|
+
request: dict = {
|
2713
2713
|
'leverage': leverage,
|
2714
2714
|
}
|
2715
2715
|
return self.v1PrivatePostClientLeverage(self.extend(request, params))
|
@@ -2717,7 +2717,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2717
2717
|
def fetch_position(self, symbol: Str = None, params={}):
|
2718
2718
|
self.load_markets()
|
2719
2719
|
market = self.market(symbol)
|
2720
|
-
request = {
|
2720
|
+
request: dict = {
|
2721
2721
|
'symbol': market['id'],
|
2722
2722
|
}
|
2723
2723
|
response = self.v1PrivateGetPositionSymbol(self.extend(request, params))
|
@@ -2768,7 +2768,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2768
2768
|
positions = self.safe_list(result, 'positions', [])
|
2769
2769
|
return self.parse_positions(positions, symbols)
|
2770
2770
|
|
2771
|
-
def parse_position(self, position, market: Market = None):
|
2771
|
+
def parse_position(self, position: dict, market: Market = None):
|
2772
2772
|
#
|
2773
2773
|
# {
|
2774
2774
|
# "symbol": "0_symbol",
|
@@ -2842,7 +2842,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2842
2842
|
:returns dict: a `conversion structure <https://docs.ccxt.com/#/?id=conversion-structure>`
|
2843
2843
|
"""
|
2844
2844
|
self.load_markets()
|
2845
|
-
request = {
|
2845
|
+
request: dict = {
|
2846
2846
|
'sellToken': fromCode.upper(),
|
2847
2847
|
'buyToken': toCode.upper(),
|
2848
2848
|
'sellQuantity': self.number_to_string(amount),
|
@@ -2883,7 +2883,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2883
2883
|
:returns dict: a `conversion structure <https://docs.ccxt.com/#/?id=conversion-structure>`
|
2884
2884
|
"""
|
2885
2885
|
self.load_markets()
|
2886
|
-
request = {
|
2886
|
+
request: dict = {
|
2887
2887
|
'quoteId': id,
|
2888
2888
|
}
|
2889
2889
|
response = self.v3PrivatePostConvertRft(self.extend(request, params))
|
@@ -2910,7 +2910,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2910
2910
|
:returns dict: a `conversion structure <https://docs.ccxt.com/#/?id=conversion-structure>`
|
2911
2911
|
"""
|
2912
2912
|
self.load_markets()
|
2913
|
-
request = {
|
2913
|
+
request: dict = {
|
2914
2914
|
'quoteId': id,
|
2915
2915
|
}
|
2916
2916
|
response = self.v3PrivateGetConvertTrade(self.extend(request, params))
|
@@ -2951,7 +2951,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2951
2951
|
:returns dict[]: a list of `conversion structures <https://docs.ccxt.com/#/?id=conversion-structure>`
|
2952
2952
|
"""
|
2953
2953
|
self.load_markets()
|
2954
|
-
request = {}
|
2954
|
+
request: dict = {}
|
2955
2955
|
request, params = self.handle_until_option('endTime', request, params)
|
2956
2956
|
if since is not None:
|
2957
2957
|
request['startTime'] = since
|
@@ -3058,7 +3058,7 @@ class woo(Exchange, ImplicitAPI):
|
|
3058
3058
|
# ]
|
3059
3059
|
# }
|
3060
3060
|
#
|
3061
|
-
result = {}
|
3061
|
+
result: dict = {}
|
3062
3062
|
data = self.safe_list(response, 'rows', [])
|
3063
3063
|
for i in range(0, len(data)):
|
3064
3064
|
entry = data[i]
|