ccxt 4.3.30__py2.py3-none-any.whl → 4.3.32__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/bigone.py +32 -32
- ccxt/async_support/binance.py +105 -96
- ccxt/async_support/bingx.py +21 -21
- 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 +208 -175
- 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 +37 -37
- 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 +48 -36
- ccxt/base/types.py +13 -0
- ccxt/bigone.py +32 -32
- ccxt/binance.py +105 -96
- ccxt/bingx.py +21 -21
- 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 +208 -175
- 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 +20 -20
- ccxt/pro/coinbase.py +32 -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/test/test_async.py +1 -1
- ccxt/test/test_sync.py +1 -1
- 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 +37 -37
- 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.30.dist-info → ccxt-4.3.32.dist-info}/METADATA +4 -4
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/RECORD +260 -260
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/WHEEL +0 -0
- {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/top_level.txt +0 -0
ccxt/async_support/tradeogre.py
CHANGED
@@ -262,7 +262,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
262
262
|
"""
|
263
263
|
await self.load_markets()
|
264
264
|
market = self.market(symbol)
|
265
|
-
request = {
|
265
|
+
request: dict = {
|
266
266
|
'market': market['id'],
|
267
267
|
}
|
268
268
|
response = await self.publicGetTickerMarket(self.extend(request, params))
|
@@ -326,7 +326,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
326
326
|
"""
|
327
327
|
await self.load_markets()
|
328
328
|
market = self.market(symbol)
|
329
|
-
request = {
|
329
|
+
request: dict = {
|
330
330
|
'market': market['id'],
|
331
331
|
}
|
332
332
|
response = await 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
|
await self.load_markets()
|
373
373
|
market = self.market(symbol)
|
374
|
-
request = {
|
374
|
+
request: dict = {
|
375
375
|
'market': market['id'],
|
376
376
|
}
|
377
377
|
response = await 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
|
await 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
|
await self.load_markets()
|
476
|
-
request = {
|
476
|
+
request: dict = {
|
477
477
|
'uuid': id,
|
478
478
|
}
|
479
479
|
response = await 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 = await 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
|
await self.load_markets()
|
520
|
-
request = {
|
520
|
+
request: dict = {
|
521
521
|
'uuid': id,
|
522
522
|
}
|
523
523
|
response = await 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/async_support/upbit.py
CHANGED
@@ -210,7 +210,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
210
210
|
async 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 = await self.privateGetWithdrawsChance(self.extend(request, params))
|
@@ -304,7 +304,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
304
304
|
async 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 = await 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 = await 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 = await 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 = await 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
|
await self.load_markets()
|
848
848
|
market = self.market(symbol)
|
849
|
-
request = {
|
849
|
+
request: dict = {
|
850
850
|
'market': market['id'],
|
851
851
|
}
|
852
852
|
response = await 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
|
await self.load_markets()
|
1087
|
-
request = {
|
1087
|
+
request: dict = {
|
1088
1088
|
'uuid': id,
|
1089
1089
|
}
|
1090
1090
|
response = await 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
|
await 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
|
await 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
|
await 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
|
await 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
|
async def fetch_orders_by_state(self, state, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1473
1473
|
await 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
|
await self.load_markets()
|
1553
|
-
request = {
|
1553
|
+
request: dict = {
|
1554
1554
|
'uuid': id,
|
1555
1555
|
}
|
1556
1556
|
response = await 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
|
-
async def fetch_deposit_addresses(self, codes:
|
1602
|
+
async 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
|
await 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
|
await 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
|
}
|
@@ -736,7 +736,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
736
736
|
payload = prefix + messageHex
|
737
737
|
hexKey = self.binary_to_base16(self.base58_to_binary(self.secret))
|
738
738
|
signature = self.axolotl(payload, hexKey, 'ed25519')
|
739
|
-
request = {
|
739
|
+
request: dict = {
|
740
740
|
'grant_type': 'password',
|
741
741
|
'scope': 'general',
|
742
742
|
'username': self.apiKey,
|
@@ -836,7 +836,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
836
836
|
"""
|
837
837
|
await self.load_markets()
|
838
838
|
market = self.market(symbol)
|
839
|
-
request = {
|
839
|
+
request: dict = {
|
840
840
|
'pairs': market['id'],
|
841
841
|
}
|
842
842
|
response = await self.publicGetPairs(self.extend(request, params))
|
@@ -919,7 +919,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
919
919
|
"""
|
920
920
|
await self.load_markets()
|
921
921
|
market = self.market(symbol)
|
922
|
-
request = {
|
922
|
+
request: dict = {
|
923
923
|
'baseId': market['baseId'],
|
924
924
|
'quoteId': market['quoteId'],
|
925
925
|
'interval': self.safe_string(self.timeframes, timeframe, timeframe),
|
@@ -1064,8 +1064,8 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1064
1064
|
# ]
|
1065
1065
|
# }
|
1066
1066
|
#
|
1067
|
-
currencies = {}
|
1068
|
-
networksByCurrency = {}
|
1067
|
+
currencies: dict = {}
|
1068
|
+
networksByCurrency: dict = {}
|
1069
1069
|
items = self.safe_value(supportedCurrencies, 'items', [])
|
1070
1070
|
for i in range(0, len(items)):
|
1071
1071
|
entry = items[i]
|
@@ -1082,7 +1082,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1082
1082
|
raise ExchangeError(self.id + ' fetchDepositAddress() ' + code + ' not supported. Currency code must be one of ' + ', '.join(codes))
|
1083
1083
|
response = None
|
1084
1084
|
if network is None:
|
1085
|
-
request = {
|
1085
|
+
request: dict = {
|
1086
1086
|
'currency': code,
|
1087
1087
|
}
|
1088
1088
|
response = await self.privateGetDepositAddressesCurrency(self.extend(request, params))
|
@@ -1092,7 +1092,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1092
1092
|
supportedNetworkKeys = list(supportedNetworks.keys())
|
1093
1093
|
raise ExchangeError(self.id + ' ' + network + ' network ' + code + ' deposit address not supported. Network must be one of ' + ', '.join(supportedNetworkKeys))
|
1094
1094
|
if network == 'WAVES':
|
1095
|
-
request = {
|
1095
|
+
request: dict = {
|
1096
1096
|
'publicKey': self.apiKey,
|
1097
1097
|
}
|
1098
1098
|
responseInner = await self.nodeGetAddressesPublicKeyPublicKey(self.extend(request, request))
|
@@ -1106,7 +1106,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1106
1106
|
'info': responseInner,
|
1107
1107
|
}
|
1108
1108
|
else:
|
1109
|
-
request = {
|
1109
|
+
request: dict = {
|
1110
1110
|
'currency': code,
|
1111
1111
|
'platform': network,
|
1112
1112
|
}
|
@@ -1308,13 +1308,13 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1308
1308
|
raise InsufficientFunds(self.id + ' not enough funds on none of the eligible asset fees')
|
1309
1309
|
amount = self.custom_amount_to_precision(symbol, amount)
|
1310
1310
|
price = self.custom_price_to_precision(symbol, price)
|
1311
|
-
assetPair = {
|
1311
|
+
assetPair: dict = {
|
1312
1312
|
'amountAsset': amountAsset,
|
1313
1313
|
'priceAsset': priceAsset,
|
1314
1314
|
}
|
1315
1315
|
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
1316
1316
|
chainId = 84 if (sandboxMode) else 87
|
1317
|
-
body = {
|
1317
|
+
body: dict = {
|
1318
1318
|
'senderPublicKey': self.apiKey,
|
1319
1319
|
'matcherPublicKey': matcherPublicKey,
|
1320
1320
|
'assetPair': assetPair,
|
@@ -1340,7 +1340,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1340
1340
|
# },
|
1341
1341
|
# }
|
1342
1342
|
#
|
1343
|
-
attachment = {
|
1343
|
+
attachment: dict = {
|
1344
1344
|
'v': 1,
|
1345
1345
|
'c': {
|
1346
1346
|
't': 'sp',
|
@@ -1464,7 +1464,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1464
1464
|
binary = self.binary_concat_array(byteArray)
|
1465
1465
|
hexSecret = self.binary_to_base16(self.base58_to_binary(self.secret))
|
1466
1466
|
signature = self.axolotl(self.binary_to_base16(binary), hexSecret, 'ed25519')
|
1467
|
-
request = {
|
1467
|
+
request: dict = {
|
1468
1468
|
'Timestamp': str(timestamp),
|
1469
1469
|
'Signature': signature,
|
1470
1470
|
'publicKey': self.apiKey,
|
@@ -1496,7 +1496,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1496
1496
|
binary = self.binary_concat_array(byteArray)
|
1497
1497
|
hexSecret = self.binary_to_base16(self.base58_to_binary(self.secret))
|
1498
1498
|
signature = self.axolotl(self.binary_to_base16(binary), hexSecret, 'ed25519')
|
1499
|
-
request = {
|
1499
|
+
request: dict = {
|
1500
1500
|
'Accept': 'application/json',
|
1501
1501
|
'Timestamp': str(timestamp),
|
1502
1502
|
'Signature': signature,
|
@@ -1537,7 +1537,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1537
1537
|
if symbol is not None:
|
1538
1538
|
market = self.market(symbol)
|
1539
1539
|
address = await self.get_waves_address()
|
1540
|
-
request = {
|
1540
|
+
request: dict = {
|
1541
1541
|
'address': address,
|
1542
1542
|
'activeOnly': True,
|
1543
1543
|
}
|
@@ -1559,7 +1559,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1559
1559
|
if symbol is not None:
|
1560
1560
|
market = self.market(symbol)
|
1561
1561
|
address = await self.get_waves_address()
|
1562
|
-
request = {
|
1562
|
+
request: dict = {
|
1563
1563
|
'address': address,
|
1564
1564
|
'closedOnly': True,
|
1565
1565
|
}
|
@@ -1586,8 +1586,8 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1586
1586
|
# ]
|
1587
1587
|
return self.parse_orders(response, market, since, limit)
|
1588
1588
|
|
1589
|
-
def parse_order_status(self, status):
|
1590
|
-
statuses = {
|
1589
|
+
def parse_order_status(self, status: Str):
|
1590
|
+
statuses: dict = {
|
1591
1591
|
'Cancelled': 'canceled',
|
1592
1592
|
'Accepted': 'open',
|
1593
1593
|
'Filled': 'closed',
|
@@ -1601,7 +1601,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1601
1601
|
quoteId = self.safe_string(assetPair, 'priceAsset', 'WAVES')
|
1602
1602
|
return self.safe_currency_code(baseId) + '/' + self.safe_currency_code(quoteId)
|
1603
1603
|
|
1604
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1604
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1605
1605
|
#
|
1606
1606
|
# createOrder
|
1607
1607
|
#
|
@@ -1727,7 +1727,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1727
1727
|
async def get_waves_address(self):
|
1728
1728
|
cachedAddreess = self.safe_string(self.options, 'wavesAddress')
|
1729
1729
|
if cachedAddreess is None:
|
1730
|
-
request = {
|
1730
|
+
request: dict = {
|
1731
1731
|
'publicKey': self.apiKey,
|
1732
1732
|
}
|
1733
1733
|
response = await self.nodeGetAddressesPublicKeyPublicKey(request)
|
@@ -1752,7 +1752,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1752
1752
|
self.check_required_keys()
|
1753
1753
|
await self.load_markets()
|
1754
1754
|
wavesAddress = await self.get_waves_address()
|
1755
|
-
request = {
|
1755
|
+
request: dict = {
|
1756
1756
|
'address': wavesAddress,
|
1757
1757
|
}
|
1758
1758
|
totalBalance = await self.nodeGetAssetsBalanceAddress(request)
|
@@ -1791,7 +1791,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1791
1791
|
# ]
|
1792
1792
|
# }
|
1793
1793
|
balances = self.safe_value(totalBalance, 'balances', [])
|
1794
|
-
result = {}
|
1794
|
+
result: dict = {}
|
1795
1795
|
timestamp = None
|
1796
1796
|
assetIds = []
|
1797
1797
|
nonStandardBalances = []
|
@@ -1814,7 +1814,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1814
1814
|
result[code]['total'] = self.from_precision(balance, decimals)
|
1815
1815
|
nonStandardAssets = len(assetIds)
|
1816
1816
|
if nonStandardAssets:
|
1817
|
-
requestInner = {
|
1817
|
+
requestInner: dict = {
|
1818
1818
|
'ids': assetIds,
|
1819
1819
|
}
|
1820
1820
|
response = await self.publicGetAssets(requestInner)
|
@@ -1836,7 +1836,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1836
1836
|
binary = self.binary_concat_array(byteArray)
|
1837
1837
|
hexSecret = self.binary_to_base16(self.base58_to_binary(self.secret))
|
1838
1838
|
signature = self.axolotl(self.binary_to_base16(binary), hexSecret, 'ed25519')
|
1839
|
-
matcherRequest = {
|
1839
|
+
matcherRequest: dict = {
|
1840
1840
|
'publicKey': self.apiKey,
|
1841
1841
|
'signature': signature,
|
1842
1842
|
'timestamp': str(currentTimestamp),
|
@@ -1854,7 +1854,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1854
1854
|
result[code]['used'] = self.currency_from_precision(code, amount)
|
1855
1855
|
else:
|
1856
1856
|
result[code]['used'] = amount
|
1857
|
-
wavesRequest = {
|
1857
|
+
wavesRequest: dict = {
|
1858
1858
|
'address': wavesAddress,
|
1859
1859
|
}
|
1860
1860
|
wavesTotal = await self.nodeGetAddressesBalanceAddress(wavesRequest)
|
@@ -1885,7 +1885,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1885
1885
|
"""
|
1886
1886
|
await self.load_markets()
|
1887
1887
|
address = await self.get_waves_address()
|
1888
|
-
request = {
|
1888
|
+
request: dict = {
|
1889
1889
|
'sender': address,
|
1890
1890
|
}
|
1891
1891
|
market = None
|
@@ -1974,7 +1974,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
1974
1974
|
"""
|
1975
1975
|
await self.load_markets()
|
1976
1976
|
market = self.market(symbol)
|
1977
|
-
request = {
|
1977
|
+
request: dict = {
|
1978
1978
|
'amountAsset': market['baseId'],
|
1979
1979
|
'priceAsset': market['quoteId'],
|
1980
1980
|
}
|
@@ -2052,7 +2052,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2052
2052
|
#
|
2053
2053
|
return self.parse_trades(data, market, since, limit)
|
2054
2054
|
|
2055
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
2055
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
2056
2056
|
#
|
2057
2057
|
# {__type: "transaction",
|
2058
2058
|
# "data":
|
@@ -2142,7 +2142,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2142
2142
|
}, market)
|
2143
2143
|
|
2144
2144
|
def parse_deposit_withdraw_fees(self, response, codes: Strings = None, currencyIdKey=None) -> Any:
|
2145
|
-
depositWithdrawFees = {}
|
2145
|
+
depositWithdrawFees: dict = {}
|
2146
2146
|
codes = self.market_codes(codes)
|
2147
2147
|
for i in range(0, len(response)):
|
2148
2148
|
entry = response[i]
|
@@ -2308,7 +2308,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2308
2308
|
# currently only works for BTC and WAVES
|
2309
2309
|
if code != 'WAVES':
|
2310
2310
|
supportedCurrencies = await self.privateGetWithdrawCurrencies()
|
2311
|
-
currencies = {}
|
2311
|
+
currencies: dict = {}
|
2312
2312
|
items = self.safe_value(supportedCurrencies, 'items', [])
|
2313
2313
|
for i in range(0, len(items)):
|
2314
2314
|
entry = items[i]
|
@@ -2319,7 +2319,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2319
2319
|
raise ExchangeError(self.id + ' withdraw() ' + code + ' not supported. Currency code must be one of ' + str(codes))
|
2320
2320
|
await self.load_markets()
|
2321
2321
|
hexChars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']
|
2322
|
-
set = {}
|
2322
|
+
set: dict = {}
|
2323
2323
|
for i in range(0, len(hexChars)):
|
2324
2324
|
key = hexChars[i]
|
2325
2325
|
set[key] = True
|
@@ -2337,7 +2337,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2337
2337
|
if code == 'WAVES' and not isErc20:
|
2338
2338
|
proxyAddress = address
|
2339
2339
|
else:
|
2340
|
-
withdrawAddressRequest = {
|
2340
|
+
withdrawAddressRequest: dict = {
|
2341
2341
|
'address': address,
|
2342
2342
|
'currency': code,
|
2343
2343
|
}
|
@@ -2392,7 +2392,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2392
2392
|
binary = self.binary_concat_array(byteArray)
|
2393
2393
|
hexSecret = self.binary_to_base16(self.base58_to_binary(self.secret))
|
2394
2394
|
signature = self.axolotl(self.binary_to_base16(binary), hexSecret, 'ed25519')
|
2395
|
-
request = {
|
2395
|
+
request: dict = {
|
2396
2396
|
'senderPublicKey': self.apiKey,
|
2397
2397
|
'amount': amountInteger,
|
2398
2398
|
'fee': fee,
|
@@ -2421,7 +2421,7 @@ class wavesexchange(Exchange, ImplicitAPI):
|
|
2421
2421
|
#
|
2422
2422
|
return self.parse_transaction(result, currency)
|
2423
2423
|
|
2424
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2424
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2425
2425
|
#
|
2426
2426
|
# withdraw
|
2427
2427
|
#
|