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/ascendex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.ascendex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -465,7 +465,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
465
465
|
cashById = self.index_by(cashData, 'assetCode')
|
466
466
|
dataById = self.deep_extend(assetsById, marginById, cashById)
|
467
467
|
ids = list(dataById.keys())
|
468
|
-
result = {}
|
468
|
+
result: dict = {}
|
469
469
|
for i in range(0, len(ids)):
|
470
470
|
id = ids[i]
|
471
471
|
currency = dataById[id]
|
@@ -699,7 +699,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
699
699
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
700
700
|
:returns int: the current integer timestamp in milliseconds from the ascendex server
|
701
701
|
"""
|
702
|
-
request = {
|
702
|
+
request: dict = {
|
703
703
|
'requestTime': self.milliseconds(),
|
704
704
|
}
|
705
705
|
response = self.v1PublicGetExchangeInfo(self.extend(request, params))
|
@@ -755,7 +755,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
755
755
|
]
|
756
756
|
|
757
757
|
def parse_balance(self, response) -> Balances:
|
758
|
-
result = {
|
758
|
+
result: dict = {
|
759
759
|
'info': response,
|
760
760
|
'timestamp': None,
|
761
761
|
'datetime': None,
|
@@ -771,7 +771,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
771
771
|
return self.safe_balance(result)
|
772
772
|
|
773
773
|
def parse_margin_balance(self, response):
|
774
|
-
result = {
|
774
|
+
result: dict = {
|
775
775
|
'info': response,
|
776
776
|
'timestamp': None,
|
777
777
|
'datetime': None,
|
@@ -790,7 +790,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
790
790
|
return self.safe_balance(result)
|
791
791
|
|
792
792
|
def parse_swap_balance(self, response):
|
793
|
-
result = {
|
793
|
+
result: dict = {
|
794
794
|
'info': response,
|
795
795
|
'timestamp': None,
|
796
796
|
'datetime': None,
|
@@ -830,7 +830,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
830
830
|
accountCategory = self.safe_string(accountsByType, marketType, 'cash')
|
831
831
|
account = self.safe_value(self.accounts, 0, {})
|
832
832
|
accountGroup = self.safe_string(account, 'id')
|
833
|
-
request = {
|
833
|
+
request: dict = {
|
834
834
|
'account-group': accountGroup,
|
835
835
|
}
|
836
836
|
if (marginMode == 'isolated') and (marketType != 'swap'):
|
@@ -904,7 +904,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
904
904
|
"""
|
905
905
|
self.load_markets()
|
906
906
|
market = self.market(symbol)
|
907
|
-
request = {
|
907
|
+
request: dict = {
|
908
908
|
'symbol': market['id'],
|
909
909
|
}
|
910
910
|
response = self.v1PublicGetDepth(self.extend(request, params))
|
@@ -993,7 +993,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
993
993
|
"""
|
994
994
|
self.load_markets()
|
995
995
|
market = self.market(symbol)
|
996
|
-
request = {
|
996
|
+
request: dict = {
|
997
997
|
'symbol': market['id'],
|
998
998
|
}
|
999
999
|
response = self.v1PublicGetTicker(self.extend(request, params))
|
@@ -1026,7 +1026,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1026
1026
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
1027
1027
|
"""
|
1028
1028
|
self.load_markets()
|
1029
|
-
request = {}
|
1029
|
+
request: dict = {}
|
1030
1030
|
market = None
|
1031
1031
|
if symbols is not None:
|
1032
1032
|
symbol = self.safe_value(symbols, 0)
|
@@ -1101,7 +1101,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1101
1101
|
"""
|
1102
1102
|
self.load_markets()
|
1103
1103
|
market = self.market(symbol)
|
1104
|
-
request = {
|
1104
|
+
request: dict = {
|
1105
1105
|
'symbol': market['id'],
|
1106
1106
|
'interval': self.safe_string(self.timeframes, timeframe, timeframe),
|
1107
1107
|
}
|
@@ -1143,7 +1143,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1143
1143
|
data = self.safe_list(response, 'data', [])
|
1144
1144
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
1145
1145
|
|
1146
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1146
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
1147
1147
|
#
|
1148
1148
|
# public fetchTrades
|
1149
1149
|
#
|
@@ -1189,7 +1189,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1189
1189
|
"""
|
1190
1190
|
self.load_markets()
|
1191
1191
|
market = self.market(symbol)
|
1192
|
-
request = {
|
1192
|
+
request: dict = {
|
1193
1193
|
'symbol': market['id'],
|
1194
1194
|
}
|
1195
1195
|
if limit is not None:
|
@@ -1213,8 +1213,8 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1213
1213
|
trades = self.safe_list(records, 'data', [])
|
1214
1214
|
return self.parse_trades(trades, market, since, limit)
|
1215
1215
|
|
1216
|
-
def parse_order_status(self, status):
|
1217
|
-
statuses = {
|
1216
|
+
def parse_order_status(self, status: Str):
|
1217
|
+
statuses: dict = {
|
1218
1218
|
'PendingNew': 'open',
|
1219
1219
|
'New': 'open',
|
1220
1220
|
'PartiallyFilled': 'open',
|
@@ -1224,7 +1224,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1224
1224
|
}
|
1225
1225
|
return self.safe_string(statuses, status, status)
|
1226
1226
|
|
1227
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1227
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1228
1228
|
#
|
1229
1229
|
# createOrder
|
1230
1230
|
#
|
@@ -1406,7 +1406,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1406
1406
|
self.load_accounts()
|
1407
1407
|
account = self.safe_value(self.accounts, 0, {})
|
1408
1408
|
accountGroup = self.safe_string(account, 'id')
|
1409
|
-
request = {
|
1409
|
+
request: dict = {
|
1410
1410
|
'account-group': accountGroup,
|
1411
1411
|
}
|
1412
1412
|
response = self.v1PrivateAccountGroupGetSpotFee(self.extend(request, params))
|
@@ -1428,7 +1428,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1428
1428
|
#
|
1429
1429
|
data = self.safe_value(response, 'data', {})
|
1430
1430
|
fees = self.safe_value(data, 'fees', [])
|
1431
|
-
result = {}
|
1431
|
+
result: dict = {}
|
1432
1432
|
for i in range(0, len(fees)):
|
1433
1433
|
fee = fees[i]
|
1434
1434
|
marketId = self.safe_string(fee, 'symbol')
|
@@ -1471,7 +1471,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1471
1471
|
account = self.safe_value(self.accounts, 0, {})
|
1472
1472
|
accountGroup = self.safe_value(account, 'id')
|
1473
1473
|
clientOrderId = self.safe_string_2(params, 'clientOrderId', 'id')
|
1474
|
-
request = {
|
1474
|
+
request: dict = {
|
1475
1475
|
'account-group': accountGroup,
|
1476
1476
|
'account-category': accountCategory,
|
1477
1477
|
'symbol': market['id'],
|
@@ -1659,7 +1659,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1659
1659
|
accountCategory = 'margin'
|
1660
1660
|
account = self.safe_value(self.accounts, 0, {})
|
1661
1661
|
accountGroup = self.safe_value(account, 'id')
|
1662
|
-
request = {}
|
1662
|
+
request: dict = {}
|
1663
1663
|
response = None
|
1664
1664
|
if market['swap']:
|
1665
1665
|
raise NotSupported(self.id + ' createOrders() is not currently supported for swap markets on ascendex')
|
@@ -1717,7 +1717,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1717
1717
|
accountCategory = self.safe_string(accountsByType, type, 'cash')
|
1718
1718
|
account = self.safe_value(self.accounts, 0, {})
|
1719
1719
|
accountGroup = self.safe_value(account, 'id')
|
1720
|
-
request = {
|
1720
|
+
request: dict = {
|
1721
1721
|
'account-group': accountGroup,
|
1722
1722
|
'account-category': accountCategory,
|
1723
1723
|
'orderId': id,
|
@@ -1822,7 +1822,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1822
1822
|
type, query = self.handle_market_type_and_params('fetchOpenOrders', market, params)
|
1823
1823
|
accountsByType = self.safe_value(self.options, 'accountsByType', {})
|
1824
1824
|
accountCategory = self.safe_string(accountsByType, type, 'cash')
|
1825
|
-
request = {
|
1825
|
+
request: dict = {
|
1826
1826
|
'account-group': accountGroup,
|
1827
1827
|
'account-category': accountCategory,
|
1828
1828
|
}
|
@@ -1927,7 +1927,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1927
1927
|
self.load_accounts()
|
1928
1928
|
account = self.safe_value(self.accounts, 0, {})
|
1929
1929
|
accountGroup = self.safe_value(account, 'id')
|
1930
|
-
request = {
|
1930
|
+
request: dict = {
|
1931
1931
|
# 'category': accountCategory,
|
1932
1932
|
# 'symbol': market['id'],
|
1933
1933
|
# 'orderType': 'market', # optional, string
|
@@ -2094,7 +2094,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2094
2094
|
accountCategory = self.safe_string(accountsByType, type, 'cash')
|
2095
2095
|
account = self.safe_value(self.accounts, 0, {})
|
2096
2096
|
accountGroup = self.safe_value(account, 'id')
|
2097
|
-
request = {
|
2097
|
+
request: dict = {
|
2098
2098
|
'account-group': accountGroup,
|
2099
2099
|
'account-category': accountCategory,
|
2100
2100
|
'symbol': market['id'],
|
@@ -2201,7 +2201,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2201
2201
|
accountCategory = self.safe_string(accountsByType, type, 'cash')
|
2202
2202
|
account = self.safe_value(self.accounts, 0, {})
|
2203
2203
|
accountGroup = self.safe_value(account, 'id')
|
2204
|
-
request = {
|
2204
|
+
request: dict = {
|
2205
2205
|
'account-group': accountGroup,
|
2206
2206
|
'account-category': accountCategory,
|
2207
2207
|
'time': self.milliseconds(),
|
@@ -2299,7 +2299,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2299
2299
|
networkCode = self.safe_string_2(params, 'network', 'chainName')
|
2300
2300
|
networkId = self.network_code_to_id(networkCode)
|
2301
2301
|
params = self.omit(params, ['chainName'])
|
2302
|
-
request = {
|
2302
|
+
request: dict = {
|
2303
2303
|
'asset': currency['id'],
|
2304
2304
|
'blockchain': networkId,
|
2305
2305
|
}
|
@@ -2365,7 +2365,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2365
2365
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2366
2366
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2367
2367
|
"""
|
2368
|
-
request = {
|
2368
|
+
request: dict = {
|
2369
2369
|
'txType': 'deposit',
|
2370
2370
|
}
|
2371
2371
|
return self.fetch_transactions(code, since, limit, self.extend(request, params))
|
@@ -2379,7 +2379,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2379
2379
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2380
2380
|
:returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2381
2381
|
"""
|
2382
|
-
request = {
|
2382
|
+
request: dict = {
|
2383
2383
|
'txType': 'withdrawal',
|
2384
2384
|
}
|
2385
2385
|
return self.fetch_transactions(code, since, limit, self.extend(request, params))
|
@@ -2394,7 +2394,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2394
2394
|
:returns dict: a list of `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2395
2395
|
"""
|
2396
2396
|
self.load_markets()
|
2397
|
-
request = {
|
2397
|
+
request: dict = {
|
2398
2398
|
# 'asset': currency['id'],
|
2399
2399
|
# 'page': 1,
|
2400
2400
|
# 'pageSize': 20,
|
@@ -2441,7 +2441,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2441
2441
|
return self.parse_transactions(transactions, currency, since, limit)
|
2442
2442
|
|
2443
2443
|
def parse_transaction_status(self, status):
|
2444
|
-
statuses = {
|
2444
|
+
statuses: dict = {
|
2445
2445
|
'reviewing': 'pending',
|
2446
2446
|
'pending': 'pending',
|
2447
2447
|
'confirmed': 'ok',
|
@@ -2449,7 +2449,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2449
2449
|
}
|
2450
2450
|
return self.safe_string(statuses, status, status)
|
2451
2451
|
|
2452
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2452
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
2453
2453
|
#
|
2454
2454
|
# {
|
2455
2455
|
# "requestId": "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB",
|
@@ -2515,7 +2515,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2515
2515
|
self.load_accounts()
|
2516
2516
|
account = self.safe_value(self.accounts, 0, {})
|
2517
2517
|
accountGroup = self.safe_string(account, 'id')
|
2518
|
-
request = {
|
2518
|
+
request: dict = {
|
2519
2519
|
'account-group': accountGroup,
|
2520
2520
|
}
|
2521
2521
|
response = self.v2PrivateAccountGroupGetFuturesPosition(self.extend(request, params))
|
@@ -2566,7 +2566,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2566
2566
|
symbols = self.market_symbols(symbols)
|
2567
2567
|
return self.filter_by_array_positions(result, 'symbol', symbols, False)
|
2568
2568
|
|
2569
|
-
def parse_position(self, position, market: Market = None):
|
2569
|
+
def parse_position(self, position: dict, market: Market = None):
|
2570
2570
|
#
|
2571
2571
|
# {
|
2572
2572
|
# "symbol": "BTC-PERP",
|
@@ -2712,7 +2712,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2712
2712
|
account = self.safe_value(self.accounts, 0, {})
|
2713
2713
|
accountGroup = self.safe_string(account, 'id')
|
2714
2714
|
amount = self.amount_to_precision(symbol, amount)
|
2715
|
-
request = {
|
2715
|
+
request: dict = {
|
2716
2716
|
'account-group': accountGroup,
|
2717
2717
|
'symbol': market['id'],
|
2718
2718
|
'amount': amount, # positive value for adding margin, negative for reducing
|
@@ -2795,7 +2795,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2795
2795
|
raise BadSymbol(self.id + ' setLeverage() supports swap contracts only')
|
2796
2796
|
account = self.safe_value(self.accounts, 0, {})
|
2797
2797
|
accountGroup = self.safe_string(account, 'id')
|
2798
|
-
request = {
|
2798
|
+
request: dict = {
|
2799
2799
|
'account-group': accountGroup,
|
2800
2800
|
'symbol': market['id'],
|
2801
2801
|
'leverage': leverage,
|
@@ -2823,7 +2823,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2823
2823
|
market = self.market(symbol)
|
2824
2824
|
account = self.safe_value(self.accounts, 0, {})
|
2825
2825
|
accountGroup = self.safe_string(account, 'id')
|
2826
|
-
request = {
|
2826
|
+
request: dict = {
|
2827
2827
|
'account-group': accountGroup,
|
2828
2828
|
'symbol': market['id'],
|
2829
2829
|
'marginType': marginMode,
|
@@ -2832,7 +2832,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2832
2832
|
raise BadSymbol(self.id + ' setMarginMode() supports swap contracts only')
|
2833
2833
|
return self.v2PrivateAccountGroupPostFuturesMarginType(self.extend(request, params))
|
2834
2834
|
|
2835
|
-
def fetch_leverage_tiers(self, symbols: Strings = None, params={}):
|
2835
|
+
def fetch_leverage_tiers(self, symbols: Strings = None, params={}) -> LeverageTiers:
|
2836
2836
|
"""
|
2837
2837
|
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
2838
2838
|
:param str[]|None symbols: list of unified market symbols
|
@@ -2873,7 +2873,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2873
2873
|
symbols = self.market_symbols(symbols)
|
2874
2874
|
return self.parse_leverage_tiers(data, symbols, 'symbol')
|
2875
2875
|
|
2876
|
-
def parse_market_leverage_tiers(self, info, market: Market = None):
|
2876
|
+
def parse_market_leverage_tiers(self, info, market: Market = None) -> List[LeverageTier]:
|
2877
2877
|
"""
|
2878
2878
|
:param dict info: Exchange market response for 1 market
|
2879
2879
|
:param dict market: CCXT market
|
@@ -2941,7 +2941,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2941
2941
|
#
|
2942
2942
|
blockChains = self.safe_value(fee, 'blockChain', [])
|
2943
2943
|
blockChainsLength = len(blockChains)
|
2944
|
-
result = {
|
2944
|
+
result: dict = {
|
2945
2945
|
'info': fee,
|
2946
2946
|
'withdraw': {
|
2947
2947
|
'fee': None,
|
@@ -3000,7 +3000,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3000
3000
|
toId = self.safe_string(accountsByType, toAccount, toAccount)
|
3001
3001
|
if fromId != 'cash' and toId != 'cash':
|
3002
3002
|
raise ExchangeError(self.id + ' transfer() only supports direct balance transfer between spot and swap, spot and margin')
|
3003
|
-
request = {
|
3003
|
+
request: dict = {
|
3004
3004
|
'account-group': accountGroup,
|
3005
3005
|
'amount': self.currency_to_precision(code, amount),
|
3006
3006
|
'asset': currency['id'],
|
@@ -3063,7 +3063,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3063
3063
|
return self.fetch_paginated_call_incremental('fetchFundingHistory', symbol, since, limit, params, 'page', 25)
|
3064
3064
|
account = self.safe_value(self.accounts, 0, {})
|
3065
3065
|
accountGroup = self.safe_string(account, 'id')
|
3066
|
-
request = {
|
3066
|
+
request: dict = {
|
3067
3067
|
'account-group': accountGroup,
|
3068
3068
|
}
|
3069
3069
|
market = None
|
@@ -3116,7 +3116,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3116
3116
|
'amount': self.safe_number(income, 'paymentInUSDT'),
|
3117
3117
|
}
|
3118
3118
|
|
3119
|
-
def fetch_margin_modes(self, symbols:
|
3119
|
+
def fetch_margin_modes(self, symbols: Strings = None, params={}) -> MarginModes:
|
3120
3120
|
"""
|
3121
3121
|
fetches the set margin mode of the user
|
3122
3122
|
:see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
|
@@ -3128,7 +3128,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3128
3128
|
self.load_accounts()
|
3129
3129
|
account = self.safe_value(self.accounts, 0, {})
|
3130
3130
|
accountGroup = self.safe_string(account, 'id')
|
3131
|
-
request = {
|
3131
|
+
request: dict = {
|
3132
3132
|
'account-group': accountGroup,
|
3133
3133
|
}
|
3134
3134
|
response = self.v2PrivateAccountGroupGetFuturesPosition(self.extend(request, params))
|
@@ -3175,7 +3175,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3175
3175
|
marginModes = self.safe_list(data, 'contracts', [])
|
3176
3176
|
return self.parse_margin_modes(marginModes, symbols, 'symbol')
|
3177
3177
|
|
3178
|
-
def parse_margin_mode(self, marginMode, market=None) -> MarginMode:
|
3178
|
+
def parse_margin_mode(self, marginMode: dict, market=None) -> MarginMode:
|
3179
3179
|
marketId = self.safe_string(marginMode, 'symbol')
|
3180
3180
|
marginType = self.safe_string(marginMode, 'marginType')
|
3181
3181
|
margin = 'cross' if (marginType == 'crossed') else 'isolated'
|
@@ -3185,7 +3185,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3185
3185
|
'marginMode': margin,
|
3186
3186
|
}
|
3187
3187
|
|
3188
|
-
def fetch_leverages(self, symbols:
|
3188
|
+
def fetch_leverages(self, symbols: Strings = None, params={}) -> Leverages:
|
3189
3189
|
"""
|
3190
3190
|
fetch the set leverage for all contract markets
|
3191
3191
|
:see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
|
@@ -3197,7 +3197,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3197
3197
|
self.load_accounts()
|
3198
3198
|
account = self.safe_value(self.accounts, 0, {})
|
3199
3199
|
accountGroup = self.safe_string(account, 'id')
|
3200
|
-
request = {
|
3200
|
+
request: dict = {
|
3201
3201
|
'account-group': accountGroup,
|
3202
3202
|
}
|
3203
3203
|
response = self.v2PrivateAccountGroupGetFuturesPosition(self.extend(request, params))
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/ace.py
CHANGED
@@ -356,7 +356,7 @@ class ace(Exchange, ImplicitAPI):
|
|
356
356
|
"""
|
357
357
|
await self.load_markets()
|
358
358
|
market = self.market(symbol)
|
359
|
-
request = {
|
359
|
+
request: dict = {
|
360
360
|
'quoteCurrencyId': market['quoteId'],
|
361
361
|
'baseCurrencyId': market['baseId'],
|
362
362
|
}
|
@@ -444,7 +444,7 @@ class ace(Exchange, ImplicitAPI):
|
|
444
444
|
"""
|
445
445
|
await self.load_markets()
|
446
446
|
market = self.market(symbol)
|
447
|
-
request = {
|
447
|
+
request: dict = {
|
448
448
|
'duration': self.timeframes[timeframe],
|
449
449
|
'quoteCurrencyId': market['quoteId'],
|
450
450
|
'baseCurrencyId': market['baseId'],
|
@@ -475,8 +475,8 @@ class ace(Exchange, ImplicitAPI):
|
|
475
475
|
#
|
476
476
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
477
477
|
|
478
|
-
def parse_order_status(self, status):
|
479
|
-
statuses = {
|
478
|
+
def parse_order_status(self, status: Str):
|
479
|
+
statuses: dict = {
|
480
480
|
'0': 'open',
|
481
481
|
'1': 'open',
|
482
482
|
'2': 'closed',
|
@@ -485,7 +485,7 @@ class ace(Exchange, ImplicitAPI):
|
|
485
485
|
}
|
486
486
|
return self.safe_string(statuses, status, None)
|
487
487
|
|
488
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
488
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
489
489
|
#
|
490
490
|
# createOrder
|
491
491
|
# "15697850529570392100421100482693"
|
@@ -589,7 +589,7 @@ class ace(Exchange, ImplicitAPI):
|
|
589
589
|
market = self.market(symbol)
|
590
590
|
orderType = type.upper()
|
591
591
|
orderSide = side.upper()
|
592
|
-
request = {
|
592
|
+
request: dict = {
|
593
593
|
'baseCurrencyId': market['baseId'],
|
594
594
|
'quoteCurrencyId': market['quoteId'],
|
595
595
|
'type': 1 if (orderType == 'LIMIT') else 2,
|
@@ -620,7 +620,7 @@ class ace(Exchange, ImplicitAPI):
|
|
620
620
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
621
621
|
"""
|
622
622
|
await self.load_markets()
|
623
|
-
request = {
|
623
|
+
request: dict = {
|
624
624
|
'orderNo': id,
|
625
625
|
}
|
626
626
|
response = await self.privatePostV2OrderCancel(self.extend(request, params))
|
@@ -643,7 +643,7 @@ class ace(Exchange, ImplicitAPI):
|
|
643
643
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
644
644
|
"""
|
645
645
|
await self.load_markets()
|
646
|
-
request = {
|
646
|
+
request: dict = {
|
647
647
|
'orderNo': id,
|
648
648
|
}
|
649
649
|
response = await self.privatePostV2OrderShowOrderStatus(self.extend(request, params))
|
@@ -686,7 +686,7 @@ class ace(Exchange, ImplicitAPI):
|
|
686
686
|
raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
|
687
687
|
await self.load_markets()
|
688
688
|
market = self.market(symbol)
|
689
|
-
request = {
|
689
|
+
request: dict = {
|
690
690
|
'quoteCurrencyId': market['quoteId'],
|
691
691
|
'baseCurrencyId': market['baseId'],
|
692
692
|
# 'start': 0,
|
@@ -726,7 +726,7 @@ class ace(Exchange, ImplicitAPI):
|
|
726
726
|
#
|
727
727
|
return self.parse_orders(orders, market, since, limit)
|
728
728
|
|
729
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
729
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
730
730
|
#
|
731
731
|
# fetchOrderTrades
|
732
732
|
# {
|
@@ -814,7 +814,7 @@ class ace(Exchange, ImplicitAPI):
|
|
814
814
|
"""
|
815
815
|
await self.load_markets()
|
816
816
|
market = self.safe_market(symbol)
|
817
|
-
request = {
|
817
|
+
request: dict = {
|
818
818
|
'orderNo': id,
|
819
819
|
}
|
820
820
|
response = await self.privatePostV2OrderShowOrderHistory(self.extend(request, params))
|
@@ -867,7 +867,7 @@ class ace(Exchange, ImplicitAPI):
|
|
867
867
|
"""
|
868
868
|
await self.load_markets()
|
869
869
|
market = self.safe_market(symbol)
|
870
|
-
request = {
|
870
|
+
request: dict = {
|
871
871
|
# 'buyOrSell': 1,
|
872
872
|
# 'start': 0,
|
873
873
|
}
|
@@ -922,7 +922,7 @@ class ace(Exchange, ImplicitAPI):
|
|
922
922
|
# }
|
923
923
|
# ]
|
924
924
|
#
|
925
|
-
result = {
|
925
|
+
result: dict = {
|
926
926
|
'info': response,
|
927
927
|
}
|
928
928
|
for i in range(0, len(response)):
|
@@ -931,7 +931,7 @@ class ace(Exchange, ImplicitAPI):
|
|
931
931
|
code = self.safe_currency_code(currencyId)
|
932
932
|
amount = self.safe_string(balance, 'amount')
|
933
933
|
available = self.safe_string(balance, 'cashAmount')
|
934
|
-
account = {
|
934
|
+
account: dict = {
|
935
935
|
'free': available,
|
936
936
|
'total': amount,
|
937
937
|
}
|
ccxt/async_support/alpaca.py
CHANGED
@@ -310,7 +310,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
310
310
|
:param dict [params]: extra parameters specific to the exchange api endpoint
|
311
311
|
:returns dict[]: an array of objects representing market data
|
312
312
|
"""
|
313
|
-
request = {
|
313
|
+
request: dict = {
|
314
314
|
'asset_class': 'crypto',
|
315
315
|
'status': 'active',
|
316
316
|
}
|
@@ -445,7 +445,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
445
445
|
marketId = market['id']
|
446
446
|
loc = self.safe_string(params, 'loc', 'us')
|
447
447
|
method = self.safe_string(params, 'method', 'marketPublicGetV1beta3CryptoLocTrades')
|
448
|
-
request = {
|
448
|
+
request: dict = {
|
449
449
|
'symbols': marketId,
|
450
450
|
'loc': loc,
|
451
451
|
}
|
@@ -511,7 +511,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
511
511
|
market = self.market(symbol)
|
512
512
|
id = market['id']
|
513
513
|
loc = self.safe_string(params, 'loc', 'us')
|
514
|
-
request = {
|
514
|
+
request: dict = {
|
515
515
|
'symbols': id,
|
516
516
|
'loc': loc,
|
517
517
|
}
|
@@ -577,7 +577,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
577
577
|
marketId = market['id']
|
578
578
|
loc = self.safe_string(params, 'loc', 'us')
|
579
579
|
method = self.safe_string(params, 'method', 'marketPublicGetV1beta3CryptoLocBars')
|
580
|
-
request = {
|
580
|
+
request: dict = {
|
581
581
|
'symbols': marketId,
|
582
582
|
'loc': loc,
|
583
583
|
}
|
@@ -686,7 +686,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
686
686
|
await self.load_markets()
|
687
687
|
market = self.market(symbol)
|
688
688
|
id = market['id']
|
689
|
-
request = {
|
689
|
+
request: dict = {
|
690
690
|
'symbol': id,
|
691
691
|
'qty': self.amount_to_precision(symbol, amount),
|
692
692
|
'side': side,
|
@@ -762,7 +762,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
762
762
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
763
763
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
764
764
|
"""
|
765
|
-
request = {
|
765
|
+
request: dict = {
|
766
766
|
'order_id': id,
|
767
767
|
}
|
768
768
|
response = await self.traderPrivateDeleteV2OrdersOrderId(self.extend(request, params))
|
@@ -798,7 +798,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
798
798
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
799
799
|
"""
|
800
800
|
await self.load_markets()
|
801
|
-
request = {
|
801
|
+
request: dict = {
|
802
802
|
'order_id': id,
|
803
803
|
}
|
804
804
|
order = await self.traderPrivateGetV2OrdersOrderId(self.extend(request, params))
|
@@ -818,7 +818,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
818
818
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
819
819
|
"""
|
820
820
|
await self.load_markets()
|
821
|
-
request = {
|
821
|
+
request: dict = {
|
822
822
|
'status': 'all',
|
823
823
|
}
|
824
824
|
market = None
|
@@ -887,7 +887,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
887
887
|
:param int [params.until]: the latest time in ms to fetch orders for
|
888
888
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
889
889
|
"""
|
890
|
-
request = {
|
890
|
+
request: dict = {
|
891
891
|
'status': 'open',
|
892
892
|
}
|
893
893
|
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
@@ -903,12 +903,12 @@ class alpaca(Exchange, ImplicitAPI):
|
|
903
903
|
:param int [params.until]: the latest time in ms to fetch orders for
|
904
904
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
905
905
|
"""
|
906
|
-
request = {
|
906
|
+
request: dict = {
|
907
907
|
'status': 'closed',
|
908
908
|
}
|
909
909
|
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
910
910
|
|
911
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
911
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
912
912
|
#
|
913
913
|
# {
|
914
914
|
# "id":"6ecfcc34-4bed-4b53-83ba-c564aa832a81",
|
@@ -991,8 +991,8 @@ class alpaca(Exchange, ImplicitAPI):
|
|
991
991
|
'info': order,
|
992
992
|
}, market)
|
993
993
|
|
994
|
-
def parse_order_status(self, status):
|
995
|
-
statuses = {
|
994
|
+
def parse_order_status(self, status: Str):
|
995
|
+
statuses: dict = {
|
996
996
|
'pending_new': 'open',
|
997
997
|
'accepted': 'open',
|
998
998
|
'new': 'open',
|
@@ -1002,13 +1002,13 @@ class alpaca(Exchange, ImplicitAPI):
|
|
1002
1002
|
}
|
1003
1003
|
return self.safe_string(statuses, status, status)
|
1004
1004
|
|
1005
|
-
def parse_time_in_force(self, timeInForce):
|
1006
|
-
timeInForces = {
|
1005
|
+
def parse_time_in_force(self, timeInForce: Str):
|
1006
|
+
timeInForces: dict = {
|
1007
1007
|
'day': 'Day',
|
1008
1008
|
}
|
1009
1009
|
return self.safe_string(timeInForces, timeInForce, timeInForce)
|
1010
1010
|
|
1011
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1011
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
1012
1012
|
#
|
1013
1013
|
# {
|
1014
1014
|
# "t":"2022-06-14T05:00:00.027869Z",
|