ccxt 4.1.54__py2.py3-none-any.whl → 4.1.56__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +2 -2
- ccxt/abstract/binance.py +1 -0
- ccxt/abstract/binancecoinm.py +1 -0
- ccxt/abstract/binanceus.py +1 -0
- ccxt/abstract/binanceusdm.py +1 -0
- ccxt/abstract/bitbank.py +1 -0
- ccxt/abstract/coinbase.py +2 -0
- ccxt/abstract/htx.py +3 -0
- ccxt/abstract/huobi.py +3 -0
- ccxt/abstract/huobipro.py +3 -0
- ccxt/abstract/okex.py +3 -1
- ccxt/abstract/okex5.py +3 -1
- ccxt/abstract/okx.py +3 -1
- ccxt/ace.py +23 -23
- ccxt/alpaca.py +8 -8
- ccxt/ascendex.py +26 -26
- ccxt/async_support/__init__.py +2 -2
- ccxt/async_support/ace.py +23 -23
- ccxt/async_support/alpaca.py +8 -8
- ccxt/async_support/ascendex.py +26 -26
- ccxt/async_support/base/exchange.py +4 -2216
- ccxt/async_support/bigone.py +21 -24
- ccxt/async_support/binance.py +61 -54
- ccxt/async_support/bingx.py +28 -28
- ccxt/async_support/bit2c.py +9 -9
- ccxt/async_support/bitbank.py +11 -10
- ccxt/async_support/bitbns.py +11 -11
- ccxt/async_support/bitfinex.py +15 -15
- ccxt/async_support/bitfinex2.py +22 -22
- ccxt/async_support/bitflyer.py +13 -13
- ccxt/async_support/bitforex.py +10 -10
- ccxt/async_support/bitget.py +44 -44
- ccxt/async_support/bithumb.py +9 -9
- ccxt/async_support/bitmart.py +85 -104
- ccxt/async_support/bitmex.py +27 -27
- ccxt/async_support/bitopro.py +18 -18
- ccxt/async_support/bitpanda.py +18 -18
- ccxt/async_support/bitrue.py +14 -14
- ccxt/async_support/bitso.py +17 -17
- ccxt/async_support/bitstamp.py +17 -17
- ccxt/async_support/bittrex.py +22 -24
- ccxt/async_support/bitvavo.py +15 -15
- ccxt/async_support/bl3p.py +4 -4
- ccxt/async_support/blockchaincom.py +17 -17
- ccxt/async_support/btcalpha.py +14 -14
- ccxt/async_support/btcbox.py +9 -9
- ccxt/async_support/btcmarkets.py +17 -17
- ccxt/async_support/btcturk.py +9 -9
- ccxt/async_support/bybit.py +46 -46
- ccxt/async_support/cex.py +10 -10
- ccxt/async_support/coinbase.py +69 -25
- ccxt/async_support/coinbasepro.py +19 -19
- ccxt/async_support/coincheck.py +10 -10
- ccxt/async_support/coinex.py +57 -66
- ccxt/async_support/coinlist.py +22 -22
- ccxt/async_support/coinmate.py +10 -10
- ccxt/async_support/coinone.py +10 -10
- ccxt/async_support/coinsph.py +17 -17
- ccxt/async_support/coinspot.py +5 -5
- ccxt/async_support/cryptocom.py +27 -27
- ccxt/async_support/currencycom.py +18 -18
- ccxt/async_support/delta.py +21 -21
- ccxt/async_support/deribit.py +24 -24
- ccxt/async_support/digifinex.py +35 -35
- ccxt/async_support/exmo.py +19 -19
- ccxt/async_support/gate.py +38 -38
- ccxt/async_support/gemini.py +11 -11
- ccxt/async_support/hitbtc.py +27 -27
- ccxt/async_support/hollaex.py +19 -19
- ccxt/async_support/htx.py +47 -44
- ccxt/async_support/huobijp.py +22 -22
- ccxt/async_support/idex.py +20 -20
- ccxt/async_support/independentreserve.py +9 -9
- ccxt/async_support/indodax.py +10 -10
- ccxt/async_support/kraken.py +25 -25
- ccxt/async_support/krakenfutures.py +17 -17
- ccxt/async_support/kucoin.py +27 -27
- ccxt/async_support/kucoinfutures.py +20 -20
- ccxt/async_support/kuna.py +19 -19
- ccxt/async_support/latoken.py +14 -14
- ccxt/async_support/lbank.py +18 -18
- ccxt/async_support/luno.py +14 -14
- ccxt/async_support/lykke.py +12 -12
- ccxt/async_support/mercado.py +11 -11
- ccxt/async_support/mexc.py +36 -36
- ccxt/async_support/ndax.py +18 -18
- ccxt/async_support/novadax.py +17 -17
- ccxt/async_support/oceanex.py +12 -12
- ccxt/async_support/okcoin.py +19 -19
- ccxt/async_support/okx.py +48 -45
- ccxt/async_support/p2b.py +6 -6
- ccxt/async_support/paymium.py +6 -6
- ccxt/async_support/phemex.py +57 -57
- ccxt/async_support/poloniex.py +31 -30
- ccxt/async_support/poloniexfutures.py +16 -16
- ccxt/async_support/probit.py +22 -22
- ccxt/async_support/tidex.py +15 -15
- ccxt/async_support/timex.py +20 -20
- ccxt/async_support/tokocrypto.py +16 -16
- ccxt/async_support/upbit.py +15 -15
- ccxt/async_support/wavesexchange.py +12 -12
- ccxt/async_support/wazirx.py +13 -13
- ccxt/async_support/whitebit.py +26 -26
- ccxt/async_support/woo.py +47 -47
- ccxt/async_support/yobit.py +8 -8
- ccxt/async_support/zaif.py +10 -10
- ccxt/async_support/zonda.py +16 -16
- ccxt/base/errors.py +17 -16
- ccxt/base/exchange.py +57 -97
- ccxt/base/types.py +138 -139
- ccxt/bigone.py +21 -24
- ccxt/binance.py +61 -54
- ccxt/bingx.py +28 -28
- ccxt/bit2c.py +9 -9
- ccxt/bitbank.py +11 -10
- ccxt/bitbns.py +11 -11
- ccxt/bitfinex.py +15 -15
- ccxt/bitfinex2.py +22 -22
- ccxt/bitflyer.py +13 -13
- ccxt/bitforex.py +10 -10
- ccxt/bitget.py +44 -44
- ccxt/bithumb.py +9 -9
- ccxt/bitmart.py +85 -104
- ccxt/bitmex.py +27 -27
- ccxt/bitopro.py +18 -18
- ccxt/bitpanda.py +18 -18
- ccxt/bitrue.py +14 -14
- ccxt/bitso.py +17 -17
- ccxt/bitstamp.py +17 -17
- ccxt/bittrex.py +22 -24
- ccxt/bitvavo.py +15 -15
- ccxt/bl3p.py +4 -4
- ccxt/blockchaincom.py +17 -17
- ccxt/btcalpha.py +14 -14
- ccxt/btcbox.py +9 -9
- ccxt/btcmarkets.py +17 -17
- ccxt/btcturk.py +9 -9
- ccxt/bybit.py +46 -46
- ccxt/cex.py +10 -10
- ccxt/coinbase.py +69 -25
- ccxt/coinbasepro.py +19 -19
- ccxt/coincheck.py +10 -10
- ccxt/coinex.py +57 -66
- ccxt/coinlist.py +22 -22
- ccxt/coinmate.py +10 -10
- ccxt/coinone.py +10 -10
- ccxt/coinsph.py +17 -17
- ccxt/coinspot.py +5 -5
- ccxt/cryptocom.py +27 -27
- ccxt/currencycom.py +18 -18
- ccxt/delta.py +21 -21
- ccxt/deribit.py +24 -24
- ccxt/digifinex.py +35 -35
- ccxt/exmo.py +19 -19
- ccxt/gate.py +38 -38
- ccxt/gemini.py +11 -11
- ccxt/hitbtc.py +27 -27
- ccxt/hollaex.py +19 -19
- ccxt/htx.py +47 -44
- ccxt/huobijp.py +22 -22
- ccxt/idex.py +20 -20
- ccxt/independentreserve.py +9 -9
- ccxt/indodax.py +10 -10
- ccxt/kraken.py +25 -25
- ccxt/krakenfutures.py +17 -17
- ccxt/kucoin.py +27 -27
- ccxt/kucoinfutures.py +20 -20
- ccxt/kuna.py +19 -19
- ccxt/latoken.py +14 -14
- ccxt/lbank.py +18 -18
- ccxt/luno.py +14 -14
- ccxt/lykke.py +12 -12
- ccxt/mercado.py +11 -11
- ccxt/mexc.py +36 -36
- ccxt/ndax.py +18 -18
- ccxt/novadax.py +17 -17
- ccxt/oceanex.py +12 -12
- ccxt/okcoin.py +19 -19
- ccxt/okx.py +48 -45
- ccxt/p2b.py +6 -6
- ccxt/paymium.py +6 -6
- ccxt/phemex.py +57 -57
- ccxt/poloniex.py +31 -30
- ccxt/poloniexfutures.py +16 -16
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +3 -3
- ccxt/pro/ascendex.py +2 -2
- ccxt/pro/binance.py +9 -9
- ccxt/pro/bingx.py +3 -3
- ccxt/pro/bitfinex.py +3 -3
- ccxt/pro/bitfinex2.py +3 -3
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bitmart.py +2 -2
- ccxt/pro/bitmex.py +3 -3
- ccxt/pro/bitpanda.py +3 -3
- ccxt/pro/bitrue.py +2 -2
- ccxt/pro/bitstamp.py +2 -2
- ccxt/pro/bittrex.py +3 -3
- ccxt/pro/bitvavo.py +3 -3
- ccxt/pro/blockchaincom.py +2 -2
- ccxt/pro/bybit.py +4 -4
- ccxt/pro/cex.py +3 -3
- ccxt/pro/coinbasepro.py +3 -3
- ccxt/pro/coinex.py +2 -2
- ccxt/pro/cryptocom.py +5 -5
- ccxt/pro/deribit.py +3 -3
- ccxt/pro/exmo.py +2 -2
- ccxt/pro/gate.py +3 -3
- ccxt/pro/gemini.py +2 -2
- ccxt/pro/hitbtc.py +4 -4
- ccxt/pro/hollaex.py +3 -3
- ccxt/pro/htx.py +3 -3
- ccxt/pro/idex.py +3 -3
- ccxt/pro/kraken.py +7 -7
- ccxt/pro/krakenfutures.py +4 -4
- ccxt/pro/kucoin.py +3 -3
- ccxt/pro/kucoinfutures.py +3 -3
- ccxt/pro/mexc.py +3 -3
- ccxt/pro/okcoin.py +2 -2
- ccxt/pro/okx.py +6 -6
- ccxt/pro/phemex.py +3 -3
- ccxt/pro/poloniex.py +3 -3
- ccxt/pro/poloniexfutures.py +3 -3
- ccxt/pro/probit.py +3 -3
- ccxt/pro/wazirx.py +3 -3
- ccxt/pro/whitebit.py +3 -3
- ccxt/pro/woo.py +2 -2
- ccxt/probit.py +22 -22
- ccxt/test/base/test_shared_methods.py +3 -3
- ccxt/test/test_async.py +543 -535
- ccxt/test/test_sync.py +542 -534
- ccxt/tidex.py +15 -15
- ccxt/timex.py +20 -20
- ccxt/tokocrypto.py +16 -16
- ccxt/upbit.py +15 -15
- ccxt/wavesexchange.py +12 -12
- ccxt/wazirx.py +13 -13
- ccxt/whitebit.py +26 -26
- ccxt/woo.py +47 -47
- ccxt/yobit.py +8 -8
- ccxt/zaif.py +10 -10
- ccxt/zonda.py +16 -16
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/METADATA +10 -8
- ccxt-4.1.56.dist-info/RECORD +449 -0
- ccxt/async_support/bitstamp1.py +0 -402
- ccxt/async_support/lbank2.py +0 -2620
- ccxt/bitstamp1.py +0 -402
- ccxt/lbank2.py +0 -2619
- ccxt-4.1.54.dist-info/RECORD +0 -453
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/WHEEL +0 -0
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/top_level.txt +0 -0
ccxt/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 Balances, Int, Order, OrderBook, OrderRequest, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Num, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -603,7 +603,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
603
603
|
minQty = self.safe_number(market, 'minQty')
|
604
604
|
maxQty = self.safe_number(market, 'maxQty')
|
605
605
|
minPrice = self.safe_number(market, 'tickSize')
|
606
|
-
maxPrice = None
|
606
|
+
maxPrice: Num = None
|
607
607
|
underlying = self.safe_string_2(market, 'underlying', 'symbol')
|
608
608
|
parts = underlying.split('/')
|
609
609
|
baseId = self.safe_string(parts, 0)
|
@@ -914,7 +914,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
914
914
|
result['nonce'] = self.safe_integer(orderbook, 'seqnum')
|
915
915
|
return result
|
916
916
|
|
917
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
917
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
918
918
|
#
|
919
919
|
# {
|
920
920
|
# "symbol":"QTUM/BTC",
|
@@ -1039,7 +1039,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1039
1039
|
return self.parse_tickers([data], symbols)
|
1040
1040
|
return self.parse_tickers(data, symbols)
|
1041
1041
|
|
1042
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1042
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1043
1043
|
#
|
1044
1044
|
# {
|
1045
1045
|
# "m":"bar",
|
@@ -1119,7 +1119,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1119
1119
|
data = self.safe_value(response, 'data', [])
|
1120
1120
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
1121
1121
|
|
1122
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
1122
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1123
1123
|
#
|
1124
1124
|
# public fetchTrades
|
1125
1125
|
#
|
@@ -1200,7 +1200,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1200
1200
|
}
|
1201
1201
|
return self.safe_string(statuses, status, status)
|
1202
1202
|
|
1203
|
-
def parse_order(self, order, market=None) -> Order:
|
1203
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1204
1204
|
#
|
1205
1205
|
# createOrder
|
1206
1206
|
#
|
@@ -1672,7 +1672,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1672
1672
|
info = self.safe_value(data, 'info', [])
|
1673
1673
|
return self.parse_orders(info, market)
|
1674
1674
|
|
1675
|
-
def fetch_order(self, id: str, symbol:
|
1675
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1676
1676
|
"""
|
1677
1677
|
fetches information on an order made by the user
|
1678
1678
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -1777,7 +1777,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1777
1777
|
data = self.safe_value(response, 'data', {})
|
1778
1778
|
return self.parse_order(data, market)
|
1779
1779
|
|
1780
|
-
def fetch_open_orders(self, symbol:
|
1780
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1781
1781
|
"""
|
1782
1782
|
fetch all unfilled currently open orders
|
1783
1783
|
:param str symbol: unified market symbol
|
@@ -1891,7 +1891,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1891
1891
|
orders.append(order)
|
1892
1892
|
return self.filter_by_symbol_since_limit(orders, symbol, since, limit)
|
1893
1893
|
|
1894
|
-
def fetch_closed_orders(self, symbol:
|
1894
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1895
1895
|
"""
|
1896
1896
|
fetches information on multiple closed orders made by the user
|
1897
1897
|
:see: https://ascendex.github.io/ascendex-pro-api/#list-history-orders-v2
|
@@ -2043,7 +2043,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2043
2043
|
data = self.safe_value(data, 'data', [])
|
2044
2044
|
return self.parse_orders(data, market, since, limit)
|
2045
2045
|
|
2046
|
-
def cancel_order(self, id: str, symbol:
|
2046
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
2047
2047
|
"""
|
2048
2048
|
cancels an open order
|
2049
2049
|
:param str id: order id
|
@@ -2153,7 +2153,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2153
2153
|
order = self.safe_value_2(data, 'order', 'info', {})
|
2154
2154
|
return self.parse_order(order, market)
|
2155
2155
|
|
2156
|
-
def cancel_all_orders(self, symbol:
|
2156
|
+
def cancel_all_orders(self, symbol: Str = None, params={}):
|
2157
2157
|
"""
|
2158
2158
|
cancel all open orders
|
2159
2159
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
@@ -2226,7 +2226,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2226
2226
|
#
|
2227
2227
|
return response
|
2228
2228
|
|
2229
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
2229
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
2230
2230
|
#
|
2231
2231
|
# {
|
2232
2232
|
# "address": "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722",
|
@@ -2339,7 +2339,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2339
2339
|
'info': response,
|
2340
2340
|
})
|
2341
2341
|
|
2342
|
-
def fetch_deposits(self, code:
|
2342
|
+
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2343
2343
|
"""
|
2344
2344
|
fetch all deposits made to an account
|
2345
2345
|
:param str code: unified currency code
|
@@ -2353,7 +2353,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2353
2353
|
}
|
2354
2354
|
return self.fetch_transactions(code, since, limit, self.extend(request, params))
|
2355
2355
|
|
2356
|
-
def fetch_withdrawals(self, code:
|
2356
|
+
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2357
2357
|
"""
|
2358
2358
|
fetch all withdrawals made from an account
|
2359
2359
|
:param str code: unified currency code
|
@@ -2367,7 +2367,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2367
2367
|
}
|
2368
2368
|
return self.fetch_transactions(code, since, limit, self.extend(request, params))
|
2369
2369
|
|
2370
|
-
def fetch_deposits_withdrawals(self, code:
|
2370
|
+
def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2371
2371
|
"""
|
2372
2372
|
fetch history of deposits and withdrawals
|
2373
2373
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
@@ -2432,7 +2432,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2432
2432
|
}
|
2433
2433
|
return self.safe_string(statuses, status, status)
|
2434
2434
|
|
2435
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
2435
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2436
2436
|
#
|
2437
2437
|
# {
|
2438
2438
|
# "requestId": "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB",
|
@@ -2549,7 +2549,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2549
2549
|
symbols = self.market_symbols(symbols)
|
2550
2550
|
return self.filter_by_array_positions(result, 'symbol', symbols, False)
|
2551
2551
|
|
2552
|
-
def parse_position(self, position, market=None):
|
2552
|
+
def parse_position(self, position, market: Market = None):
|
2553
2553
|
#
|
2554
2554
|
# {
|
2555
2555
|
# "symbol": "BTC-PERP",
|
@@ -2611,7 +2611,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2611
2611
|
'takeProfitPrice': self.safe_number(position, 'takeProfitPrice'),
|
2612
2612
|
})
|
2613
2613
|
|
2614
|
-
def parse_funding_rate(self, contract, market=None):
|
2614
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
2615
2615
|
#
|
2616
2616
|
# {
|
2617
2617
|
# "time": 1640061364830,
|
@@ -2714,7 +2714,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2714
2714
|
'type': type,
|
2715
2715
|
})
|
2716
2716
|
|
2717
|
-
def parse_margin_modification(self, data, market=None):
|
2717
|
+
def parse_margin_modification(self, data, market: Market = None):
|
2718
2718
|
errorCode = self.safe_string(data, 'code')
|
2719
2719
|
status = 'ok' if (errorCode == '0') else 'failed'
|
2720
2720
|
return {
|
@@ -2746,7 +2746,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2746
2746
|
"""
|
2747
2747
|
return self.modify_margin_helper(symbol, amount, 'add', params)
|
2748
2748
|
|
2749
|
-
def set_leverage(self, leverage, symbol:
|
2749
|
+
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
2750
2750
|
"""
|
2751
2751
|
set the level of leverage for a market
|
2752
2752
|
:see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-contract-leverage
|
@@ -2772,7 +2772,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2772
2772
|
}
|
2773
2773
|
return self.v2PrivateAccountGroupPostFuturesLeverage(self.extend(request, params))
|
2774
2774
|
|
2775
|
-
def set_margin_mode(self, marginMode, symbol:
|
2775
|
+
def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
|
2776
2776
|
"""
|
2777
2777
|
set margin mode to 'cross' or 'isolated'
|
2778
2778
|
:see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-margin-type
|
@@ -2842,7 +2842,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2842
2842
|
symbols = self.market_symbols(symbols)
|
2843
2843
|
return self.parse_leverage_tiers(data, symbols, 'symbol')
|
2844
2844
|
|
2845
|
-
def parse_market_leverage_tiers(self, info, market=None):
|
2845
|
+
def parse_market_leverage_tiers(self, info, market: Market = None):
|
2846
2846
|
"""
|
2847
2847
|
:param dict info: Exchange market response for 1 market
|
2848
2848
|
:param dict market: CCXT market
|
@@ -2888,7 +2888,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2888
2888
|
})
|
2889
2889
|
return tiers
|
2890
2890
|
|
2891
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
2891
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
2892
2892
|
#
|
2893
2893
|
# {
|
2894
2894
|
# "assetCode": "USDT",
|
@@ -2991,7 +2991,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
2991
2991
|
transfer['currency'] = code
|
2992
2992
|
return transfer
|
2993
2993
|
|
2994
|
-
def parse_transfer(self, transfer, currency=None):
|
2994
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
2995
2995
|
#
|
2996
2996
|
# {"code": "0"}
|
2997
2997
|
#
|
@@ -3015,7 +3015,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3015
3015
|
return 'ok'
|
3016
3016
|
return 'failed'
|
3017
3017
|
|
3018
|
-
def fetch_funding_history(self, symbol:
|
3018
|
+
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3019
3019
|
"""
|
3020
3020
|
fetch the history of funding payments paid and received on self account
|
3021
3021
|
:see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#funding-payment-history
|
@@ -3066,7 +3066,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
3066
3066
|
rows = self.safe_value(data, 'data', [])
|
3067
3067
|
return self.parse_incomes(rows, market, since, limit)
|
3068
3068
|
|
3069
|
-
def parse_income(self, income, market=None):
|
3069
|
+
def parse_income(self, income, market: Market = None):
|
3070
3070
|
#
|
3071
3071
|
# {
|
3072
3072
|
# "timestamp": 1640476800000,
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.1.
|
7
|
+
__version__ = '4.1.56'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -46,6 +46,7 @@ from ccxt.base.errors import OrderNotFillable # noqa: F4
|
|
46
46
|
from ccxt.base.errors import DuplicateOrderId # noqa: F401
|
47
47
|
from ccxt.base.errors import ContractUnavailable # noqa: F401
|
48
48
|
from ccxt.base.errors import NotSupported # noqa: F401
|
49
|
+
from ccxt.base.errors import OperationFailed # noqa: F401
|
49
50
|
from ccxt.base.errors import NetworkError # noqa: F401
|
50
51
|
from ccxt.base.errors import DDoSProtection # noqa: F401
|
51
52
|
from ccxt.base.errors import RateLimitExceeded # noqa: F401
|
@@ -53,7 +54,6 @@ from ccxt.base.errors import ExchangeNotAvailable # noqa: F4
|
|
53
54
|
from ccxt.base.errors import OnMaintenance # noqa: F401
|
54
55
|
from ccxt.base.errors import InvalidNonce # noqa: F401
|
55
56
|
from ccxt.base.errors import RequestTimeout # noqa: F401
|
56
|
-
from ccxt.base.errors import OperationFailed # noqa: F401
|
57
57
|
from ccxt.base.errors import error_hierarchy # noqa: F401
|
58
58
|
|
59
59
|
|
ccxt/async_support/ace.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.ace import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
8
|
+
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import BadRequest
|
11
11
|
from ccxt.base.errors import InsufficientFunds
|
@@ -249,7 +249,7 @@ class ace(Exchange, ImplicitAPI):
|
|
249
249
|
'info': market,
|
250
250
|
}
|
251
251
|
|
252
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
252
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
253
253
|
#
|
254
254
|
# {
|
255
255
|
# "base_volume":229196.34035399999,
|
@@ -393,7 +393,7 @@ class ace(Exchange, ImplicitAPI):
|
|
393
393
|
orderBook = self.safe_value(response, 'attachment')
|
394
394
|
return self.parse_order_book(orderBook, market['symbol'], None, 'bids', 'asks')
|
395
395
|
|
396
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
396
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
397
397
|
#
|
398
398
|
# {
|
399
399
|
# "changeRate": 0,
|
@@ -475,7 +475,7 @@ class ace(Exchange, ImplicitAPI):
|
|
475
475
|
}
|
476
476
|
return self.safe_string(statuses, status, None)
|
477
477
|
|
478
|
-
def parse_order(self, order, market=None) -> Order:
|
478
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
479
479
|
#
|
480
480
|
# createOrder
|
481
481
|
# "15697850529570392100421100482693"
|
@@ -502,17 +502,17 @@ class ace(Exchange, ImplicitAPI):
|
|
502
502
|
# "type": 1
|
503
503
|
# }
|
504
504
|
#
|
505
|
-
id
|
506
|
-
timestamp = None
|
507
|
-
symbol = None
|
508
|
-
price = None
|
509
|
-
amount = None
|
510
|
-
side = None
|
511
|
-
type = None
|
512
|
-
status = None
|
513
|
-
filled = None
|
514
|
-
remaining = None
|
515
|
-
average = None
|
505
|
+
id: Str
|
506
|
+
timestamp: Int = None
|
507
|
+
symbol: Str = None
|
508
|
+
price: Str = None
|
509
|
+
amount: Str = None
|
510
|
+
side: Str = None
|
511
|
+
type: Str = None
|
512
|
+
status: Str = None
|
513
|
+
filled: Str = None
|
514
|
+
remaining: Str = None
|
515
|
+
average: Str = None
|
516
516
|
if isinstance(order, str):
|
517
517
|
id = order
|
518
518
|
else:
|
@@ -600,7 +600,7 @@ class ace(Exchange, ImplicitAPI):
|
|
600
600
|
data = self.safe_value(response, 'attachment')
|
601
601
|
return self.parse_order(data, market)
|
602
602
|
|
603
|
-
async def cancel_order(self, id: str, symbol:
|
603
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
604
604
|
"""
|
605
605
|
cancels an open order
|
606
606
|
:see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---cancel-order
|
@@ -624,7 +624,7 @@ class ace(Exchange, ImplicitAPI):
|
|
624
624
|
#
|
625
625
|
return response
|
626
626
|
|
627
|
-
async def fetch_order(self, id: str, symbol:
|
627
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
628
628
|
"""
|
629
629
|
fetches information on an order made by the user
|
630
630
|
:see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-status
|
@@ -662,7 +662,7 @@ class ace(Exchange, ImplicitAPI):
|
|
662
662
|
data = self.safe_value(response, 'attachment')
|
663
663
|
return self.parse_order(data, None)
|
664
664
|
|
665
|
-
async def fetch_open_orders(self, symbol:
|
665
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
666
666
|
"""
|
667
667
|
fetch all unfilled currently open orders
|
668
668
|
:see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-list
|
@@ -715,7 +715,7 @@ class ace(Exchange, ImplicitAPI):
|
|
715
715
|
#
|
716
716
|
return self.parse_orders(orders, market, since, limit)
|
717
717
|
|
718
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
718
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
719
719
|
#
|
720
720
|
# fetchOrderTrades
|
721
721
|
# {
|
@@ -762,8 +762,8 @@ class ace(Exchange, ImplicitAPI):
|
|
762
762
|
baseId = self.safe_string(trade, 'baseCurrencyName')
|
763
763
|
if quoteId is not None and baseId is not None:
|
764
764
|
symbol = baseId + '/' + quoteId
|
765
|
-
side = None
|
766
|
-
tradeSide = self.
|
765
|
+
side: Str = None
|
766
|
+
tradeSide = self.safe_integer(trade, 'buyOrSell')
|
767
767
|
if tradeSide is not None:
|
768
768
|
side = 'buy' if (tradeSide == 1) else 'sell'
|
769
769
|
feeString = self.safe_string(trade, 'fee')
|
@@ -790,7 +790,7 @@ class ace(Exchange, ImplicitAPI):
|
|
790
790
|
'datetime': self.iso8601(timestamp),
|
791
791
|
}, market)
|
792
792
|
|
793
|
-
async def fetch_order_trades(self, id: str, symbol:
|
793
|
+
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
794
794
|
"""
|
795
795
|
fetch all the trades made from a single order
|
796
796
|
:see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-history
|
@@ -844,7 +844,7 @@ class ace(Exchange, ImplicitAPI):
|
|
844
844
|
trades = self.safe_value(data, 'trades', [])
|
845
845
|
return self.parse_trades(trades, market, since, limit)
|
846
846
|
|
847
|
-
async def fetch_my_trades(self, symbol:
|
847
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
848
848
|
"""
|
849
849
|
fetch all trades made by the user
|
850
850
|
:see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---trade-list
|
ccxt/async_support/alpaca.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.alpaca import ImplicitAPI
|
8
|
-
from ccxt.base.types import Int, Market, Order, OrderBook, OrderSide, OrderType,
|
8
|
+
from ccxt.base.types import Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Trade
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import PermissionDenied
|
@@ -470,7 +470,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
470
470
|
ohlcvs = self.safe_value(bars, market['id'], {})
|
471
471
|
return self.parse_ohlcvs(ohlcvs, market, timeframe, since, limit)
|
472
472
|
|
473
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
473
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
474
474
|
#
|
475
475
|
# {
|
476
476
|
# "c":22895,
|
@@ -576,7 +576,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
576
576
|
#
|
577
577
|
return self.parse_order(order, market)
|
578
578
|
|
579
|
-
async def cancel_order(self, id: str, symbol:
|
579
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
580
580
|
"""
|
581
581
|
cancels an open order
|
582
582
|
:param str id: order id
|
@@ -596,7 +596,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
596
596
|
#
|
597
597
|
return self.safe_value(response, 'message', {})
|
598
598
|
|
599
|
-
async def fetch_order(self, id: str, symbol:
|
599
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
600
600
|
"""
|
601
601
|
fetches information on an order made by the user
|
602
602
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -612,7 +612,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
612
612
|
market = self.safe_market(marketId)
|
613
613
|
return self.parse_order(order, market)
|
614
614
|
|
615
|
-
async def fetch_open_orders(self, symbol:
|
615
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
616
616
|
"""
|
617
617
|
fetch all unfilled currently open orders
|
618
618
|
:param str symbol: unified market symbol
|
@@ -628,7 +628,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
628
628
|
orders = await self.privateGetOrders(params)
|
629
629
|
return self.parse_orders(orders, market, since, limit)
|
630
630
|
|
631
|
-
def parse_order(self, order, market=None) -> Order:
|
631
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
632
632
|
#
|
633
633
|
# {
|
634
634
|
# "id":"6ecfcc34-4bed-4b53-83ba-c564aa832a81",
|
@@ -727,7 +727,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
727
727
|
}
|
728
728
|
return self.safe_string(timeInForces, timeInForce, timeInForce)
|
729
729
|
|
730
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
730
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
731
731
|
#
|
732
732
|
# {
|
733
733
|
# "t":"2022-06-14T05:00:00.027869Z",
|
@@ -743,7 +743,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
743
743
|
datetime = self.safe_string(trade, 't')
|
744
744
|
timestamp = self.parse8601(datetime)
|
745
745
|
alpacaSide = self.safe_string(trade, 'tks')
|
746
|
-
side
|
746
|
+
side: str
|
747
747
|
if alpacaSide == 'B':
|
748
748
|
side = 'buy'
|
749
749
|
elif alpacaSide == 'S':
|