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/coinone.py
CHANGED
@@ -236,7 +236,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
236
236
|
# ]
|
237
237
|
# }
|
238
238
|
#
|
239
|
-
result = {}
|
239
|
+
result: dict = {}
|
240
240
|
currencies = self.safe_value(response, 'currencies', [])
|
241
241
|
for i in range(0, len(currencies)):
|
242
242
|
entry = currencies[i]
|
@@ -278,7 +278,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
278
278
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
279
279
|
:returns dict[]: an array of objects representing market data
|
280
280
|
"""
|
281
|
-
request = {
|
281
|
+
request: dict = {
|
282
282
|
'quote_currency': 'KRW',
|
283
283
|
}
|
284
284
|
response = await self.v2PublicGetTickerNewQuoteCurrency(request)
|
@@ -377,7 +377,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
377
377
|
return result
|
378
378
|
|
379
379
|
def parse_balance(self, response) -> Balances:
|
380
|
-
result = {'info': response}
|
380
|
+
result: dict = {'info': response}
|
381
381
|
balances = self.omit(response, [
|
382
382
|
'errorCode',
|
383
383
|
'result',
|
@@ -416,7 +416,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
416
416
|
"""
|
417
417
|
await self.load_markets()
|
418
418
|
market = self.market(symbol)
|
419
|
-
request = {
|
419
|
+
request: dict = {
|
420
420
|
'quote_currency': market['quote'],
|
421
421
|
'target_currency': market['base'],
|
422
422
|
}
|
@@ -460,7 +460,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
460
460
|
"""
|
461
461
|
await self.load_markets()
|
462
462
|
symbols = self.market_symbols(symbols)
|
463
|
-
request = {
|
463
|
+
request: dict = {
|
464
464
|
'quote_currency': 'KRW',
|
465
465
|
}
|
466
466
|
market = None
|
@@ -519,7 +519,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
519
519
|
"""
|
520
520
|
await self.load_markets()
|
521
521
|
market = self.market(symbol)
|
522
|
-
request = {
|
522
|
+
request: dict = {
|
523
523
|
'quote_currency': market['quote'],
|
524
524
|
'target_currency': market['base'],
|
525
525
|
}
|
@@ -619,7 +619,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
619
619
|
'info': ticker,
|
620
620
|
}, market)
|
621
621
|
|
622
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
622
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
623
623
|
#
|
624
624
|
# fetchTrades(public)
|
625
625
|
#
|
@@ -692,7 +692,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
692
692
|
"""
|
693
693
|
await self.load_markets()
|
694
694
|
market = self.market(symbol)
|
695
|
-
request = {
|
695
|
+
request: dict = {
|
696
696
|
'quote_currency': market['quote'],
|
697
697
|
'target_currency': market['base'],
|
698
698
|
}
|
@@ -737,7 +737,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
737
737
|
raise ExchangeError(self.id + ' createOrder() allows limit orders only')
|
738
738
|
await self.load_markets()
|
739
739
|
market = self.market(symbol)
|
740
|
-
request = {
|
740
|
+
request: dict = {
|
741
741
|
'price': price,
|
742
742
|
'currency': market['id'],
|
743
743
|
'qty': amount,
|
@@ -764,7 +764,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
764
764
|
raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
|
765
765
|
await self.load_markets()
|
766
766
|
market = self.market(symbol)
|
767
|
-
request = {
|
767
|
+
request: dict = {
|
768
768
|
'order_id': id,
|
769
769
|
'currency': market['id'],
|
770
770
|
}
|
@@ -792,8 +792,8 @@ class coinone(Exchange, ImplicitAPI):
|
|
792
792
|
#
|
793
793
|
return self.parse_order(response, market)
|
794
794
|
|
795
|
-
def parse_order_status(self, status):
|
796
|
-
statuses = {
|
795
|
+
def parse_order_status(self, status: Str):
|
796
|
+
statuses: dict = {
|
797
797
|
'live': 'open',
|
798
798
|
'partially_filled': 'open',
|
799
799
|
'partially_canceled': 'open',
|
@@ -802,7 +802,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
802
802
|
}
|
803
803
|
return self.safe_string(statuses, status, status)
|
804
804
|
|
805
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
805
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
806
806
|
#
|
807
807
|
# createOrder
|
808
808
|
#
|
@@ -924,7 +924,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
924
924
|
raise ExchangeError(self.id + ' fetchOpenOrders() allows fetching closed orders with a specific symbol')
|
925
925
|
await self.load_markets()
|
926
926
|
market = self.market(symbol)
|
927
|
-
request = {
|
927
|
+
request: dict = {
|
928
928
|
'currency': market['id'],
|
929
929
|
}
|
930
930
|
response = await self.privatePostOrderLimitOrders(self.extend(request, params))
|
@@ -961,7 +961,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
961
961
|
raise ArgumentsRequired(self.id + ' fetchMyTrades() requires a symbol argument')
|
962
962
|
await self.load_markets()
|
963
963
|
market = self.market(symbol)
|
964
|
-
request = {
|
964
|
+
request: dict = {
|
965
965
|
'currency': market['id'],
|
966
966
|
}
|
967
967
|
response = await self.v2PrivatePostOrderCompleteOrders(self.extend(request, params))
|
@@ -1006,7 +1006,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
1006
1006
|
# eslint-disable-next-line quotes
|
1007
1007
|
raise ArgumentsRequired(self.id + " cancelOrder() requires {'price': 12345, 'qty': 1.2345, 'is_ask': 0} in the params argument.")
|
1008
1008
|
await self.load_markets()
|
1009
|
-
request = {
|
1009
|
+
request: dict = {
|
1010
1010
|
'order_id': id,
|
1011
1011
|
'price': price,
|
1012
1012
|
'qty': qty,
|
@@ -1022,7 +1022,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
1022
1022
|
#
|
1023
1023
|
return response
|
1024
1024
|
|
1025
|
-
async def fetch_deposit_addresses(self, codes:
|
1025
|
+
async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
|
1026
1026
|
"""
|
1027
1027
|
fetch deposit addresses for multiple currencies and chain types
|
1028
1028
|
:param str[]|None codes: list of unified currency codes, default is None
|
@@ -1047,7 +1047,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
1047
1047
|
#
|
1048
1048
|
walletAddress = self.safe_value(response, 'walletAddress', {})
|
1049
1049
|
keys = list(walletAddress.keys())
|
1050
|
-
result = {}
|
1050
|
+
result: dict = {}
|
1051
1051
|
for i in range(0, len(keys)):
|
1052
1052
|
key = keys[i]
|
1053
1053
|
value = walletAddress[key]
|
ccxt/async_support/coinsph.py
CHANGED
@@ -627,7 +627,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
627
627
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
628
628
|
"""
|
629
629
|
await self.load_markets()
|
630
|
-
request = {}
|
630
|
+
request: dict = {}
|
631
631
|
if symbols is not None:
|
632
632
|
ids = []
|
633
633
|
for i in range(0, len(symbols)):
|
@@ -659,7 +659,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
659
659
|
"""
|
660
660
|
await self.load_markets()
|
661
661
|
market = self.market(symbol)
|
662
|
-
request = {
|
662
|
+
request: dict = {
|
663
663
|
'symbol': market['id'],
|
664
664
|
}
|
665
665
|
defaultMethod = 'publicGetOpenapiQuoteV1Ticker24hr'
|
@@ -763,7 +763,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
763
763
|
"""
|
764
764
|
await self.load_markets()
|
765
765
|
market = self.market(symbol)
|
766
|
-
request = {
|
766
|
+
request: dict = {
|
767
767
|
'symbol': market['id'],
|
768
768
|
}
|
769
769
|
if limit is not None:
|
@@ -800,7 +800,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
800
800
|
await self.load_markets()
|
801
801
|
market = self.market(symbol)
|
802
802
|
interval = self.safe_string(self.timeframes, timeframe)
|
803
|
-
request = {
|
803
|
+
request: dict = {
|
804
804
|
'symbol': market['id'],
|
805
805
|
'interval': interval,
|
806
806
|
}
|
@@ -858,7 +858,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
858
858
|
"""
|
859
859
|
await self.load_markets()
|
860
860
|
market = self.market(symbol)
|
861
|
-
request = {
|
861
|
+
request: dict = {
|
862
862
|
'symbol': market['id'],
|
863
863
|
}
|
864
864
|
if since is not None:
|
@@ -897,7 +897,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
897
897
|
raise ArgumentsRequired(self.id + ' fetchMyTrades() requires a symbol argument')
|
898
898
|
await self.load_markets()
|
899
899
|
market = self.market(symbol)
|
900
|
-
request = {
|
900
|
+
request: dict = {
|
901
901
|
'symbol': market['id'],
|
902
902
|
}
|
903
903
|
if since is not None:
|
@@ -922,12 +922,12 @@ class coinsph(Exchange, ImplicitAPI):
|
|
922
922
|
"""
|
923
923
|
if symbol is None:
|
924
924
|
raise ArgumentsRequired(self.id + ' fetchOrderTrades() requires a symbol argument')
|
925
|
-
request = {
|
925
|
+
request: dict = {
|
926
926
|
'orderId': id,
|
927
927
|
}
|
928
928
|
return await self.fetch_my_trades(symbol, since, limit, self.extend(request, params))
|
929
929
|
|
930
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
930
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
931
931
|
#
|
932
932
|
# fetchTrades
|
933
933
|
# {
|
@@ -1043,7 +1043,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1043
1043
|
|
1044
1044
|
def parse_balance(self, response) -> Balances:
|
1045
1045
|
balances = self.safe_value(response, 'balances', [])
|
1046
|
-
result = {
|
1046
|
+
result: dict = {
|
1047
1047
|
'info': response,
|
1048
1048
|
'timestamp': None,
|
1049
1049
|
'datetime': None,
|
@@ -1081,7 +1081,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1081
1081
|
orderType = self.encode_order_type(orderType)
|
1082
1082
|
params = self.omit(params, 'type')
|
1083
1083
|
orderSide = self.encode_order_side(side)
|
1084
|
-
request = {
|
1084
|
+
request: dict = {
|
1085
1085
|
'symbol': market['id'],
|
1086
1086
|
'type': orderType,
|
1087
1087
|
'side': orderSide,
|
@@ -1172,7 +1172,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1172
1172
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1173
1173
|
"""
|
1174
1174
|
await self.load_markets()
|
1175
|
-
request = {}
|
1175
|
+
request: dict = {}
|
1176
1176
|
clientOrderId = self.safe_value_2(params, 'origClientOrderId', 'clientOrderId')
|
1177
1177
|
if clientOrderId is not None:
|
1178
1178
|
request['origClientOrderId'] = clientOrderId
|
@@ -1194,7 +1194,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1194
1194
|
"""
|
1195
1195
|
await self.load_markets()
|
1196
1196
|
market = None
|
1197
|
-
request = {}
|
1197
|
+
request: dict = {}
|
1198
1198
|
if symbol is not None:
|
1199
1199
|
market = self.market(symbol)
|
1200
1200
|
request['symbol'] = market['id']
|
@@ -1215,7 +1215,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1215
1215
|
raise ArgumentsRequired(self.id + ' fetchClosedOrders() requires a symbol argument')
|
1216
1216
|
await self.load_markets()
|
1217
1217
|
market = self.market(symbol)
|
1218
|
-
request = {
|
1218
|
+
request: dict = {
|
1219
1219
|
'symbol': market['id'],
|
1220
1220
|
}
|
1221
1221
|
if since is not None:
|
@@ -1237,7 +1237,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1237
1237
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1238
1238
|
"""
|
1239
1239
|
await self.load_markets()
|
1240
|
-
request = {}
|
1240
|
+
request: dict = {}
|
1241
1241
|
clientOrderId = self.safe_value_2(params, 'origClientOrderId', 'clientOrderId')
|
1242
1242
|
if clientOrderId is not None:
|
1243
1243
|
request['origClientOrderId'] = clientOrderId
|
@@ -1259,14 +1259,14 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1259
1259
|
raise ArgumentsRequired(self.id + ' cancelAllOrders() requires a symbol argument')
|
1260
1260
|
await self.load_markets()
|
1261
1261
|
market = None
|
1262
|
-
request = {}
|
1262
|
+
request: dict = {}
|
1263
1263
|
if symbol is not None:
|
1264
1264
|
market = self.market(symbol)
|
1265
1265
|
request['symbol'] = market['id']
|
1266
1266
|
response = await self.privateDeleteOpenapiV1OpenOrders(self.extend(request, params))
|
1267
1267
|
return self.parse_orders(response, market)
|
1268
1268
|
|
1269
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1269
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1270
1270
|
#
|
1271
1271
|
# createOrder POST /openapi/v1/order
|
1272
1272
|
# {
|
@@ -1369,21 +1369,21 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1369
1369
|
}, market)
|
1370
1370
|
|
1371
1371
|
def parse_order_side(self, status):
|
1372
|
-
statuses = {
|
1372
|
+
statuses: dict = {
|
1373
1373
|
'BUY': 'buy',
|
1374
1374
|
'SELL': 'sell',
|
1375
1375
|
}
|
1376
1376
|
return self.safe_string(statuses, status, status)
|
1377
1377
|
|
1378
1378
|
def encode_order_side(self, status):
|
1379
|
-
statuses = {
|
1379
|
+
statuses: dict = {
|
1380
1380
|
'buy': 'BUY',
|
1381
1381
|
'sell': 'SELL',
|
1382
1382
|
}
|
1383
1383
|
return self.safe_string(statuses, status, status)
|
1384
1384
|
|
1385
1385
|
def parse_order_type(self, status):
|
1386
|
-
statuses = {
|
1386
|
+
statuses: dict = {
|
1387
1387
|
'MARKET': 'market',
|
1388
1388
|
'LIMIT': 'limit',
|
1389
1389
|
'LIMIT_MAKER': 'limit',
|
@@ -1395,7 +1395,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1395
1395
|
return self.safe_string(statuses, status, status)
|
1396
1396
|
|
1397
1397
|
def encode_order_type(self, status):
|
1398
|
-
statuses = {
|
1398
|
+
statuses: dict = {
|
1399
1399
|
'market': 'MARKET',
|
1400
1400
|
'limit': 'LIMIT',
|
1401
1401
|
'limit_maker': 'LIMIT_MAKER',
|
@@ -1406,8 +1406,8 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1406
1406
|
}
|
1407
1407
|
return self.safe_string(statuses, status, status)
|
1408
1408
|
|
1409
|
-
def parse_order_status(self, status):
|
1410
|
-
statuses = {
|
1409
|
+
def parse_order_status(self, status: Str):
|
1410
|
+
statuses: dict = {
|
1411
1411
|
'NEW': 'open',
|
1412
1412
|
'FILLED': 'closed',
|
1413
1413
|
'CANCELED': 'canceled',
|
@@ -1418,7 +1418,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1418
1418
|
return self.safe_string(statuses, status, status)
|
1419
1419
|
|
1420
1420
|
def parse_order_time_in_force(self, status):
|
1421
|
-
statuses = {
|
1421
|
+
statuses: dict = {
|
1422
1422
|
'GTC': 'GTC',
|
1423
1423
|
'FOK': 'FOK',
|
1424
1424
|
'IOC': 'IOC',
|
@@ -1435,7 +1435,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1435
1435
|
"""
|
1436
1436
|
await self.load_markets()
|
1437
1437
|
market = self.market(symbol)
|
1438
|
-
request = {
|
1438
|
+
request: dict = {
|
1439
1439
|
'symbol': market['id'],
|
1440
1440
|
}
|
1441
1441
|
response = await self.privateGetOpenapiV1AssetTradeFee(self.extend(request, params))
|
@@ -1474,14 +1474,14 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1474
1474
|
# },
|
1475
1475
|
# ]
|
1476
1476
|
#
|
1477
|
-
result = {}
|
1477
|
+
result: dict = {}
|
1478
1478
|
for i in range(0, len(response)):
|
1479
1479
|
fee = self.parse_trading_fee(response[i])
|
1480
1480
|
symbol = fee['symbol']
|
1481
1481
|
result[symbol] = fee
|
1482
1482
|
return result
|
1483
1483
|
|
1484
|
-
def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
|
1484
|
+
def parse_trading_fee(self, fee: dict, market: Market = None) -> TradingFeeInterface:
|
1485
1485
|
#
|
1486
1486
|
# {
|
1487
1487
|
# "symbol": "ETHUSDT",
|
@@ -1522,7 +1522,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1522
1522
|
raise BadRequest(self.id + ' withdraw() require network parameter')
|
1523
1523
|
await self.load_markets()
|
1524
1524
|
currency = self.currency(code)
|
1525
|
-
request = {
|
1525
|
+
request: dict = {
|
1526
1526
|
'coin': currency['id'],
|
1527
1527
|
'amount': self.number_to_string(amount),
|
1528
1528
|
'network': networkId,
|
@@ -1547,7 +1547,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1547
1547
|
# todo: returns an empty array - find out why
|
1548
1548
|
await self.load_markets()
|
1549
1549
|
currency = None
|
1550
|
-
request = {}
|
1550
|
+
request: dict = {}
|
1551
1551
|
if code is not None:
|
1552
1552
|
currency = self.currency(code)
|
1553
1553
|
request['coin'] = currency['id']
|
@@ -1599,7 +1599,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1599
1599
|
# todo: returns an empty array - find out why
|
1600
1600
|
await self.load_markets()
|
1601
1601
|
currency = None
|
1602
|
-
request = {}
|
1602
|
+
request: dict = {}
|
1603
1603
|
if code is not None:
|
1604
1604
|
currency = self.currency(code)
|
1605
1605
|
request['coin'] = currency['id']
|
@@ -1644,7 +1644,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1644
1644
|
#
|
1645
1645
|
return self.parse_transactions(response, currency, since, limit)
|
1646
1646
|
|
1647
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1647
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1648
1648
|
#
|
1649
1649
|
# fetchDeposits
|
1650
1650
|
# {
|
@@ -1732,7 +1732,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1732
1732
|
}
|
1733
1733
|
|
1734
1734
|
def parse_transaction_status(self, status):
|
1735
|
-
statuses = {
|
1735
|
+
statuses: dict = {
|
1736
1736
|
'0': 'pending',
|
1737
1737
|
'1': 'ok',
|
1738
1738
|
'2': 'failed',
|
@@ -1755,7 +1755,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1755
1755
|
raise BadRequest(self.id + ' fetchDepositAddress() require network parameter')
|
1756
1756
|
await self.load_markets()
|
1757
1757
|
currency = self.currency(code)
|
1758
|
-
request = {
|
1758
|
+
request: dict = {
|
1759
1759
|
'coin': currency['id'],
|
1760
1760
|
'network': networkId,
|
1761
1761
|
}
|
ccxt/async_support/coinspot.py
CHANGED
@@ -148,7 +148,7 @@ class coinspot(Exchange, ImplicitAPI):
|
|
148
148
|
})
|
149
149
|
|
150
150
|
def parse_balance(self, response) -> Balances:
|
151
|
-
result = {'info': response}
|
151
|
+
result: dict = {'info': response}
|
152
152
|
balances = self.safe_value_2(response, 'balance', 'balances')
|
153
153
|
if isinstance(balances, list):
|
154
154
|
for i in range(0, len(balances)):
|
@@ -210,7 +210,7 @@ class coinspot(Exchange, ImplicitAPI):
|
|
210
210
|
"""
|
211
211
|
await self.load_markets()
|
212
212
|
market = self.market(symbol)
|
213
|
-
request = {
|
213
|
+
request: dict = {
|
214
214
|
'cointype': market['id'],
|
215
215
|
}
|
216
216
|
orderbook = await self.privatePostOrders(self.extend(request, params))
|
@@ -307,7 +307,7 @@ class coinspot(Exchange, ImplicitAPI):
|
|
307
307
|
# }
|
308
308
|
# }
|
309
309
|
#
|
310
|
-
result = {}
|
310
|
+
result: dict = {}
|
311
311
|
prices = self.safe_value(response, 'prices')
|
312
312
|
ids = list(prices.keys())
|
313
313
|
for i in range(0, len(ids)):
|
@@ -331,7 +331,7 @@ class coinspot(Exchange, ImplicitAPI):
|
|
331
331
|
"""
|
332
332
|
await self.load_markets()
|
333
333
|
market = self.market(symbol)
|
334
|
-
request = {
|
334
|
+
request: dict = {
|
335
335
|
'cointype': market['id'],
|
336
336
|
}
|
337
337
|
response = await self.privatePostOrdersHistory(self.extend(request, params))
|
@@ -357,7 +357,7 @@ class coinspot(Exchange, ImplicitAPI):
|
|
357
357
|
:returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
|
358
358
|
"""
|
359
359
|
await self.load_markets()
|
360
|
-
request = {}
|
360
|
+
request: dict = {}
|
361
361
|
market = None
|
362
362
|
if symbol is not None:
|
363
363
|
market = self.market(symbol)
|
@@ -399,7 +399,7 @@ class coinspot(Exchange, ImplicitAPI):
|
|
399
399
|
trades = self.array_concat(buyTrades, sellTrades)
|
400
400
|
return self.parse_trades(trades, market, since, limit)
|
401
401
|
|
402
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
402
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
403
403
|
#
|
404
404
|
# public fetchTrades
|
405
405
|
#
|
@@ -484,7 +484,7 @@ class coinspot(Exchange, ImplicitAPI):
|
|
484
484
|
if type == 'market':
|
485
485
|
raise ExchangeError(self.id + ' createOrder() allows limit orders only')
|
486
486
|
market = self.market(symbol)
|
487
|
-
request = {
|
487
|
+
request: dict = {
|
488
488
|
'cointype': market['id'],
|
489
489
|
'amount': amount,
|
490
490
|
'rate': price,
|
@@ -506,7 +506,7 @@ class coinspot(Exchange, ImplicitAPI):
|
|
506
506
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires a side parameter, "buy" or "sell"')
|
507
507
|
params = self.omit(params, 'side')
|
508
508
|
method = 'privatePostMy' + self.capitalize(side) + 'Cancel'
|
509
|
-
request = {
|
509
|
+
request: dict = {
|
510
510
|
'id': id,
|
511
511
|
}
|
512
512
|
return await getattr(self, method)(self.extend(request, params))
|