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
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.poloniexfutures 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, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import AccountSuspended
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -352,7 +352,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
352
352
|
'info': market,
|
353
353
|
}
|
354
354
|
|
355
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
355
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
356
356
|
#
|
357
357
|
# {
|
358
358
|
# "symbol": "BTCUSDTPERP", # Market of the symbol
|
@@ -543,7 +543,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
543
543
|
market = self.market(symbol)
|
544
544
|
return self.fetch_order_book(market['id'], None, {'level': 3})
|
545
545
|
|
546
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
546
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
547
547
|
#
|
548
548
|
# fetchTrades(public)
|
549
549
|
#
|
@@ -873,7 +873,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
873
873
|
'info': response,
|
874
874
|
}, market)
|
875
875
|
|
876
|
-
async def cancel_order(self, id: str, symbol:
|
876
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
877
877
|
"""
|
878
878
|
cancels an open order
|
879
879
|
:see: https://futures-docs.poloniex.com/#cancel-an-order
|
@@ -969,7 +969,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
969
969
|
data = self.safe_value(response, 'data')
|
970
970
|
return self.parse_positions(data, symbols)
|
971
971
|
|
972
|
-
def parse_position(self, position, market=None):
|
972
|
+
def parse_position(self, position, market: Market = None):
|
973
973
|
#
|
974
974
|
# {
|
975
975
|
# "code": "200000",
|
@@ -1020,7 +1020,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1020
1020
|
market = self.safe_market(symbol, market)
|
1021
1021
|
timestamp = self.safe_integer(position, 'currentTimestamp')
|
1022
1022
|
size = self.safe_string(position, 'currentQty')
|
1023
|
-
side
|
1023
|
+
side: Str
|
1024
1024
|
if Precise.string_gt(size, '0'):
|
1025
1025
|
side = 'long'
|
1026
1026
|
elif Precise.string_lt(size, '0'):
|
@@ -1060,7 +1060,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1060
1060
|
'takeProfitPrice': None,
|
1061
1061
|
}
|
1062
1062
|
|
1063
|
-
async def fetch_funding_history(self, symbol:
|
1063
|
+
async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1064
1064
|
"""
|
1065
1065
|
fetch the history of funding payments paid and received on self account
|
1066
1066
|
:see: https://futures-docs.poloniex.com/#get-funding-history
|
@@ -1126,7 +1126,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1126
1126
|
})
|
1127
1127
|
return fees
|
1128
1128
|
|
1129
|
-
async def cancel_all_orders(self, symbol:
|
1129
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1130
1130
|
"""
|
1131
1131
|
cancel all open orders
|
1132
1132
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
@@ -1182,7 +1182,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1182
1182
|
})
|
1183
1183
|
return result
|
1184
1184
|
|
1185
|
-
async def fetch_orders_by_status(self, status, symbol:
|
1185
|
+
async def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1186
1186
|
"""
|
1187
1187
|
fetches a list of orders placed on the exchange
|
1188
1188
|
:see: https://futures-docs.poloniex.com/#get-order-list
|
@@ -1209,7 +1209,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1209
1209
|
request['status'] = 'active' if (status == 'open') else 'done'
|
1210
1210
|
elif status != 'open':
|
1211
1211
|
raise BadRequest(self.id + ' fetchOrdersByStatus() can only fetch untriggered stop orders')
|
1212
|
-
market = None
|
1212
|
+
market: Market = None
|
1213
1213
|
if symbol is not None:
|
1214
1214
|
market = self.market(symbol)
|
1215
1215
|
request['symbol'] = market['id']
|
@@ -1277,7 +1277,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1277
1277
|
result.append(orders[i])
|
1278
1278
|
return self.parse_orders(result, market, since, limit)
|
1279
1279
|
|
1280
|
-
async def fetch_open_orders(self, symbol:
|
1280
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1281
1281
|
"""
|
1282
1282
|
fetch all unfilled currently open orders
|
1283
1283
|
:see: https://futures-docs.poloniex.com/#get-order-list
|
@@ -1293,7 +1293,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1293
1293
|
"""
|
1294
1294
|
return await self.fetch_orders_by_status('open', symbol, since, limit, params)
|
1295
1295
|
|
1296
|
-
async def fetch_closed_orders(self, symbol:
|
1296
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1297
1297
|
"""
|
1298
1298
|
fetches information on multiple closed orders made by the user
|
1299
1299
|
:see: https://futures-docs.poloniex.com/#get-order-list
|
@@ -1309,7 +1309,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1309
1309
|
"""
|
1310
1310
|
return await self.fetch_orders_by_status('closed', symbol, since, limit, params)
|
1311
1311
|
|
1312
|
-
async def fetch_order(self, id=None, symbol:
|
1312
|
+
async def fetch_order(self, id=None, symbol: Str = None, params={}):
|
1313
1313
|
"""
|
1314
1314
|
fetches information on an order made by the user
|
1315
1315
|
:see: https://futures-docs.poloniex.com/#get-details-of-a-single-order
|
@@ -1380,7 +1380,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1380
1380
|
responseData = self.safe_value(response, 'data')
|
1381
1381
|
return self.parse_order(responseData, market)
|
1382
1382
|
|
1383
|
-
def parse_order(self, order, market=None) -> Order:
|
1383
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1384
1384
|
#
|
1385
1385
|
# createOrder
|
1386
1386
|
#
|
@@ -1456,7 +1456,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1456
1456
|
feeCurrencyId = self.safe_string(order, 'feeCurrency')
|
1457
1457
|
filled = self.safe_string(order, 'dealSize')
|
1458
1458
|
rawCost = self.safe_string_2(order, 'dealFunds', 'filledValue')
|
1459
|
-
average = None
|
1459
|
+
average: Str = None
|
1460
1460
|
if Precise.string_gt(filled, '0'):
|
1461
1461
|
contractSize = self.safe_string(market, 'contractSize')
|
1462
1462
|
if market['linear']:
|
@@ -1546,7 +1546,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
1546
1546
|
'previousFundingDatetime': self.iso8601(fundingTimestamp),
|
1547
1547
|
}
|
1548
1548
|
|
1549
|
-
async def fetch_my_trades(self, symbol:
|
1549
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1550
1550
|
"""
|
1551
1551
|
fetch all trades made by the user
|
1552
1552
|
:see: https://futures-docs.poloniex.com/#get-fills
|
ccxt/async_support/probit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.probit import ImplicitAPI
|
8
8
|
import math
|
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 BadRequest
|
@@ -643,7 +643,7 @@ class probit(Exchange, ImplicitAPI):
|
|
643
643
|
raise BadResponse(self.id + ' fetchTicker() returned an empty response')
|
644
644
|
return self.parse_ticker(ticker, market)
|
645
645
|
|
646
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
646
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
647
647
|
#
|
648
648
|
# {
|
649
649
|
# "last":"0.022902",
|
@@ -686,7 +686,7 @@ class probit(Exchange, ImplicitAPI):
|
|
686
686
|
'info': ticker,
|
687
687
|
}, market)
|
688
688
|
|
689
|
-
async def fetch_my_trades(self, symbol:
|
689
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
690
690
|
"""
|
691
691
|
:see: https://docs-en.probit.com/reference/trade
|
692
692
|
fetch all trades made by the user
|
@@ -697,7 +697,7 @@ class probit(Exchange, ImplicitAPI):
|
|
697
697
|
:returns Trade[]: a list of `trade structures <https://github.com/ccxt/ccxt/wiki/Manual#trade-structure>`
|
698
698
|
"""
|
699
699
|
await self.load_markets()
|
700
|
-
market = None
|
700
|
+
market: Market = None
|
701
701
|
now = self.milliseconds()
|
702
702
|
request = {
|
703
703
|
'limit': 100,
|
@@ -783,7 +783,7 @@ class probit(Exchange, ImplicitAPI):
|
|
783
783
|
data = self.safe_value(response, 'data', [])
|
784
784
|
return self.parse_trades(data, market, since, limit)
|
785
785
|
|
786
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
786
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
787
787
|
#
|
788
788
|
# fetchTrades(public)
|
789
789
|
#
|
@@ -814,7 +814,7 @@ class probit(Exchange, ImplicitAPI):
|
|
814
814
|
#
|
815
815
|
timestamp = self.parse8601(self.safe_string(trade, 'time'))
|
816
816
|
id = self.safe_string(trade, 'id')
|
817
|
-
marketId = None
|
817
|
+
marketId: Str = None
|
818
818
|
if id is not None:
|
819
819
|
parts = id.split(':')
|
820
820
|
marketId = self.safe_string(parts, 0)
|
@@ -870,7 +870,7 @@ class probit(Exchange, ImplicitAPI):
|
|
870
870
|
parts = iso8601.split('-')
|
871
871
|
year = self.safe_string(parts, 0)
|
872
872
|
month = self.safe_integer(parts, 1)
|
873
|
-
monthString = None
|
873
|
+
monthString: Str = None
|
874
874
|
if after:
|
875
875
|
monthString = self.sum(month, str(1))
|
876
876
|
if month < 10:
|
@@ -953,7 +953,7 @@ class probit(Exchange, ImplicitAPI):
|
|
953
953
|
data = self.safe_value(response, 'data', [])
|
954
954
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
955
955
|
|
956
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
956
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
957
957
|
#
|
958
958
|
# {
|
959
959
|
# "market_id":"ETH-BTC",
|
@@ -976,7 +976,7 @@ class probit(Exchange, ImplicitAPI):
|
|
976
976
|
self.safe_number(ohlcv, 'base_volume'),
|
977
977
|
]
|
978
978
|
|
979
|
-
async def fetch_open_orders(self, symbol:
|
979
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
980
980
|
"""
|
981
981
|
:see: https://docs-en.probit.com/reference/open_order-1
|
982
982
|
fetch all unfilled currently open orders
|
@@ -989,7 +989,7 @@ class probit(Exchange, ImplicitAPI):
|
|
989
989
|
await self.load_markets()
|
990
990
|
since = self.parse8601(since)
|
991
991
|
request = {}
|
992
|
-
market = None
|
992
|
+
market: Market = None
|
993
993
|
if symbol is not None:
|
994
994
|
market = self.market(symbol)
|
995
995
|
request['market_id'] = market['id']
|
@@ -997,7 +997,7 @@ class probit(Exchange, ImplicitAPI):
|
|
997
997
|
data = self.safe_value(response, 'data')
|
998
998
|
return self.parse_orders(data, market, since, limit)
|
999
999
|
|
1000
|
-
async def fetch_closed_orders(self, symbol:
|
1000
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1001
1001
|
"""
|
1002
1002
|
:see: https://docs-en.probit.com/reference/order
|
1003
1003
|
fetches information on multiple closed orders made by the user
|
@@ -1013,7 +1013,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1013
1013
|
'end_time': self.iso8601(self.milliseconds()),
|
1014
1014
|
'limit': 100,
|
1015
1015
|
}
|
1016
|
-
market = None
|
1016
|
+
market: Market = None
|
1017
1017
|
if symbol is not None:
|
1018
1018
|
market = self.market(symbol)
|
1019
1019
|
request['market_id'] = market['id']
|
@@ -1025,7 +1025,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1025
1025
|
data = self.safe_value(response, 'data')
|
1026
1026
|
return self.parse_orders(data, market, since, limit)
|
1027
1027
|
|
1028
|
-
async def fetch_order(self, id: str, symbol:
|
1028
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1029
1029
|
"""
|
1030
1030
|
:see: https://docs-en.probit.com/reference/order-3
|
1031
1031
|
fetches information on an order made by the user
|
@@ -1058,7 +1058,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1058
1058
|
}
|
1059
1059
|
return self.safe_string(statuses, status, status)
|
1060
1060
|
|
1061
|
-
def parse_order(self, order, market=None) -> Order:
|
1061
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1062
1062
|
#
|
1063
1063
|
# {
|
1064
1064
|
# id,
|
@@ -1206,7 +1206,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1206
1206
|
order['remaining'] = None
|
1207
1207
|
return order
|
1208
1208
|
|
1209
|
-
async def cancel_order(self, id: str, symbol:
|
1209
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1210
1210
|
"""
|
1211
1211
|
:see: https://docs-en.probit.com/reference/order-2
|
1212
1212
|
cancels an open order
|
@@ -1226,7 +1226,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1226
1226
|
data = self.safe_value(response, 'data')
|
1227
1227
|
return self.parse_order(data)
|
1228
1228
|
|
1229
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
1229
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1230
1230
|
address = self.safe_string(depositAddress, 'address')
|
1231
1231
|
tag = self.safe_string(depositAddress, 'destination_tag')
|
1232
1232
|
currencyId = self.safe_string(depositAddress, 'currency_id')
|
@@ -1355,7 +1355,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1355
1355
|
data = self.safe_value(response, 'data')
|
1356
1356
|
return self.parse_transaction(data, currency)
|
1357
1357
|
|
1358
|
-
async def fetch_deposits(self, code:
|
1358
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1359
1359
|
"""
|
1360
1360
|
fetch all deposits made to an account
|
1361
1361
|
:param str code: unified currency code
|
@@ -1370,7 +1370,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1370
1370
|
result = await self.fetch_transactions(code, since, limit, self.extend(request, params))
|
1371
1371
|
return result
|
1372
1372
|
|
1373
|
-
async def fetch_withdrawals(self, code:
|
1373
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1374
1374
|
"""
|
1375
1375
|
fetch all withdrawals made to an account
|
1376
1376
|
:param str code: unified currency code
|
@@ -1385,7 +1385,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1385
1385
|
result = await self.fetch_transactions(code, since, limit, self.extend(request, params))
|
1386
1386
|
return result
|
1387
1387
|
|
1388
|
-
async def fetch_transactions(self, code:
|
1388
|
+
async def fetch_transactions(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1389
1389
|
"""
|
1390
1390
|
* @deprecated
|
1391
1391
|
use fetchDepositsWithdrawals instead
|
@@ -1398,7 +1398,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1398
1398
|
:returns dict[]: a list of `transaction structures <https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure>`
|
1399
1399
|
"""
|
1400
1400
|
await self.load_markets()
|
1401
|
-
currency = None
|
1401
|
+
currency: Currency = None
|
1402
1402
|
request = {}
|
1403
1403
|
if code is not None:
|
1404
1404
|
currency = self.currency(code)
|
@@ -1445,7 +1445,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1445
1445
|
data = self.safe_value(response, 'data', {})
|
1446
1446
|
return self.parse_transactions(data, currency, since, limit)
|
1447
1447
|
|
1448
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1448
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1449
1449
|
#
|
1450
1450
|
# {
|
1451
1451
|
# "id": "01211d4b-0e68-41d6-97cb-298bfe2cab67",
|
@@ -1589,7 +1589,7 @@ class probit(Exchange, ImplicitAPI):
|
|
1589
1589
|
data = self.safe_value(response, 'data')
|
1590
1590
|
return self.parse_deposit_withdraw_fees(data, codes, 'id')
|
1591
1591
|
|
1592
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
1592
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
1593
1593
|
#
|
1594
1594
|
# {
|
1595
1595
|
# "id": "USDT",
|
ccxt/async_support/tidex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.tidex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -456,7 +456,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
456
456
|
result[symbol] = self.parse_order_book(response[id], symbol)
|
457
457
|
return result
|
458
458
|
|
459
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
459
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
460
460
|
#
|
461
461
|
# {
|
462
462
|
# "high": 0.03497582,
|
@@ -539,7 +539,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
539
539
|
tickers = await self.fetch_tickers([symbol], params)
|
540
540
|
return tickers[symbol]
|
541
541
|
|
542
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
542
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
543
543
|
timestamp = self.safe_timestamp(trade, 'timestamp')
|
544
544
|
side = self.safe_string(trade, 'type')
|
545
545
|
if side == 'ask':
|
@@ -556,7 +556,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
556
556
|
amount = self.parse_number(amountString)
|
557
557
|
cost = self.parse_number(Precise.string_mul(priceString, amountString))
|
558
558
|
type = 'limit' # all trades are still limit trades
|
559
|
-
takerOrMaker = None
|
559
|
+
takerOrMaker: Str = None
|
560
560
|
fee = None
|
561
561
|
feeCost = self.safe_number(trade, 'commission')
|
562
562
|
if feeCost is not None:
|
@@ -636,7 +636,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
636
636
|
'rate': self.price_to_precision(symbol, price),
|
637
637
|
}
|
638
638
|
response = await self.privatePostTrade(self.extend(request, params))
|
639
|
-
id = None
|
639
|
+
id: Str = None
|
640
640
|
status = 'open'
|
641
641
|
filledString = '0.0'
|
642
642
|
remainingString = amountString
|
@@ -671,7 +671,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
671
671
|
'trades': None,
|
672
672
|
}, market)
|
673
673
|
|
674
|
-
async def cancel_order(self, id: str, symbol:
|
674
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
675
675
|
"""
|
676
676
|
cancels an open order
|
677
677
|
:param str id: order id
|
@@ -694,14 +694,14 @@ class tidex(Exchange, ImplicitAPI):
|
|
694
694
|
}
|
695
695
|
return self.safe_string(statuses, status, status)
|
696
696
|
|
697
|
-
def parse_order(self, order, market=None) -> Order:
|
697
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
698
698
|
id = self.safe_string(order, 'id')
|
699
699
|
status = self.parse_order_status(self.safe_string(order, 'status'))
|
700
700
|
timestamp = self.safe_timestamp(order, 'timestamp_created')
|
701
701
|
marketId = self.safe_string(order, 'pair')
|
702
702
|
symbol = self.safe_symbol(marketId, market)
|
703
|
-
remaining
|
704
|
-
amount
|
703
|
+
remaining: str
|
704
|
+
amount: Str
|
705
705
|
price = self.safe_string(order, 'rate')
|
706
706
|
if 'start_amount' in order:
|
707
707
|
amount = self.safe_string(order, 'start_amount')
|
@@ -734,7 +734,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
734
734
|
'trades': None,
|
735
735
|
}, market)
|
736
736
|
|
737
|
-
async def fetch_order(self, id: str, symbol:
|
737
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
738
738
|
"""
|
739
739
|
fetches information on an order made by the user
|
740
740
|
:param str symbol: not used by tidex fetchOrder
|
@@ -751,7 +751,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
751
751
|
order = self.safe_value(result, id)
|
752
752
|
return self.parse_order(self.extend({'id': id}, order))
|
753
753
|
|
754
|
-
async def fetch_open_orders(self, symbol:
|
754
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
755
755
|
"""
|
756
756
|
fetch all unfilled currently open orders
|
757
757
|
:param str symbol: unified market symbol
|
@@ -762,7 +762,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
762
762
|
"""
|
763
763
|
await self.load_markets()
|
764
764
|
request = {}
|
765
|
-
market = None
|
765
|
+
market: Market = None
|
766
766
|
if symbol is not None:
|
767
767
|
market = self.market(symbol)
|
768
768
|
request['pair'] = market['id']
|
@@ -792,7 +792,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
792
792
|
orders = self.safe_value(response, 'return', [])
|
793
793
|
return self.parse_orders(orders, market, since, limit)
|
794
794
|
|
795
|
-
async def fetch_my_trades(self, symbol:
|
795
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
796
796
|
"""
|
797
797
|
fetch all trades made by the user
|
798
798
|
:param str symbol: unified market symbol
|
@@ -802,7 +802,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
802
802
|
:returns Trade[]: a list of `trade structures <https://github.com/ccxt/ccxt/wiki/Manual#trade-structure>`
|
803
803
|
"""
|
804
804
|
await self.load_markets()
|
805
|
-
market = None
|
805
|
+
market: Market = None
|
806
806
|
# some derived classes use camelcase notation for request fields
|
807
807
|
request = {
|
808
808
|
# 'from': 123456789, # trade ID, from which the display starts numerical 0(test result: liqui ignores self field)
|
@@ -875,7 +875,7 @@ class tidex(Exchange, ImplicitAPI):
|
|
875
875
|
withdrawInfo = self.safe_value(result, 'withdraw_info', {})
|
876
876
|
return self.parse_transaction(withdrawInfo, currency)
|
877
877
|
|
878
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
878
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
879
879
|
#
|
880
880
|
# {
|
881
881
|
# "id":1111,
|
ccxt/async_support/timex.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.timex import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
8
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import PermissionDenied
|
@@ -343,7 +343,7 @@ class timex(Exchange, ImplicitAPI):
|
|
343
343
|
result.append(self.parse_currency(currency))
|
344
344
|
return self.index_by(result, 'code')
|
345
345
|
|
346
|
-
async def fetch_deposits(self, code:
|
346
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
347
347
|
"""
|
348
348
|
fetch all deposits made to an account
|
349
349
|
:param str code: unified currency code
|
@@ -375,7 +375,7 @@ class timex(Exchange, ImplicitAPI):
|
|
375
375
|
currency = self.safe_currency(code)
|
376
376
|
return self.parse_transactions(response, currency, since, limit)
|
377
377
|
|
378
|
-
async def fetch_withdrawals(self, code:
|
378
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
379
379
|
"""
|
380
380
|
fetch all withdrawals made to an account
|
381
381
|
:param str code: unified currency code
|
@@ -417,7 +417,7 @@ class timex(Exchange, ImplicitAPI):
|
|
417
417
|
return currency
|
418
418
|
return None
|
419
419
|
|
420
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
420
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
421
421
|
#
|
422
422
|
# {
|
423
423
|
# "from": "0x1134cc86b45039cc211c6d1d2e4b3c77f60207ed",
|
@@ -802,7 +802,7 @@ class timex(Exchange, ImplicitAPI):
|
|
802
802
|
order = self.safe_value(firstOrder, 'newOrder', {})
|
803
803
|
return self.parse_order(order, market)
|
804
804
|
|
805
|
-
async def cancel_order(self, id: str, symbol:
|
805
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
806
806
|
"""
|
807
807
|
cancels an open order
|
808
808
|
:param str id: order id
|
@@ -813,7 +813,7 @@ class timex(Exchange, ImplicitAPI):
|
|
813
813
|
await self.load_markets()
|
814
814
|
return await self.cancel_orders([id], symbol, params)
|
815
815
|
|
816
|
-
async def cancel_orders(self, ids, symbol:
|
816
|
+
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
817
817
|
"""
|
818
818
|
cancel multiple orders
|
819
819
|
:param str[] ids: order ids
|
@@ -852,7 +852,7 @@ class timex(Exchange, ImplicitAPI):
|
|
852
852
|
# }
|
853
853
|
return response
|
854
854
|
|
855
|
-
async def fetch_order(self, id: str, symbol:
|
855
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
856
856
|
"""
|
857
857
|
fetches information on an order made by the user
|
858
858
|
:param str symbol: not used by timex fetchOrder
|
@@ -901,7 +901,7 @@ class timex(Exchange, ImplicitAPI):
|
|
901
901
|
trades = self.safe_value(response, 'trades', [])
|
902
902
|
return self.parse_order(self.extend(order, {'trades': trades}))
|
903
903
|
|
904
|
-
async def fetch_open_orders(self, symbol:
|
904
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
905
905
|
"""
|
906
906
|
fetch all unfilled currently open orders
|
907
907
|
:param str symbol: unified market symbol
|
@@ -920,7 +920,7 @@ class timex(Exchange, ImplicitAPI):
|
|
920
920
|
# page: 0, # results page you want to retrieve(0 .. N)
|
921
921
|
'sort': sort, # sorting criteria in the format "property,asc" or "property,desc", default order is ascending, multiple sort criteria are supported
|
922
922
|
}
|
923
|
-
market = None
|
923
|
+
market: Market = None
|
924
924
|
if symbol is not None:
|
925
925
|
market = self.market(symbol)
|
926
926
|
request['symbol'] = market['id']
|
@@ -951,7 +951,7 @@ class timex(Exchange, ImplicitAPI):
|
|
951
951
|
orders = self.safe_value(response, 'orders', [])
|
952
952
|
return self.parse_orders(orders, market, since, limit)
|
953
953
|
|
954
|
-
async def fetch_closed_orders(self, symbol:
|
954
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
955
955
|
"""
|
956
956
|
fetches information on multiple closed orders made by the user
|
957
957
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -972,7 +972,7 @@ class timex(Exchange, ImplicitAPI):
|
|
972
972
|
'side': 'BUY', # or 'SELL'
|
973
973
|
# 'till': self.iso8601(self.milliseconds()),
|
974
974
|
}
|
975
|
-
market = None
|
975
|
+
market: Market = None
|
976
976
|
if symbol is not None:
|
977
977
|
market = self.market(symbol)
|
978
978
|
request['symbol'] = market['id']
|
@@ -1005,7 +1005,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1005
1005
|
orders = self.safe_value(response, 'orders', [])
|
1006
1006
|
return self.parse_orders(orders, market, since, limit)
|
1007
1007
|
|
1008
|
-
async def fetch_my_trades(self, symbol:
|
1008
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1009
1009
|
"""
|
1010
1010
|
fetch all trades made by the user
|
1011
1011
|
:param str symbol: unified market symbol
|
@@ -1032,7 +1032,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1032
1032
|
# 'takerOrderId': '1234',
|
1033
1033
|
# 'till': self.iso8601(self.milliseconds()),
|
1034
1034
|
}
|
1035
|
-
market = None
|
1035
|
+
market: Market = None
|
1036
1036
|
if symbol is not None:
|
1037
1037
|
market = self.market(symbol)
|
1038
1038
|
request['symbol'] = market['id']
|
@@ -1062,7 +1062,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1062
1062
|
trades = self.safe_value(response, 'trades', [])
|
1063
1063
|
return self.parse_trades(trades, market, since, limit)
|
1064
1064
|
|
1065
|
-
def parse_trading_fee(self, fee, market=None):
|
1065
|
+
def parse_trading_fee(self, fee, market: Market = None):
|
1066
1066
|
#
|
1067
1067
|
# {
|
1068
1068
|
# "fee": 0.0075,
|
@@ -1264,7 +1264,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1264
1264
|
'networks': {},
|
1265
1265
|
}
|
1266
1266
|
|
1267
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
1267
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
1268
1268
|
#
|
1269
1269
|
# {
|
1270
1270
|
# "ask": 0.017,
|
@@ -1308,7 +1308,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1308
1308
|
'quoteVolume': self.safe_string(ticker, 'volumeQuote'),
|
1309
1309
|
}, market)
|
1310
1310
|
|
1311
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
1311
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1312
1312
|
#
|
1313
1313
|
# fetchTrades(public)
|
1314
1314
|
#
|
@@ -1347,7 +1347,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1347
1347
|
id = self.safe_string(trade, 'id')
|
1348
1348
|
side = self.safe_string_lower_2(trade, 'direction', 'side')
|
1349
1349
|
takerOrMaker = self.safe_string_lower(trade, 'makerOrTaker')
|
1350
|
-
orderId = None
|
1350
|
+
orderId: Str = None
|
1351
1351
|
if takerOrMaker is not None:
|
1352
1352
|
orderId = self.safe_string(trade, takerOrMaker + 'OrderId')
|
1353
1353
|
fee = None
|
@@ -1374,7 +1374,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1374
1374
|
'fee': fee,
|
1375
1375
|
}
|
1376
1376
|
|
1377
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1377
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1378
1378
|
#
|
1379
1379
|
# {
|
1380
1380
|
# "timestamp":"2019-12-04T23:00:00",
|
@@ -1395,7 +1395,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1395
1395
|
self.safe_number(ohlcv, 'volume'),
|
1396
1396
|
]
|
1397
1397
|
|
1398
|
-
def parse_order(self, order, market=None) -> Order:
|
1398
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1399
1399
|
#
|
1400
1400
|
# fetchOrder, createOrder, cancelOrder, cancelOrders, fetchOpenOrders, fetchClosedOrders
|
1401
1401
|
#
|
@@ -1426,7 +1426,7 @@ class timex(Exchange, ImplicitAPI):
|
|
1426
1426
|
amount = self.safe_string(order, 'quantity')
|
1427
1427
|
filled = self.safe_string(order, 'filledQuantity')
|
1428
1428
|
canceledQuantity = self.omit_zero(self.safe_string(order, 'cancelledQuantity'))
|
1429
|
-
status
|
1429
|
+
status: str
|
1430
1430
|
if Precise.string_equals(filled, amount):
|
1431
1431
|
status = 'closed'
|
1432
1432
|
elif canceledQuantity is not None:
|