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/tidex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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 = 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 = 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
|
-
def cancel_order(self, id: str, symbol:
|
674
|
+
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
|
-
def fetch_order(self, id: str, symbol:
|
737
|
+
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
|
-
def fetch_open_orders(self, symbol:
|
754
|
+
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
|
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
|
-
def fetch_my_trades(self, symbol:
|
795
|
+
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
|
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/timex.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.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
|
-
def fetch_deposits(self, code:
|
346
|
+
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
|
-
def fetch_withdrawals(self, code:
|
378
|
+
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
|
-
def cancel_order(self, id: str, symbol:
|
805
|
+
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
|
self.load_markets()
|
814
814
|
return self.cancel_orders([id], symbol, params)
|
815
815
|
|
816
|
-
def cancel_orders(self, ids, symbol:
|
816
|
+
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
|
-
def fetch_order(self, id: str, symbol:
|
855
|
+
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
|
-
def fetch_open_orders(self, symbol:
|
904
|
+
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
|
-
def fetch_closed_orders(self, symbol:
|
954
|
+
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
|
-
def fetch_my_trades(self, symbol:
|
1008
|
+
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:
|
ccxt/tokocrypto.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.tokocrypto import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType,
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -843,7 +843,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
843
843
|
orderbook['nonce'] = self.safe_integer(data, 'lastUpdateId')
|
844
844
|
return orderbook
|
845
845
|
|
846
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
846
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
847
847
|
#
|
848
848
|
# aggregate trades
|
849
849
|
# https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#compressedaggregate-trades-list
|
@@ -945,10 +945,10 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
945
945
|
symbol = self.safe_symbol(marketId, market)
|
946
946
|
id = self.safe_string_2(trade, 't', 'a')
|
947
947
|
id = self.safe_string_2(trade, 'id', 'tradeId', id)
|
948
|
-
side = None
|
948
|
+
side: Str = None
|
949
949
|
orderId = self.safe_string(trade, 'orderId')
|
950
950
|
buyerMaker = self.safe_value_2(trade, 'm', 'isBuyerMaker')
|
951
|
-
takerOrMaker = None
|
951
|
+
takerOrMaker: Str = None
|
952
952
|
if buyerMaker is not None:
|
953
953
|
side = 'sell' if buyerMaker else 'buy' # self is reversed intentionally
|
954
954
|
takerOrMaker = 'taker'
|
@@ -1059,7 +1059,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1059
1059
|
#
|
1060
1060
|
return self.parse_trades(response, market, since, limit)
|
1061
1061
|
|
1062
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
1062
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
1063
1063
|
#
|
1064
1064
|
# {
|
1065
1065
|
# "symbol": "ETHBTC",
|
@@ -1192,7 +1192,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1192
1192
|
response = self.binanceGetTickerBookTicker(params)
|
1193
1193
|
return self.parse_tickers(response, symbols)
|
1194
1194
|
|
1195
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1195
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1196
1196
|
# when api method = publicGetKlines or fapiPublicGetKlines or dapiPublicGetKlines
|
1197
1197
|
# [
|
1198
1198
|
# 1591478520000, # open time
|
@@ -1369,7 +1369,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1369
1369
|
}
|
1370
1370
|
return self.safe_string(statuses, status, status)
|
1371
1371
|
|
1372
|
-
def parse_order(self, order, market=None) -> Order:
|
1372
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1373
1373
|
#
|
1374
1374
|
# spot
|
1375
1375
|
#
|
@@ -1680,7 +1680,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1680
1680
|
rawOrder = self.safe_value(response, 'data', {})
|
1681
1681
|
return self.parse_order(rawOrder, market)
|
1682
1682
|
|
1683
|
-
def fetch_order(self, id: str, symbol:
|
1683
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1684
1684
|
"""
|
1685
1685
|
:see: https://www.tokocrypto.com/apidocs/#all-orders-signed
|
1686
1686
|
fetches information on an order made by the user
|
@@ -1727,7 +1727,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1727
1727
|
rawOrder = self.safe_value(list, 0, {})
|
1728
1728
|
return self.parse_order(rawOrder)
|
1729
1729
|
|
1730
|
-
def fetch_orders(self, symbol:
|
1730
|
+
def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1731
1731
|
"""
|
1732
1732
|
:see: https://www.tokocrypto.com/apidocs/#all-orders-signed
|
1733
1733
|
fetches information on multiple orders made by the user
|
@@ -1792,7 +1792,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1792
1792
|
orders = self.safe_value(data, 'list', [])
|
1793
1793
|
return self.parse_orders(orders, market, since, limit)
|
1794
1794
|
|
1795
|
-
def fetch_open_orders(self, symbol:
|
1795
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1796
1796
|
"""
|
1797
1797
|
:see: https://www.tokocrypto.com/apidocs/#all-orders-signed
|
1798
1798
|
fetch all unfilled currently open orders
|
@@ -1805,7 +1805,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1805
1805
|
request = {'type': 1} # -1 = all, 1 = open, 2 = closed
|
1806
1806
|
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1807
1807
|
|
1808
|
-
def fetch_closed_orders(self, symbol:
|
1808
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1809
1809
|
"""
|
1810
1810
|
:see: https://www.tokocrypto.com/apidocs/#all-orders-signed
|
1811
1811
|
fetches information on multiple closed orders made by the user
|
@@ -1818,7 +1818,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1818
1818
|
request = {'type': 2} # -1 = all, 1 = open, 2 = closed
|
1819
1819
|
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1820
1820
|
|
1821
|
-
def cancel_order(self, id: str, symbol:
|
1821
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1822
1822
|
"""
|
1823
1823
|
:see: https://www.tokocrypto.com/apidocs/#cancel-order-signed
|
1824
1824
|
cancels an open order
|
@@ -1861,7 +1861,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1861
1861
|
rawOrder = self.safe_value(response, 'data', {})
|
1862
1862
|
return self.parse_order(rawOrder)
|
1863
1863
|
|
1864
|
-
def fetch_my_trades(self, symbol:
|
1864
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1865
1865
|
"""
|
1866
1866
|
:see: https://www.tokocrypto.com/apidocs/#account-trade-list-signed
|
1867
1867
|
fetch all trades made by the user
|
@@ -1967,7 +1967,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1967
1967
|
'info': response,
|
1968
1968
|
}
|
1969
1969
|
|
1970
|
-
def fetch_deposits(self, code:
|
1970
|
+
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1971
1971
|
"""
|
1972
1972
|
:see: https://www.tokocrypto.com/apidocs/#deposit-history-signed
|
1973
1973
|
fetch all deposits made to an account
|
@@ -2022,7 +2022,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2022
2022
|
deposits = self.safe_value(data, 'list', [])
|
2023
2023
|
return self.parse_transactions(deposits, currency, since, limit)
|
2024
2024
|
|
2025
|
-
def fetch_withdrawals(self, code:
|
2025
|
+
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2026
2026
|
"""
|
2027
2027
|
:see: https://www.tokocrypto.com/apidocs/#withdraw-signed
|
2028
2028
|
fetch all withdrawals made from an account
|
@@ -2093,7 +2093,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2093
2093
|
statuses = self.safe_value(statusesByType, type, {})
|
2094
2094
|
return self.safe_string(statuses, status, status)
|
2095
2095
|
|
2096
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
2096
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2097
2097
|
#
|
2098
2098
|
# fetchDeposits
|
2099
2099
|
#
|
ccxt/upbit.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.upbit 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
|
@@ -592,7 +592,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
592
592
|
orderbooks = self.fetch_order_books([symbol], limit, params)
|
593
593
|
return self.safe_value(orderbooks, symbol)
|
594
594
|
|
595
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
595
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
596
596
|
#
|
597
597
|
# { market: "BTC-ETH",
|
598
598
|
# "trade_date": "20181122",
|
@@ -718,7 +718,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
718
718
|
tickers = self.fetch_tickers([symbol], params)
|
719
719
|
return self.safe_value(tickers, symbol)
|
720
720
|
|
721
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
721
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
722
722
|
#
|
723
723
|
# fetchTrades
|
724
724
|
#
|
@@ -892,7 +892,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
892
892
|
'tierBased': False,
|
893
893
|
}
|
894
894
|
|
895
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
895
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
896
896
|
#
|
897
897
|
# {
|
898
898
|
# "market": "BTC-ETH",
|
@@ -1052,7 +1052,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1052
1052
|
#
|
1053
1053
|
return self.parse_order(response)
|
1054
1054
|
|
1055
|
-
def cancel_order(self, id: str, symbol:
|
1055
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1056
1056
|
"""
|
1057
1057
|
:see: https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8-%EC%B7%A8%EC%86%8C
|
1058
1058
|
cancels an open order
|
@@ -1087,7 +1087,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1087
1087
|
#
|
1088
1088
|
return self.parse_order(response)
|
1089
1089
|
|
1090
|
-
def fetch_deposits(self, code:
|
1090
|
+
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1091
1091
|
"""
|
1092
1092
|
:see: https://docs.upbit.com/reference/%EC%9E%85%EA%B8%88-%EB%A6%AC%EC%8A%A4%ED%8A%B8-%EC%A1%B0%ED%9A%8C
|
1093
1093
|
fetch all deposits made to an account
|
@@ -1127,7 +1127,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1127
1127
|
#
|
1128
1128
|
return self.parse_transactions(response, currency, since, limit)
|
1129
1129
|
|
1130
|
-
def fetch_withdrawals(self, code:
|
1130
|
+
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1131
1131
|
"""
|
1132
1132
|
:see: https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%B6%9C%EA%B8%88-%EC%A1%B0%ED%9A%8C
|
1133
1133
|
fetch all withdrawals made from an account
|
@@ -1180,7 +1180,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1180
1180
|
}
|
1181
1181
|
return self.safe_string(statuses, status, status)
|
1182
1182
|
|
1183
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1183
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1184
1184
|
#
|
1185
1185
|
# fetchDeposits
|
1186
1186
|
#
|
@@ -1260,7 +1260,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1260
1260
|
}
|
1261
1261
|
return self.safe_string(statuses, status, status)
|
1262
1262
|
|
1263
|
-
def parse_order(self, order, market=None) -> Order:
|
1263
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1264
1264
|
#
|
1265
1265
|
# {
|
1266
1266
|
# "uuid": "a08f09b1-1718-42e2-9358-f0e5e083d3ee",
|
@@ -1381,7 +1381,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1381
1381
|
'trades': trades,
|
1382
1382
|
})
|
1383
1383
|
|
1384
|
-
def fetch_orders_by_state(self, state, symbol:
|
1384
|
+
def fetch_orders_by_state(self, state, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1385
1385
|
self.load_markets()
|
1386
1386
|
request = {
|
1387
1387
|
# 'market': self.market_id(symbol),
|
@@ -1417,7 +1417,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1417
1417
|
#
|
1418
1418
|
return self.parse_orders(response, market, since, limit)
|
1419
1419
|
|
1420
|
-
def fetch_open_orders(self, symbol:
|
1420
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1421
1421
|
"""
|
1422
1422
|
:see: https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8-%EB%A6%AC%EC%8A%A4%ED%8A%B8-%EC%A1%B0%ED%9A%8C
|
1423
1423
|
fetch all unfilled currently open orders
|
@@ -1429,7 +1429,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1429
1429
|
"""
|
1430
1430
|
return self.fetch_orders_by_state('wait', symbol, since, limit, params)
|
1431
1431
|
|
1432
|
-
def fetch_closed_orders(self, symbol:
|
1432
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1433
1433
|
"""
|
1434
1434
|
:see: https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8-%EB%A6%AC%EC%8A%A4%ED%8A%B8-%EC%A1%B0%ED%9A%8C
|
1435
1435
|
fetches information on multiple closed orders made by the user
|
@@ -1441,7 +1441,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1441
1441
|
"""
|
1442
1442
|
return self.fetch_orders_by_state('done', symbol, since, limit, params)
|
1443
1443
|
|
1444
|
-
def fetch_canceled_orders(self, symbol:
|
1444
|
+
def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1445
1445
|
"""
|
1446
1446
|
:see: https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8-%EB%A6%AC%EC%8A%A4%ED%8A%B8-%EC%A1%B0%ED%9A%8C
|
1447
1447
|
fetches information on multiple canceled orders made by the user
|
@@ -1453,7 +1453,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1453
1453
|
"""
|
1454
1454
|
return self.fetch_orders_by_state('cancel', symbol, since, limit, params)
|
1455
1455
|
|
1456
|
-
def fetch_order(self, id: str, symbol:
|
1456
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1457
1457
|
"""
|
1458
1458
|
:see: https://docs.upbit.com/reference/%EA%B0%9C%EB%B3%84-%EC%A3%BC%EB%AC%B8-%EC%A1%B0%ED%9A%8C
|
1459
1459
|
fetches information on an order made by the user
|
@@ -1542,7 +1542,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1542
1542
|
#
|
1543
1543
|
return self.parse_deposit_addresses(response, codes)
|
1544
1544
|
|
1545
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
1545
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1546
1546
|
#
|
1547
1547
|
# {
|
1548
1548
|
# "currency": "BTC",
|
ccxt/wavesexchange.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.wavesexchange import ImplicitAPI
|
8
8
|
import json
|
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 typing import Any
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -744,7 +744,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
744
744
|
return self.options['accessToken']
|
745
745
|
return None
|
746
746
|
|
747
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
747
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
748
748
|
#
|
749
749
|
# {
|
750
750
|
# "symbol": "WAVES/BTC",
|
@@ -981,7 +981,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
981
981
|
result.append(ohlcvs[i])
|
982
982
|
return result
|
983
983
|
|
984
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
984
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
985
985
|
#
|
986
986
|
# {
|
987
987
|
# "__type": "candle",
|
@@ -1387,7 +1387,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1387
1387
|
value = self.safe_value(response, 'message')
|
1388
1388
|
return self.parse_order(value, market)
|
1389
1389
|
|
1390
|
-
def cancel_order(self, id: str, symbol:
|
1390
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1391
1391
|
"""
|
1392
1392
|
cancels an open order
|
1393
1393
|
:param str id: order id
|
@@ -1433,7 +1433,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1433
1433
|
'trades': None,
|
1434
1434
|
}
|
1435
1435
|
|
1436
|
-
def fetch_order(self, id: str, symbol:
|
1436
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1437
1437
|
"""
|
1438
1438
|
fetches information on an order made by the user
|
1439
1439
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -1463,7 +1463,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1463
1463
|
response = self.matcherGetMatcherOrderbookPublicKeyOrderId(self.extend(request, params))
|
1464
1464
|
return self.parse_order(response, market)
|
1465
1465
|
|
1466
|
-
def fetch_orders(self, symbol:
|
1466
|
+
def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1467
1467
|
"""
|
1468
1468
|
fetches information on multiple orders made by the user
|
1469
1469
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1511,7 +1511,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1511
1511
|
# "avgWeighedPrice": 0}, ...]
|
1512
1512
|
return self.parse_orders(response, market, since, limit)
|
1513
1513
|
|
1514
|
-
def fetch_open_orders(self, symbol:
|
1514
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1515
1515
|
"""
|
1516
1516
|
fetch all unfilled currently open orders
|
1517
1517
|
:param str symbol: unified market symbol
|
@@ -1533,7 +1533,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1533
1533
|
response = self.forwardGetMatcherOrdersAddress(request)
|
1534
1534
|
return self.parse_orders(response, market, since, limit)
|
1535
1535
|
|
1536
|
-
def fetch_closed_orders(self, symbol:
|
1536
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1537
1537
|
"""
|
1538
1538
|
fetches information on multiple closed orders made by the user
|
1539
1539
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1590,7 +1590,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1590
1590
|
quoteId = self.safe_string(assetPair, 'priceAsset', 'WAVES')
|
1591
1591
|
return self.safe_currency_code(baseId) + '/' + self.safe_currency_code(quoteId)
|
1592
1592
|
|
1593
|
-
def parse_order(self, order, market=None) -> Order:
|
1593
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1594
1594
|
#
|
1595
1595
|
# createOrder
|
1596
1596
|
#
|
@@ -1863,7 +1863,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1863
1863
|
result['datetime'] = self.iso8601(timestamp)
|
1864
1864
|
return self.safe_balance(result)
|
1865
1865
|
|
1866
|
-
def fetch_my_trades(self, symbol:
|
1866
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1867
1867
|
"""
|
1868
1868
|
fetch all trades made by the user
|
1869
1869
|
:param str symbol: unified market symbol
|
@@ -2041,7 +2041,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2041
2041
|
#
|
2042
2042
|
return self.parse_trades(data, market, since, limit)
|
2043
2043
|
|
2044
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
2044
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
2045
2045
|
#
|
2046
2046
|
# {__type: "transaction",
|
2047
2047
|
# "data":
|
@@ -2410,7 +2410,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2410
2410
|
#
|
2411
2411
|
return self.parse_transaction(result, currency)
|
2412
2412
|
|
2413
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
2413
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2414
2414
|
#
|
2415
2415
|
# withdraw
|
2416
2416
|
#
|