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/async_support/huobijp.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.huobijp import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, 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
|
@@ -385,7 +385,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
385
385
|
#
|
386
386
|
return self.parse_trading_limits(self.safe_value(response, 'data', {}))
|
387
387
|
|
388
|
-
def parse_trading_limits(self, limits, symbol:
|
388
|
+
def parse_trading_limits(self, limits, symbol: Str = None, params={}):
|
389
389
|
#
|
390
390
|
# { symbol: "aidocbtc",
|
391
391
|
# "buy-limit-must-less-than": 1.1,
|
@@ -525,7 +525,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
525
525
|
})
|
526
526
|
return result
|
527
527
|
|
528
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
528
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
529
529
|
#
|
530
530
|
# fetchTicker
|
531
531
|
#
|
@@ -714,7 +714,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
714
714
|
result[symbol] = ticker
|
715
715
|
return self.filter_by_array_tickers(result, 'symbol', symbols)
|
716
716
|
|
717
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
717
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
718
718
|
#
|
719
719
|
# fetchTrades(public)
|
720
720
|
#
|
@@ -792,7 +792,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
792
792
|
'fee': fee,
|
793
793
|
})
|
794
794
|
|
795
|
-
async def fetch_order_trades(self, id: str, symbol:
|
795
|
+
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
796
796
|
"""
|
797
797
|
fetch all the trades made from a single order
|
798
798
|
:param str id: order id
|
@@ -809,7 +809,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
809
809
|
response = await self.privateGetOrderOrdersIdMatchresults(self.extend(request, params))
|
810
810
|
return self.parse_trades(response['data'], None, since, limit)
|
811
811
|
|
812
|
-
async def fetch_my_trades(self, symbol:
|
812
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
813
813
|
"""
|
814
814
|
fetch all trades made by the user
|
815
815
|
:param str symbol: unified market symbol
|
@@ -883,7 +883,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
883
883
|
result = self.sort_by(result, 'timestamp')
|
884
884
|
return self.filter_by_symbol_since_limit(result, market['symbol'], since, limit)
|
885
885
|
|
886
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
886
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
887
887
|
#
|
888
888
|
# {
|
889
889
|
# "amount":1.2082,
|
@@ -1078,7 +1078,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1078
1078
|
response = await getattr(self, method)(self.extend(request, params))
|
1079
1079
|
return self.parse_balance(response)
|
1080
1080
|
|
1081
|
-
async def fetch_orders_by_states(self, states, symbol:
|
1081
|
+
async def fetch_orders_by_states(self, states, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1082
1082
|
await self.load_markets()
|
1083
1083
|
request = {
|
1084
1084
|
'states': states,
|
@@ -1108,7 +1108,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1108
1108
|
#
|
1109
1109
|
return self.parse_orders(response['data'], market, since, limit)
|
1110
1110
|
|
1111
|
-
async def fetch_order(self, id: str, symbol:
|
1111
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1112
1112
|
"""
|
1113
1113
|
fetches information on an order made by the user
|
1114
1114
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -1123,7 +1123,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1123
1123
|
order = self.safe_value(response, 'data')
|
1124
1124
|
return self.parse_order(order)
|
1125
1125
|
|
1126
|
-
async def fetch_orders(self, symbol:
|
1126
|
+
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1127
1127
|
"""
|
1128
1128
|
fetches information on multiple orders made by the user
|
1129
1129
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1134,7 +1134,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1134
1134
|
"""
|
1135
1135
|
return await self.fetch_orders_by_states('pre-submitted,submitted,partial-filled,filled,partial-canceled,canceled', symbol, since, limit, params)
|
1136
1136
|
|
1137
|
-
async def fetch_open_orders(self, symbol:
|
1137
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1138
1138
|
"""
|
1139
1139
|
fetch all unfilled currently open orders
|
1140
1140
|
:param str symbol: unified market symbol
|
@@ -1146,11 +1146,11 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1146
1146
|
method = self.safe_string(self.options, 'fetchOpenOrdersMethod', 'fetch_open_orders_v1')
|
1147
1147
|
return await getattr(self, method)(symbol, since, limit, params)
|
1148
1148
|
|
1149
|
-
async def fetch_open_orders_v1(self, symbol:
|
1149
|
+
async def fetch_open_orders_v1(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1150
1150
|
self.check_required_symbol('fetchOpenOrdersV1', symbol)
|
1151
1151
|
return await self.fetch_orders_by_states('pre-submitted,submitted,partial-filled', symbol, since, limit, params)
|
1152
1152
|
|
1153
|
-
async def fetch_closed_orders(self, symbol:
|
1153
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1154
1154
|
"""
|
1155
1155
|
fetches information on multiple closed orders made by the user
|
1156
1156
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1161,7 +1161,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1161
1161
|
"""
|
1162
1162
|
return await self.fetch_orders_by_states('filled,partial-canceled,canceled', symbol, since, limit, params)
|
1163
1163
|
|
1164
|
-
async def fetch_open_orders_v2(self, symbol:
|
1164
|
+
async def fetch_open_orders_v2(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1165
1165
|
await self.load_markets()
|
1166
1166
|
request = {}
|
1167
1167
|
market = None
|
@@ -1217,7 +1217,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1217
1217
|
}
|
1218
1218
|
return self.safe_string(statuses, status, status)
|
1219
1219
|
|
1220
|
-
def parse_order(self, order, market=None) -> Order:
|
1220
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1221
1221
|
#
|
1222
1222
|
# { id: 13997833014,
|
1223
1223
|
# "symbol": "ethbtc",
|
@@ -1372,7 +1372,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1372
1372
|
'average': None,
|
1373
1373
|
}, market)
|
1374
1374
|
|
1375
|
-
async def cancel_order(self, id: str, symbol:
|
1375
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1376
1376
|
"""
|
1377
1377
|
cancels an open order
|
1378
1378
|
:param str id: order id
|
@@ -1392,7 +1392,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1392
1392
|
'status': 'canceled',
|
1393
1393
|
})
|
1394
1394
|
|
1395
|
-
async def cancel_orders(self, ids, symbol:
|
1395
|
+
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
1396
1396
|
"""
|
1397
1397
|
cancel multiple orders
|
1398
1398
|
:param str[] ids: order ids
|
@@ -1443,7 +1443,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1443
1443
|
#
|
1444
1444
|
return response
|
1445
1445
|
|
1446
|
-
async def cancel_all_orders(self, symbol:
|
1446
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1447
1447
|
"""
|
1448
1448
|
cancel all open orders
|
1449
1449
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
@@ -1486,7 +1486,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1486
1486
|
networksById = {}
|
1487
1487
|
return self.safe_string(networksById, networkId, networkId)
|
1488
1488
|
|
1489
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
1489
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1490
1490
|
#
|
1491
1491
|
# {
|
1492
1492
|
# "currency": "usdt",
|
@@ -1514,7 +1514,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1514
1514
|
'info': depositAddress,
|
1515
1515
|
}
|
1516
1516
|
|
1517
|
-
async def fetch_deposits(self, code:
|
1517
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1518
1518
|
"""
|
1519
1519
|
fetch all deposits made to an account
|
1520
1520
|
:param str code: unified currency code
|
@@ -1541,7 +1541,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1541
1541
|
# return response
|
1542
1542
|
return self.parse_transactions(response['data'], currency, since, limit)
|
1543
1543
|
|
1544
|
-
async def fetch_withdrawals(self, code:
|
1544
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1545
1545
|
"""
|
1546
1546
|
fetch all withdrawals made from an account
|
1547
1547
|
:param str code: unified currency code
|
@@ -1568,7 +1568,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1568
1568
|
# return response
|
1569
1569
|
return self.parse_transactions(response['data'], currency, since, limit)
|
1570
1570
|
|
1571
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1571
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1572
1572
|
#
|
1573
1573
|
# fetchDeposits
|
1574
1574
|
#
|
ccxt/async_support/idex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.idex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, 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 BadRequest
|
@@ -385,7 +385,7 @@ class idex(Exchange, ImplicitAPI):
|
|
385
385
|
response = await self.publicGetTickers(params)
|
386
386
|
return self.parse_tickers(response, symbols)
|
387
387
|
|
388
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
388
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
389
389
|
# {
|
390
390
|
# "market": "DIL-ETH",
|
391
391
|
# "time": 1598367493008,
|
@@ -468,7 +468,7 @@ class idex(Exchange, ImplicitAPI):
|
|
468
468
|
# {"nextTime":1595536440000}
|
469
469
|
return []
|
470
470
|
|
471
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
471
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
472
472
|
# {
|
473
473
|
# "start": 1598345580000,
|
474
474
|
# "open": "0.09771286",
|
@@ -518,7 +518,7 @@ class idex(Exchange, ImplicitAPI):
|
|
518
518
|
response = await self.publicGetTrades(self.extend(request, params))
|
519
519
|
return self.parse_trades(response, market, since, limit)
|
520
520
|
|
521
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
521
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
522
522
|
#
|
523
523
|
# public trades
|
524
524
|
# {
|
@@ -793,7 +793,7 @@ class idex(Exchange, ImplicitAPI):
|
|
793
793
|
raise e
|
794
794
|
return self.parse_balance(response)
|
795
795
|
|
796
|
-
async def fetch_my_trades(self, symbol:
|
796
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
797
797
|
"""
|
798
798
|
fetch all trades made by the user
|
799
799
|
:param str symbol: unified market symbol
|
@@ -851,7 +851,7 @@ class idex(Exchange, ImplicitAPI):
|
|
851
851
|
raise e
|
852
852
|
return self.parse_trades(response, market, since, limit)
|
853
853
|
|
854
|
-
async def fetch_order(self, id: str, symbol:
|
854
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
855
855
|
"""
|
856
856
|
fetches information on an order made by the user
|
857
857
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -863,7 +863,7 @@ class idex(Exchange, ImplicitAPI):
|
|
863
863
|
}
|
864
864
|
return await self.fetch_orders_helper(symbol, None, None, self.extend(request, params))
|
865
865
|
|
866
|
-
async def fetch_open_orders(self, symbol:
|
866
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
867
867
|
"""
|
868
868
|
fetch all unfilled currently open orders
|
869
869
|
:param str symbol: unified market symbol
|
@@ -877,7 +877,7 @@ class idex(Exchange, ImplicitAPI):
|
|
877
877
|
}
|
878
878
|
return await self.fetch_orders_helper(symbol, since, limit, self.extend(request, params))
|
879
879
|
|
880
|
-
async def fetch_closed_orders(self, symbol:
|
880
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
881
881
|
"""
|
882
882
|
fetches information on multiple closed orders made by the user
|
883
883
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -891,7 +891,7 @@ class idex(Exchange, ImplicitAPI):
|
|
891
891
|
}
|
892
892
|
return await self.fetch_orders_helper(symbol, since, limit, self.extend(request, params))
|
893
893
|
|
894
|
-
async def fetch_orders_helper(self, symbol:
|
894
|
+
async def fetch_orders_helper(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
895
895
|
await self.load_markets()
|
896
896
|
request = {
|
897
897
|
'nonce': self.uuidv1(),
|
@@ -982,7 +982,7 @@ class idex(Exchange, ImplicitAPI):
|
|
982
982
|
}
|
983
983
|
return self.safe_string(statuses, status, status)
|
984
984
|
|
985
|
-
def parse_order(self, order, market=None) -> Order:
|
985
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
986
986
|
#
|
987
987
|
# {
|
988
988
|
# "market": "DIL-ETH",
|
@@ -1307,7 +1307,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1307
1307
|
#
|
1308
1308
|
return self.parse_transaction(response, currency)
|
1309
1309
|
|
1310
|
-
async def cancel_all_orders(self, symbol:
|
1310
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1311
1311
|
"""
|
1312
1312
|
cancel all open orders
|
1313
1313
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
@@ -1342,7 +1342,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1342
1342
|
response = await self.privateDeleteOrders(self.extend(request, params))
|
1343
1343
|
return self.parse_orders(response, market)
|
1344
1344
|
|
1345
|
-
async def cancel_order(self, id: str, symbol:
|
1345
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1346
1346
|
"""
|
1347
1347
|
cancels an open order
|
1348
1348
|
:param str id: order id
|
@@ -1388,7 +1388,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1388
1388
|
raise ExchangeError(self.id + ' ' + message)
|
1389
1389
|
return None
|
1390
1390
|
|
1391
|
-
async def fetch_deposit(self, id: str, code:
|
1391
|
+
async def fetch_deposit(self, id: str, code: Str = None, params={}):
|
1392
1392
|
"""
|
1393
1393
|
fetch information on a deposit
|
1394
1394
|
:param str id: deposit id
|
@@ -1404,9 +1404,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1404
1404
|
'depositId': id,
|
1405
1405
|
}
|
1406
1406
|
response = await self.privateGetDeposits(self.extend(request, params))
|
1407
|
-
return self.parse_transaction(response
|
1407
|
+
return self.parse_transaction(response)
|
1408
1408
|
|
1409
|
-
async def fetch_deposits(self, code:
|
1409
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1410
1410
|
"""
|
1411
1411
|
fetch all deposits made to an account
|
1412
1412
|
:param str code: unified currency code
|
@@ -1432,7 +1432,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1432
1432
|
#
|
1433
1433
|
return self.safe_integer(response, 'serverTime')
|
1434
1434
|
|
1435
|
-
async def fetch_withdrawal(self, id: str, code:
|
1435
|
+
async def fetch_withdrawal(self, id: str, code: Str = None, params={}):
|
1436
1436
|
"""
|
1437
1437
|
fetch data on a currency withdrawal via the withdrawal id
|
1438
1438
|
:param str id: withdrawal id
|
@@ -1448,9 +1448,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1448
1448
|
'withdrawalId': id,
|
1449
1449
|
}
|
1450
1450
|
response = await self.privateGetWithdrawals(self.extend(request, params))
|
1451
|
-
return self.parse_transaction(response
|
1451
|
+
return self.parse_transaction(response)
|
1452
1452
|
|
1453
|
-
async def fetch_withdrawals(self, code:
|
1453
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1454
1454
|
"""
|
1455
1455
|
fetch all withdrawals made from an account
|
1456
1456
|
:param str code: unified currency code
|
@@ -1464,7 +1464,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1464
1464
|
}, params)
|
1465
1465
|
return await self.fetch_transactions_helper(code, since, limit, params)
|
1466
1466
|
|
1467
|
-
async def fetch_transactions_helper(self, code:
|
1467
|
+
async def fetch_transactions_helper(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1468
1468
|
await self.load_markets()
|
1469
1469
|
nonce = self.uuidv1()
|
1470
1470
|
request = {
|
@@ -1500,7 +1500,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1500
1500
|
}
|
1501
1501
|
return self.safe_string(statuses, status, status)
|
1502
1502
|
|
1503
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1503
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1504
1504
|
#
|
1505
1505
|
# fetchDeposits
|
1506
1506
|
#
|
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.independentreserve import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
12
12
|
from ccxt.base.precise import Precise
|
@@ -256,7 +256,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
256
256
|
timestamp = self.parse8601(self.safe_string(response, 'CreatedTimestampUtc'))
|
257
257
|
return self.parse_order_book(response, market['symbol'], timestamp, 'BuyOrders', 'SellOrders', 'Price', 'Volume')
|
258
258
|
|
259
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
259
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
260
260
|
# {
|
261
261
|
# "DayHighestPrice":43489.49,
|
262
262
|
# "DayLowestPrice":41998.32,
|
@@ -331,7 +331,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
331
331
|
# }
|
332
332
|
return self.parse_ticker(response, market)
|
333
333
|
|
334
|
-
def parse_order(self, order, market=None) -> Order:
|
334
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
335
335
|
#
|
336
336
|
# fetchOrder
|
337
337
|
#
|
@@ -437,7 +437,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
437
437
|
}
|
438
438
|
return self.safe_string(statuses, status, status)
|
439
439
|
|
440
|
-
async def fetch_order(self, id: str, symbol:
|
440
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
441
441
|
"""
|
442
442
|
fetches information on an order made by the user
|
443
443
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -453,7 +453,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
453
453
|
market = self.market(symbol)
|
454
454
|
return self.parse_order(response, market)
|
455
455
|
|
456
|
-
async def fetch_open_orders(self, symbol:
|
456
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
457
457
|
"""
|
458
458
|
fetch all unfilled currently open orders
|
459
459
|
:param str symbol: unified market symbol
|
@@ -477,7 +477,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
477
477
|
data = self.safe_value(response, 'Data', [])
|
478
478
|
return self.parse_orders(data, market, since, limit)
|
479
479
|
|
480
|
-
async def fetch_closed_orders(self, symbol:
|
480
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
481
481
|
"""
|
482
482
|
fetches information on multiple closed orders made by the user
|
483
483
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -501,7 +501,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
501
501
|
data = self.safe_value(response, 'Data', [])
|
502
502
|
return self.parse_orders(data, market, since, limit)
|
503
503
|
|
504
|
-
async def fetch_my_trades(self, symbol:
|
504
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit=50, params={}):
|
505
505
|
"""
|
506
506
|
fetch all trades made by the user
|
507
507
|
:param str symbol: unified market symbol
|
@@ -524,7 +524,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
524
524
|
market = self.market(symbol)
|
525
525
|
return self.parse_trades(response['Data'], market, since, limit)
|
526
526
|
|
527
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
527
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
528
528
|
timestamp = self.parse8601(trade['TradeTimestampUtc'])
|
529
529
|
id = self.safe_string(trade, 'TradeGuid')
|
530
530
|
orderId = self.safe_string(trade, 'OrderGuid')
|
@@ -653,7 +653,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
653
653
|
'id': response['OrderGuid'],
|
654
654
|
}, market)
|
655
655
|
|
656
|
-
async def cancel_order(self, id: str, symbol:
|
656
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
657
657
|
"""
|
658
658
|
cancels an open order
|
659
659
|
:param str id: order id
|
ccxt/async_support/indodax.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.indodax import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, 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 ArgumentsRequired
|
@@ -364,7 +364,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
364
364
|
orderbook = await self.publicGetPairDepth(self.extend(request, params))
|
365
365
|
return self.parse_order_book(orderbook, market['symbol'], None, 'buy', 'sell')
|
366
366
|
|
367
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
367
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
368
368
|
#
|
369
369
|
# {
|
370
370
|
# "high":"0.01951",
|
@@ -464,7 +464,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
464
464
|
tickers = self.safe_value(response, 'tickers')
|
465
465
|
return self.parse_tickers(tickers, symbols)
|
466
466
|
|
467
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
467
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
468
468
|
timestamp = self.safe_timestamp(trade, 'date')
|
469
469
|
return self.safe_trade({
|
470
470
|
'id': self.safe_string(trade, 'tid'),
|
@@ -507,7 +507,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
507
507
|
}
|
508
508
|
return self.safe_string(statuses, status, status)
|
509
509
|
|
510
|
-
def parse_order(self, order, market=None) -> Order:
|
510
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
511
511
|
#
|
512
512
|
# {
|
513
513
|
# "order_id": "12345",
|
@@ -580,7 +580,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
580
580
|
'trades': None,
|
581
581
|
})
|
582
582
|
|
583
|
-
async def fetch_order(self, id: str, symbol:
|
583
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
584
584
|
"""
|
585
585
|
fetches information on an order made by the user
|
586
586
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -600,7 +600,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
600
600
|
order['info'] = response
|
601
601
|
return order
|
602
602
|
|
603
|
-
async def fetch_open_orders(self, symbol:
|
603
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
604
604
|
"""
|
605
605
|
fetch all unfilled currently open orders
|
606
606
|
:param str symbol: unified market symbol
|
@@ -634,7 +634,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
634
634
|
exchangeOrders = self.array_concat(exchangeOrders, parsedOrders)
|
635
635
|
return exchangeOrders
|
636
636
|
|
637
|
-
async def fetch_closed_orders(self, symbol:
|
637
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
638
638
|
"""
|
639
639
|
fetches information on multiple closed orders made by the user
|
640
640
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -690,7 +690,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
690
690
|
'id': id,
|
691
691
|
}, market)
|
692
692
|
|
693
|
-
async def cancel_order(self, id: str, symbol:
|
693
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
694
694
|
"""
|
695
695
|
cancels an open order
|
696
696
|
:param str id: order id
|
@@ -742,7 +742,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
742
742
|
'currency': self.safe_currency_code(currencyId, currency),
|
743
743
|
}
|
744
744
|
|
745
|
-
async def fetch_deposits_withdrawals(self, code:
|
745
|
+
async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
746
746
|
"""
|
747
747
|
fetch history of deposits and withdrawals
|
748
748
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
@@ -883,7 +883,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
883
883
|
#
|
884
884
|
return self.parse_transaction(response, currency)
|
885
885
|
|
886
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
886
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
887
887
|
#
|
888
888
|
# withdraw
|
889
889
|
#
|