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/tokocrypto.py
CHANGED
@@ -707,7 +707,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
707
707
|
active = False
|
708
708
|
break
|
709
709
|
isMarginTradingAllowed = self.safe_bool(market, 'isMarginTradingAllowed', False)
|
710
|
-
entry = {
|
710
|
+
entry: dict = {
|
711
711
|
'id': id,
|
712
712
|
'lowercaseId': lowercaseId,
|
713
713
|
'symbol': symbol,
|
@@ -804,7 +804,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
804
804
|
"""
|
805
805
|
self.load_markets()
|
806
806
|
market = self.market(symbol)
|
807
|
-
request = {}
|
807
|
+
request: dict = {}
|
808
808
|
if limit is not None:
|
809
809
|
request['limit'] = limit # default 100, max 5000, see https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#order-book
|
810
810
|
response = None
|
@@ -849,7 +849,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
849
849
|
orderbook['nonce'] = self.safe_integer(data, 'lastUpdateId')
|
850
850
|
return orderbook
|
851
851
|
|
852
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
852
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
853
853
|
#
|
854
854
|
# aggregate trades
|
855
855
|
# https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#compressedaggregate-trades-list
|
@@ -1002,7 +1002,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1002
1002
|
"""
|
1003
1003
|
self.load_markets()
|
1004
1004
|
market = self.market(symbol)
|
1005
|
-
request = {
|
1005
|
+
request: dict = {
|
1006
1006
|
'symbol': self.get_market_id_by_type(market),
|
1007
1007
|
# 'fromId': 123, # ID to get aggregate trades from INCLUSIVE.
|
1008
1008
|
# 'startTime': 456, # Timestamp in ms to get aggregate trades from INCLUSIVE.
|
@@ -1198,7 +1198,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1198
1198
|
"""
|
1199
1199
|
self.load_markets()
|
1200
1200
|
market = self.market(symbol)
|
1201
|
-
request = {
|
1201
|
+
request: dict = {
|
1202
1202
|
'symbol': market['baseId'] + market['quoteId'],
|
1203
1203
|
}
|
1204
1204
|
response = self.binanceGetTicker24hr(self.extend(request, params))
|
@@ -1286,7 +1286,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1286
1286
|
until = self.safe_integer(params, 'until')
|
1287
1287
|
params = self.omit(params, ['price', 'until'])
|
1288
1288
|
limit = defaultLimit if (limit is None) else min(limit, maxLimit)
|
1289
|
-
request = {
|
1289
|
+
request: dict = {
|
1290
1290
|
'interval': self.safe_string(self.timeframes, timeframe, timeframe),
|
1291
1291
|
'limit': limit,
|
1292
1292
|
}
|
@@ -1329,7 +1329,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1329
1329
|
type = self.safe_string(params, 'type', defaultType)
|
1330
1330
|
defaultMarginMode = self.safe_string_2(self.options, 'marginMode', 'defaultMarginMode')
|
1331
1331
|
marginMode = self.safe_string_lower(params, 'marginMode', defaultMarginMode)
|
1332
|
-
request = {}
|
1332
|
+
request: dict = {}
|
1333
1333
|
response = self.privateGetOpenV1AccountSpot(self.extend(request, params))
|
1334
1334
|
#
|
1335
1335
|
# spot
|
@@ -1359,7 +1359,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1359
1359
|
|
1360
1360
|
def parse_balance_custom(self, response, type=None, marginMode=None):
|
1361
1361
|
timestamp = self.safe_integer(response, 'updateTime')
|
1362
|
-
result = {
|
1362
|
+
result: dict = {
|
1363
1363
|
'info': response,
|
1364
1364
|
'timestamp': timestamp,
|
1365
1365
|
'datetime': self.iso8601(timestamp),
|
@@ -1376,8 +1376,8 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1376
1376
|
result[code] = account
|
1377
1377
|
return self.safe_balance(result)
|
1378
1378
|
|
1379
|
-
def parse_order_status(self, status):
|
1380
|
-
statuses = {
|
1379
|
+
def parse_order_status(self, status: Str):
|
1380
|
+
statuses: dict = {
|
1381
1381
|
'-2': 'open',
|
1382
1382
|
'0': 'open', # NEW
|
1383
1383
|
'1': 'open', # PARTIALLY_FILLED
|
@@ -1396,7 +1396,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1396
1396
|
}
|
1397
1397
|
return self.safe_string(statuses, status, status)
|
1398
1398
|
|
1399
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1399
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1400
1400
|
#
|
1401
1401
|
# spot
|
1402
1402
|
#
|
@@ -1549,7 +1549,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1549
1549
|
}, market)
|
1550
1550
|
|
1551
1551
|
def parse_order_type(self, status):
|
1552
|
-
statuses = {
|
1552
|
+
statuses: dict = {
|
1553
1553
|
'2': 'market',
|
1554
1554
|
'1': 'limit',
|
1555
1555
|
'4': 'limit',
|
@@ -1595,7 +1595,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1595
1595
|
raise InvalidOrder(self.id + ' stopPrice parameter is not allowed for ' + symbol + ' ' + type + ' orders')
|
1596
1596
|
else:
|
1597
1597
|
raise InvalidOrder(self.id + ' ' + type + ' is not a valid order type for the ' + symbol + ' market')
|
1598
|
-
reverseOrderTypeMapping = {
|
1598
|
+
reverseOrderTypeMapping: dict = {
|
1599
1599
|
'LIMIT': 1,
|
1600
1600
|
'MARKET': 2,
|
1601
1601
|
'STOP_LOSS': 3,
|
@@ -1604,7 +1604,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1604
1604
|
'TAKE_PROFIT_LIMIT': 6,
|
1605
1605
|
'LIMIT_MAKER': 7,
|
1606
1606
|
}
|
1607
|
-
request = {
|
1607
|
+
request: dict = {
|
1608
1608
|
'symbol': market['baseId'] + '_' + market['quoteId'],
|
1609
1609
|
'type': self.safe_string(reverseOrderTypeMapping, uppercaseType),
|
1610
1610
|
}
|
@@ -1723,7 +1723,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1723
1723
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1724
1724
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1725
1725
|
"""
|
1726
|
-
request = {
|
1726
|
+
request: dict = {
|
1727
1727
|
'orderId': id,
|
1728
1728
|
}
|
1729
1729
|
response = self.privateGetOpenV1Orders(self.extend(request, params))
|
@@ -1776,7 +1776,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1776
1776
|
raise ArgumentsRequired(self.id + ' fetchOrders() requires a symbol argument')
|
1777
1777
|
self.load_markets()
|
1778
1778
|
market = self.market(symbol)
|
1779
|
-
request = {
|
1779
|
+
request: dict = {
|
1780
1780
|
'symbol': market['id'],
|
1781
1781
|
# 'type': -1, # -1 = all, 1 = open, 2 = closed
|
1782
1782
|
# 'side': 1, # or 2
|
@@ -1838,7 +1838,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1838
1838
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1839
1839
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1840
1840
|
"""
|
1841
|
-
request = {'type': 1} # -1 = all, 1 = open, 2 = closed
|
1841
|
+
request: dict = {'type': 1} # -1 = all, 1 = open, 2 = closed
|
1842
1842
|
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1843
1843
|
|
1844
1844
|
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
@@ -1851,7 +1851,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1851
1851
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1852
1852
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1853
1853
|
"""
|
1854
|
-
request = {'type': 2} # -1 = all, 1 = open, 2 = closed
|
1854
|
+
request: dict = {'type': 2} # -1 = all, 1 = open, 2 = closed
|
1855
1855
|
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1856
1856
|
|
1857
1857
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
@@ -1863,7 +1863,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1863
1863
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1864
1864
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1865
1865
|
"""
|
1866
|
-
request = {
|
1866
|
+
request: dict = {
|
1867
1867
|
'orderId': id,
|
1868
1868
|
}
|
1869
1869
|
response = self.privatePostOpenV1OrdersCancel(self.extend(request, params))
|
@@ -1911,7 +1911,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1911
1911
|
raise ArgumentsRequired(self.id + ' fetchMyTrades() requires a symbol argument')
|
1912
1912
|
self.load_markets()
|
1913
1913
|
market = self.market(symbol)
|
1914
|
-
request = {
|
1914
|
+
request: dict = {
|
1915
1915
|
'symbol': market['id'],
|
1916
1916
|
}
|
1917
1917
|
endTime = self.safe_integer_2(params, 'until', 'endTime')
|
@@ -1962,7 +1962,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1962
1962
|
"""
|
1963
1963
|
self.load_markets()
|
1964
1964
|
currency = self.currency(code)
|
1965
|
-
request = {
|
1965
|
+
request: dict = {
|
1966
1966
|
'asset': currency['id'],
|
1967
1967
|
# 'network': 'ETH', # 'BSC', 'XMR', you can get network and isDefault in networkList in the response of sapiGetCapitalConfigDetail
|
1968
1968
|
}
|
@@ -2017,7 +2017,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2017
2017
|
"""
|
2018
2018
|
self.load_markets()
|
2019
2019
|
currency = None
|
2020
|
-
request = {}
|
2020
|
+
request: dict = {}
|
2021
2021
|
until = self.safe_integer(params, 'until')
|
2022
2022
|
if code is not None:
|
2023
2023
|
currency = self.currency(code)
|
@@ -2070,7 +2070,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2070
2070
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2071
2071
|
"""
|
2072
2072
|
self.load_markets()
|
2073
|
-
request = {}
|
2073
|
+
request: dict = {}
|
2074
2074
|
currency = None
|
2075
2075
|
if code is not None:
|
2076
2076
|
currency = self.currency(code)
|
@@ -2112,7 +2112,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2112
2112
|
return self.parse_transactions(withdrawals, currency, since, limit)
|
2113
2113
|
|
2114
2114
|
def parse_transaction_status_by_type(self, status, type=None):
|
2115
|
-
statusesByType = {
|
2115
|
+
statusesByType: dict = {
|
2116
2116
|
'deposit': {
|
2117
2117
|
'0': 'pending',
|
2118
2118
|
'1': 'ok',
|
@@ -2130,7 +2130,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2130
2130
|
statuses = self.safe_value(statusesByType, type, {})
|
2131
2131
|
return self.safe_string(statuses, status, status)
|
2132
2132
|
|
2133
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2133
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2134
2134
|
#
|
2135
2135
|
# fetchDeposits
|
2136
2136
|
#
|
@@ -2252,7 +2252,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
2252
2252
|
self.load_markets()
|
2253
2253
|
self.check_address(address)
|
2254
2254
|
currency = self.currency(code)
|
2255
|
-
request = {
|
2255
|
+
request: dict = {
|
2256
2256
|
'asset': currency['id'],
|
2257
2257
|
# 'clientId': 'string', # # client's custom id for withdraw order, server does not check it's uniqueness, automatically generated if not sent
|
2258
2258
|
# 'network': 'string',
|
ccxt/tradeogre.py
CHANGED
@@ -262,7 +262,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
262
262
|
"""
|
263
263
|
self.load_markets()
|
264
264
|
market = self.market(symbol)
|
265
|
-
request = {
|
265
|
+
request: dict = {
|
266
266
|
'market': market['id'],
|
267
267
|
}
|
268
268
|
response = self.publicGetTickerMarket(self.extend(request, params))
|
@@ -326,7 +326,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
326
326
|
"""
|
327
327
|
self.load_markets()
|
328
328
|
market = self.market(symbol)
|
329
|
-
request = {
|
329
|
+
request: dict = {
|
330
330
|
'market': market['id'],
|
331
331
|
}
|
332
332
|
response = self.publicGetOrdersMarket(self.extend(request, params))
|
@@ -342,7 +342,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
342
342
|
#
|
343
343
|
rawBids = self.safe_dict(response, 'buy', {})
|
344
344
|
rawAsks = self.safe_dict(response, 'sell', {})
|
345
|
-
rawOrderbook = {
|
345
|
+
rawOrderbook: dict = {
|
346
346
|
'bids': rawBids,
|
347
347
|
'asks': rawAsks,
|
348
348
|
}
|
@@ -371,13 +371,13 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
371
371
|
"""
|
372
372
|
self.load_markets()
|
373
373
|
market = self.market(symbol)
|
374
|
-
request = {
|
374
|
+
request: dict = {
|
375
375
|
'market': market['id'],
|
376
376
|
}
|
377
377
|
response = self.publicGetHistoryMarket(self.extend(request, params))
|
378
378
|
return self.parse_trades(response, market, since, limit)
|
379
379
|
|
380
|
-
def parse_trade(self, trade, market: Market = None):
|
380
|
+
def parse_trade(self, trade: dict, market: Market = None):
|
381
381
|
#
|
382
382
|
# {
|
383
383
|
# "date":1515128233,
|
@@ -423,7 +423,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
423
423
|
# "USDT": "12"
|
424
424
|
# }
|
425
425
|
#
|
426
|
-
result = {
|
426
|
+
result: dict = {
|
427
427
|
'info': response,
|
428
428
|
}
|
429
429
|
keys = list(response.keys())
|
@@ -431,7 +431,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
431
431
|
currencyId = keys[i]
|
432
432
|
balance = response[currencyId]
|
433
433
|
code = self.safe_currency_code(currencyId)
|
434
|
-
account = {
|
434
|
+
account: dict = {
|
435
435
|
'total': balance,
|
436
436
|
}
|
437
437
|
result[code] = account
|
@@ -450,7 +450,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
450
450
|
"""
|
451
451
|
self.load_markets()
|
452
452
|
market = self.market(symbol)
|
453
|
-
request = {
|
453
|
+
request: dict = {
|
454
454
|
'market': market['id'],
|
455
455
|
'quantity': self.parse_to_numeric(self.amount_to_precision(symbol, amount)),
|
456
456
|
'price': self.parse_to_numeric(self.price_to_precision(symbol, price)),
|
@@ -473,7 +473,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
473
473
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
474
474
|
"""
|
475
475
|
self.load_markets()
|
476
|
-
request = {
|
476
|
+
request: dict = {
|
477
477
|
'uuid': id,
|
478
478
|
}
|
479
479
|
response = self.privatePostOrderCancel(self.extend(request, params))
|
@@ -502,7 +502,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
502
502
|
market = None
|
503
503
|
if symbol is not None:
|
504
504
|
market = self.market(symbol)
|
505
|
-
request = {}
|
505
|
+
request: dict = {}
|
506
506
|
if symbol is not None:
|
507
507
|
request['market'] = market['id']
|
508
508
|
response = self.privatePostAccountOrders(self.extend(request, params))
|
@@ -517,13 +517,13 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
517
517
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
518
518
|
"""
|
519
519
|
self.load_markets()
|
520
|
-
request = {
|
520
|
+
request: dict = {
|
521
521
|
'uuid': id,
|
522
522
|
}
|
523
523
|
response = self.privateGetAccountOrderUuid(self.extend(request, params))
|
524
524
|
return self.parse_order(response, None)
|
525
525
|
|
526
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
526
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
527
527
|
#
|
528
528
|
#
|
529
529
|
# {
|
ccxt/upbit.py
CHANGED
@@ -210,7 +210,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
210
210
|
def fetch_currency_by_id(self, id: str, params={}):
|
211
211
|
# self method is for retrieving funding fees and limits per currency
|
212
212
|
# it requires private access and API keys properly set up
|
213
|
-
request = {
|
213
|
+
request: dict = {
|
214
214
|
'currency': id,
|
215
215
|
}
|
216
216
|
response = self.privateGetWithdrawsChance(self.extend(request, params))
|
@@ -304,7 +304,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
304
304
|
def fetch_market_by_id(self, id: str, params={}):
|
305
305
|
# self method is for retrieving trading fees and limits per market
|
306
306
|
# it requires private access and API keys properly set up
|
307
|
-
request = {
|
307
|
+
request: dict = {
|
308
308
|
'market': id,
|
309
309
|
}
|
310
310
|
response = self.privateGetOrdersChance(self.extend(request, params))
|
@@ -481,7 +481,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
481
481
|
})
|
482
482
|
|
483
483
|
def parse_balance(self, response) -> Balances:
|
484
|
-
result = {
|
484
|
+
result: dict = {
|
485
485
|
'info': response,
|
486
486
|
'timestamp': None,
|
487
487
|
'datetime': None,
|
@@ -539,7 +539,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
539
539
|
else:
|
540
540
|
ids = self.market_ids(symbols)
|
541
541
|
ids = ','.join(ids)
|
542
|
-
request = {
|
542
|
+
request: dict = {
|
543
543
|
'markets': ids,
|
544
544
|
}
|
545
545
|
response = self.publicGetOrderbook(self.extend(request, params))
|
@@ -571,7 +571,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
571
571
|
# "ask_size": 2.752,
|
572
572
|
# "bid_size": 0.4650305} ]} ]
|
573
573
|
#
|
574
|
-
result = {}
|
574
|
+
result: dict = {}
|
575
575
|
for i in range(0, len(response)):
|
576
576
|
orderbook = response[i]
|
577
577
|
marketId = self.safe_string(orderbook, 'market')
|
@@ -675,7 +675,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
675
675
|
else:
|
676
676
|
ids = self.market_ids(symbols)
|
677
677
|
ids = ','.join(ids)
|
678
|
-
request = {
|
678
|
+
request: dict = {
|
679
679
|
'markets': ids,
|
680
680
|
}
|
681
681
|
response = self.publicGetTicker(self.extend(request, params))
|
@@ -707,7 +707,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
707
707
|
# "lowest_52_week_date": "2017-12-08",
|
708
708
|
# "timestamp": 1542883543813 }]
|
709
709
|
#
|
710
|
-
result = {}
|
710
|
+
result: dict = {}
|
711
711
|
for t in range(0, len(response)):
|
712
712
|
ticker = self.parse_ticker(response[t])
|
713
713
|
symbol = ticker['symbol']
|
@@ -725,7 +725,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
725
725
|
tickers = self.fetch_tickers([symbol], params)
|
726
726
|
return self.safe_value(tickers, symbol)
|
727
727
|
|
728
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
728
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
729
729
|
#
|
730
730
|
# fetchTrades
|
731
731
|
#
|
@@ -807,7 +807,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
807
807
|
market = self.market(symbol)
|
808
808
|
if limit is None:
|
809
809
|
limit = 200
|
810
|
-
request = {
|
810
|
+
request: dict = {
|
811
811
|
'market': market['id'],
|
812
812
|
'count': limit,
|
813
813
|
}
|
@@ -846,7 +846,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
846
846
|
"""
|
847
847
|
self.load_markets()
|
848
848
|
market = self.market(symbol)
|
849
|
-
request = {
|
849
|
+
request: dict = {
|
850
850
|
'market': market['id'],
|
851
851
|
}
|
852
852
|
response = self.privateGetOrdersChance(self.extend(request, params))
|
@@ -941,7 +941,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
941
941
|
timeframeValue = self.safe_string(self.timeframes, timeframe, timeframe)
|
942
942
|
if limit is None:
|
943
943
|
limit = 200
|
944
|
-
request = {
|
944
|
+
request: dict = {
|
945
945
|
'market': market['id'],
|
946
946
|
'timeframe': timeframeValue,
|
947
947
|
'count': limit,
|
@@ -1012,7 +1012,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1012
1012
|
orderSide = 'ask'
|
1013
1013
|
else:
|
1014
1014
|
raise InvalidOrder(self.id + ' createOrder() allows buy or sell side only!')
|
1015
|
-
request = {
|
1015
|
+
request: dict = {
|
1016
1016
|
'market': market['id'],
|
1017
1017
|
'side': orderSide,
|
1018
1018
|
}
|
@@ -1084,7 +1084,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1084
1084
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1085
1085
|
"""
|
1086
1086
|
self.load_markets()
|
1087
|
-
request = {
|
1087
|
+
request: dict = {
|
1088
1088
|
'uuid': id,
|
1089
1089
|
}
|
1090
1090
|
response = self.privateDeleteOrder(self.extend(request, params))
|
@@ -1120,7 +1120,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1120
1120
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1121
1121
|
"""
|
1122
1122
|
self.load_markets()
|
1123
|
-
request = {
|
1123
|
+
request: dict = {
|
1124
1124
|
# 'page': 1,
|
1125
1125
|
# 'order_by': 'asc', # 'desc'
|
1126
1126
|
}
|
@@ -1160,7 +1160,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1160
1160
|
:returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1161
1161
|
"""
|
1162
1162
|
self.load_markets()
|
1163
|
-
request = {
|
1163
|
+
request: dict = {
|
1164
1164
|
'uuid': id,
|
1165
1165
|
}
|
1166
1166
|
currency = None
|
@@ -1196,7 +1196,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1196
1196
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1197
1197
|
"""
|
1198
1198
|
self.load_markets()
|
1199
|
-
request = {
|
1199
|
+
request: dict = {
|
1200
1200
|
# 'state': 'submitting', # 'submitted', 'almost_accepted', 'rejected', 'accepted', 'processing', 'done', 'canceled'
|
1201
1201
|
}
|
1202
1202
|
currency = None
|
@@ -1236,7 +1236,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1236
1236
|
:returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
1237
1237
|
"""
|
1238
1238
|
self.load_markets()
|
1239
|
-
request = {
|
1239
|
+
request: dict = {
|
1240
1240
|
'uuid': id,
|
1241
1241
|
}
|
1242
1242
|
currency = None
|
@@ -1262,7 +1262,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1262
1262
|
return self.parse_transaction(response, currency)
|
1263
1263
|
|
1264
1264
|
def parse_transaction_status(self, status):
|
1265
|
-
statuses = {
|
1265
|
+
statuses: dict = {
|
1266
1266
|
'submitting': 'pending', # 처리 중
|
1267
1267
|
'submitted': 'pending', # 처리 완료
|
1268
1268
|
'almost_accepted': 'pending', # 출금대기중
|
@@ -1274,7 +1274,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1274
1274
|
}
|
1275
1275
|
return self.safe_string(statuses, status, status)
|
1276
1276
|
|
1277
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1277
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1278
1278
|
#
|
1279
1279
|
# fetchDeposits, fetchDeposit
|
1280
1280
|
#
|
@@ -1340,15 +1340,15 @@ class upbit(Exchange, ImplicitAPI):
|
|
1340
1340
|
},
|
1341
1341
|
}
|
1342
1342
|
|
1343
|
-
def parse_order_status(self, status):
|
1344
|
-
statuses = {
|
1343
|
+
def parse_order_status(self, status: Str):
|
1344
|
+
statuses: dict = {
|
1345
1345
|
'wait': 'open',
|
1346
1346
|
'done': 'closed',
|
1347
1347
|
'cancel': 'canceled',
|
1348
1348
|
}
|
1349
1349
|
return self.safe_string(statuses, status, status)
|
1350
1350
|
|
1351
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1351
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1352
1352
|
#
|
1353
1353
|
# {
|
1354
1354
|
# "uuid": "a08f09b1-1718-42e2-9358-f0e5e083d3ee",
|
@@ -1471,7 +1471,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1471
1471
|
|
1472
1472
|
def fetch_orders_by_state(self, state, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1473
1473
|
self.load_markets()
|
1474
|
-
request = {
|
1474
|
+
request: dict = {
|
1475
1475
|
# 'market': self.market_id(symbol),
|
1476
1476
|
'state': state,
|
1477
1477
|
# 'page': 1,
|
@@ -1550,7 +1550,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1550
1550
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1551
1551
|
"""
|
1552
1552
|
self.load_markets()
|
1553
|
-
request = {
|
1553
|
+
request: dict = {
|
1554
1554
|
'uuid': id,
|
1555
1555
|
}
|
1556
1556
|
response = self.privateGetOrder(self.extend(request, params))
|
@@ -1599,7 +1599,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1599
1599
|
#
|
1600
1600
|
return self.parse_order(response)
|
1601
1601
|
|
1602
|
-
def fetch_deposit_addresses(self, codes:
|
1602
|
+
def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1603
1603
|
"""
|
1604
1604
|
:see: https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%A1%B0%ED%9A%8C
|
1605
1605
|
fetch deposit addresses for multiple currencies and chain types
|
@@ -1692,7 +1692,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1692
1692
|
"""
|
1693
1693
|
self.load_markets()
|
1694
1694
|
currency = self.currency(code)
|
1695
|
-
request = {
|
1695
|
+
request: dict = {
|
1696
1696
|
'currency': currency['id'],
|
1697
1697
|
}
|
1698
1698
|
# https://github.com/ccxt/ccxt/issues/6452
|
@@ -1732,7 +1732,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1732
1732
|
tag, params = self.handle_withdraw_tag_and_params(tag, params)
|
1733
1733
|
self.load_markets()
|
1734
1734
|
currency = self.currency(code)
|
1735
|
-
request = {
|
1735
|
+
request: dict = {
|
1736
1736
|
'amount': amount,
|
1737
1737
|
}
|
1738
1738
|
response = None
|
@@ -1783,7 +1783,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1783
1783
|
if api == 'private':
|
1784
1784
|
self.check_required_credentials()
|
1785
1785
|
nonce = self.uuid()
|
1786
|
-
request = {
|
1786
|
+
request: dict = {
|
1787
1787
|
'access_key': self.apiKey,
|
1788
1788
|
'nonce': nonce,
|
1789
1789
|
}
|