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
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.blockchaincom import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType,
|
8
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -389,7 +389,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
389
389
|
response = await self.publicGetL2Symbol(self.extend(request, params))
|
390
390
|
return self.parse_order_book(response, market['symbol'], None, 'bids', 'asks', 'px', 'qty')
|
391
391
|
|
392
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
392
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
393
393
|
#
|
394
394
|
# {
|
395
395
|
# "symbol": "BTC-USD",
|
@@ -463,7 +463,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
463
463
|
}
|
464
464
|
return self.safe_string(states, state, state)
|
465
465
|
|
466
|
-
def parse_order(self, order, market=None) -> Order:
|
466
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
467
467
|
#
|
468
468
|
# {
|
469
469
|
# "clOrdId": "00001",
|
@@ -570,7 +570,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
570
570
|
response = await self.privatePostOrders(self.extend(request, params))
|
571
571
|
return self.parse_order(response, market)
|
572
572
|
|
573
|
-
async def cancel_order(self, id: str, symbol:
|
573
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
574
574
|
"""
|
575
575
|
cancels an open order
|
576
576
|
:param str id: order id
|
@@ -587,7 +587,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
587
587
|
'info': response,
|
588
588
|
}
|
589
589
|
|
590
|
-
async def cancel_all_orders(self, symbol:
|
590
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
591
591
|
"""
|
592
592
|
cancel all open orders
|
593
593
|
:param str symbol: unified market symbol of the market to cancel orders in, all markets are used if None, default is None
|
@@ -637,7 +637,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
637
637
|
}
|
638
638
|
return result
|
639
639
|
|
640
|
-
async def fetch_canceled_orders(self, symbol:
|
640
|
+
async def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
641
641
|
"""
|
642
642
|
fetches information on multiple canceled orders made by the user
|
643
643
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -649,7 +649,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
649
649
|
state = 'CANCELED'
|
650
650
|
return await self.fetch_orders_by_state(state, symbol, since, limit, params)
|
651
651
|
|
652
|
-
async def fetch_closed_orders(self, symbol:
|
652
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
653
653
|
"""
|
654
654
|
fetches information on multiple closed orders made by the user
|
655
655
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -661,7 +661,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
661
661
|
state = 'FILLED'
|
662
662
|
return await self.fetch_orders_by_state(state, symbol, since, limit, params)
|
663
663
|
|
664
|
-
async def fetch_open_orders(self, symbol:
|
664
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
665
665
|
"""
|
666
666
|
fetch all unfilled currently open orders
|
667
667
|
:param str symbol: unified market symbol
|
@@ -673,7 +673,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
673
673
|
state = 'OPEN'
|
674
674
|
return await self.fetch_orders_by_state(state, symbol, since, limit, params)
|
675
675
|
|
676
|
-
async def fetch_orders_by_state(self, state, symbol:
|
676
|
+
async def fetch_orders_by_state(self, state, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
677
677
|
await self.load_markets()
|
678
678
|
request = {
|
679
679
|
# 'to': unix epoch ms
|
@@ -688,7 +688,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
688
688
|
response = await self.privateGetOrders(self.extend(request, params))
|
689
689
|
return self.parse_orders(response, market, since, limit)
|
690
690
|
|
691
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
691
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
692
692
|
#
|
693
693
|
# {
|
694
694
|
# "exOrdId":281685751028507,
|
@@ -733,7 +733,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
733
733
|
'info': trade,
|
734
734
|
}, market)
|
735
735
|
|
736
|
-
async def fetch_my_trades(self, symbol:
|
736
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
737
737
|
"""
|
738
738
|
fetch all trades made by the user
|
739
739
|
:param str symbol: unified market symbol
|
@@ -789,7 +789,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
789
789
|
}
|
790
790
|
return self.safe_string(states, state, state)
|
791
791
|
|
792
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
792
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
793
793
|
#
|
794
794
|
# deposit
|
795
795
|
#
|
@@ -926,7 +926,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
926
926
|
#
|
927
927
|
return self.parse_transaction(response, currency)
|
928
928
|
|
929
|
-
async def fetch_withdrawals(self, code:
|
929
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
930
930
|
"""
|
931
931
|
fetch all withdrawals made from an account
|
932
932
|
:param str code: unified currency code
|
@@ -948,7 +948,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
948
948
|
response = await self.privateGetWithdrawals(self.extend(request, params))
|
949
949
|
return self.parse_transactions(response, currency, since, limit)
|
950
950
|
|
951
|
-
async def fetch_withdrawal(self, id: str, code:
|
951
|
+
async def fetch_withdrawal(self, id: str, code: Str = None, params={}):
|
952
952
|
"""
|
953
953
|
fetch data on a currency withdrawal via the withdrawal id
|
954
954
|
:param str id: withdrawal id
|
@@ -963,7 +963,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
963
963
|
response = await self.privateGetWithdrawalsWithdrawalId(self.extend(request, params))
|
964
964
|
return self.parse_transaction(response)
|
965
965
|
|
966
|
-
async def fetch_deposits(self, code:
|
966
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
967
967
|
"""
|
968
968
|
fetch all deposits made to an account
|
969
969
|
:param str code: unified currency code
|
@@ -985,7 +985,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
985
985
|
response = await self.privateGetDeposits(self.extend(request, params))
|
986
986
|
return self.parse_transactions(response, currency, since, limit)
|
987
987
|
|
988
|
-
async def fetch_deposit(self, id: str, code:
|
988
|
+
async def fetch_deposit(self, id: str, code: Str = None, params={}):
|
989
989
|
"""
|
990
990
|
fetch information on a deposit
|
991
991
|
:param str id: deposit id
|
@@ -1043,7 +1043,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
1043
1043
|
result[code] = account
|
1044
1044
|
return self.safe_balance(result)
|
1045
1045
|
|
1046
|
-
async def fetch_order(self, id: str, symbol:
|
1046
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1047
1047
|
"""
|
1048
1048
|
fetches information on an order made by the user
|
1049
1049
|
:param str symbol: not used by blockchaincom fetchOrder
|
ccxt/async_support/btcalpha.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.btcalpha import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Market, 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 InsufficientFunds
|
@@ -291,7 +291,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
291
291
|
#
|
292
292
|
return self.parse_ticker(response, market)
|
293
293
|
|
294
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
294
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
295
295
|
#
|
296
296
|
# {
|
297
297
|
# "timestamp": "1674658.445272",
|
@@ -361,7 +361,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
361
361
|
result.append(self.parse_bid_ask(bidask, priceKey, amountKey))
|
362
362
|
return result
|
363
363
|
|
364
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
364
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
365
365
|
#
|
366
366
|
# fetchTrades(public)
|
367
367
|
#
|
@@ -430,7 +430,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
430
430
|
trades = await self.publicGetExchanges(self.extend(request, params))
|
431
431
|
return self.parse_trades(trades, market, since, limit)
|
432
432
|
|
433
|
-
async def fetch_deposits(self, code:
|
433
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
434
434
|
"""
|
435
435
|
fetch all deposits made to an account
|
436
436
|
:param str code: unified currency code
|
@@ -456,7 +456,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
456
456
|
#
|
457
457
|
return self.parse_transactions(response, currency, since, limit, {'type': 'deposit'})
|
458
458
|
|
459
|
-
async def fetch_withdrawals(self, code:
|
459
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
460
460
|
"""
|
461
461
|
fetch all withdrawals made from an account
|
462
462
|
:param str code: unified currency code
|
@@ -485,7 +485,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
485
485
|
#
|
486
486
|
return self.parse_transactions(response, currency, since, limit, {'type': 'withdrawal'})
|
487
487
|
|
488
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
488
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
489
489
|
#
|
490
490
|
# deposit
|
491
491
|
# {
|
@@ -540,7 +540,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
540
540
|
}
|
541
541
|
return self.safe_string(statuses, status, status)
|
542
542
|
|
543
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
543
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
544
544
|
#
|
545
545
|
# {
|
546
546
|
# "time":1591296000,
|
@@ -620,7 +620,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
620
620
|
}
|
621
621
|
return self.safe_string(statuses, status, status)
|
622
622
|
|
623
|
-
def parse_order(self, order, market=None) -> Order:
|
623
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
624
624
|
#
|
625
625
|
# fetchClosedOrders / fetchOrder
|
626
626
|
# {
|
@@ -722,7 +722,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
722
722
|
order['amount'] = self.parse_number(amount)
|
723
723
|
return order
|
724
724
|
|
725
|
-
async def cancel_order(self, id: str, symbol:
|
725
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
726
726
|
"""
|
727
727
|
:see: https://btc-alpha.github.io/api-docs/#cancel-order
|
728
728
|
cancels an open order
|
@@ -737,7 +737,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
737
737
|
response = await self.privatePostOrderCancel(self.extend(request, params))
|
738
738
|
return response
|
739
739
|
|
740
|
-
async def fetch_order(self, id: str, symbol:
|
740
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
741
741
|
"""
|
742
742
|
:see: https://btc-alpha.github.io/api-docs/#retrieve-single-order
|
743
743
|
fetches information on an order made by the user
|
@@ -752,7 +752,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
752
752
|
order = await self.privateGetOrderId(self.extend(request, params))
|
753
753
|
return self.parse_order(order)
|
754
754
|
|
755
|
-
async def fetch_orders(self, symbol:
|
755
|
+
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
756
756
|
"""
|
757
757
|
:see: https://btc-alpha.github.io/api-docs/#list-own-orders
|
758
758
|
fetches information on multiple orders made by the user
|
@@ -773,7 +773,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
773
773
|
orders = await self.privateGetOrdersOwn(self.extend(request, params))
|
774
774
|
return self.parse_orders(orders, market, since, limit)
|
775
775
|
|
776
|
-
async def fetch_open_orders(self, symbol:
|
776
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
777
777
|
"""
|
778
778
|
fetch all unfilled currently open orders
|
779
779
|
:param str symbol: unified market symbol
|
@@ -787,7 +787,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
787
787
|
}
|
788
788
|
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
789
789
|
|
790
|
-
async def fetch_closed_orders(self, symbol:
|
790
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
791
791
|
"""
|
792
792
|
fetches information on multiple closed orders made by the user
|
793
793
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -801,7 +801,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
801
801
|
}
|
802
802
|
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
803
803
|
|
804
|
-
async def fetch_my_trades(self, symbol:
|
804
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
805
805
|
"""
|
806
806
|
fetch all trades made by the user
|
807
807
|
:param str symbol: unified market symbol
|
ccxt/async_support/btcbox.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.btcbox import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType,
|
10
|
+
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -173,7 +173,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
173
173
|
response = await self.publicGetDepth(self.extend(request, params))
|
174
174
|
return self.parse_order_book(response, market['symbol'])
|
175
175
|
|
176
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
176
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
177
177
|
timestamp = self.milliseconds()
|
178
178
|
symbol = self.safe_symbol(None, market)
|
179
179
|
last = self.safe_string(ticker, 'last')
|
@@ -216,7 +216,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
216
216
|
response = await self.publicGetTicker(self.extend(request, params))
|
217
217
|
return self.parse_ticker(response, market)
|
218
218
|
|
219
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
219
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
220
220
|
#
|
221
221
|
# fetchTrades(public)
|
222
222
|
#
|
@@ -308,7 +308,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
308
308
|
#
|
309
309
|
return self.parse_order(response, market)
|
310
310
|
|
311
|
-
async def cancel_order(self, id: str, symbol:
|
311
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
312
312
|
"""
|
313
313
|
cancels an open order
|
314
314
|
:param str id: order id
|
@@ -342,7 +342,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
342
342
|
}
|
343
343
|
return self.safe_string(statuses, status, status)
|
344
344
|
|
345
|
-
def parse_order(self, order, market=None) -> Order:
|
345
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
346
346
|
#
|
347
347
|
# {
|
348
348
|
# "id":11,
|
@@ -397,7 +397,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
397
397
|
'average': None,
|
398
398
|
}, market)
|
399
399
|
|
400
|
-
async def fetch_order(self, id: str, symbol:
|
400
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
401
401
|
"""
|
402
402
|
fetches information on an order made by the user
|
403
403
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -428,7 +428,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
428
428
|
#
|
429
429
|
return self.parse_order(response, market)
|
430
430
|
|
431
|
-
async def fetch_orders_by_type(self, type, symbol:
|
431
|
+
async def fetch_orders_by_type(self, type, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
432
432
|
await self.load_markets()
|
433
433
|
# a special case for btcbox – default symbol is BTC/JPY
|
434
434
|
if symbol is None:
|
@@ -459,7 +459,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
459
459
|
orders[i]['status'] = 'open'
|
460
460
|
return orders
|
461
461
|
|
462
|
-
async def fetch_orders(self, symbol:
|
462
|
+
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
463
463
|
"""
|
464
464
|
fetches information on multiple orders made by the user
|
465
465
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -470,7 +470,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
470
470
|
"""
|
471
471
|
return await self.fetch_orders_by_type('all', symbol, since, limit, params)
|
472
472
|
|
473
|
-
async def fetch_open_orders(self, symbol:
|
473
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
474
474
|
"""
|
475
475
|
fetch all unfilled currently open orders
|
476
476
|
:param str symbol: unified market symbol
|
ccxt/async_support/btcmarkets.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.btcmarkets import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -178,7 +178,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
178
178
|
},
|
179
179
|
})
|
180
180
|
|
181
|
-
async def fetch_transactions_with_method(self, method, code:
|
181
|
+
async def fetch_transactions_with_method(self, method, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
182
182
|
await self.load_markets()
|
183
183
|
request = {}
|
184
184
|
if limit is not None:
|
@@ -191,7 +191,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
191
191
|
response = await getattr(self, method)(self.extend(request, params))
|
192
192
|
return self.parse_transactions(response, currency, since, limit)
|
193
193
|
|
194
|
-
async def fetch_deposits_withdrawals(self, code:
|
194
|
+
async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
195
195
|
"""
|
196
196
|
fetch history of deposits and withdrawals
|
197
197
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
@@ -202,7 +202,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
202
202
|
"""
|
203
203
|
return await self.fetch_transactions_with_method('privateGetTransfers', code, since, limit, params)
|
204
204
|
|
205
|
-
async def fetch_deposits(self, code:
|
205
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
206
206
|
"""
|
207
207
|
fetch all deposits made to an account
|
208
208
|
:param str code: unified currency code
|
@@ -213,7 +213,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
213
213
|
"""
|
214
214
|
return await self.fetch_transactions_with_method('privateGetDeposits', code, since, limit, params)
|
215
215
|
|
216
|
-
async def fetch_withdrawals(self, code:
|
216
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
217
217
|
"""
|
218
218
|
fetch all withdrawals made from an account
|
219
219
|
:param str code: unified currency code
|
@@ -241,7 +241,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
241
241
|
}
|
242
242
|
return self.safe_string(statuses, type, type)
|
243
243
|
|
244
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
244
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
245
245
|
#
|
246
246
|
# {
|
247
247
|
# "id": "6500230339",
|
@@ -464,7 +464,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
464
464
|
response = await self.privateGetAccountsMeBalances(params)
|
465
465
|
return self.parse_balance(response)
|
466
466
|
|
467
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
467
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
468
468
|
#
|
469
469
|
# [
|
470
470
|
# "2020-09-12T18:30:00.000000Z",
|
@@ -554,7 +554,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
554
554
|
orderbook['nonce'] = self.safe_integer(response, 'snapshotId')
|
555
555
|
return orderbook
|
556
556
|
|
557
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
557
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
558
558
|
#
|
559
559
|
# fetchTicker
|
560
560
|
#
|
@@ -643,7 +643,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
643
643
|
response = await self.publicGetMarketsMarketIdTicker(self.extend(request, params))
|
644
644
|
return self.parse_ticker(response, market)
|
645
645
|
|
646
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
646
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
647
647
|
#
|
648
648
|
# public fetchTrades
|
649
649
|
#
|
@@ -819,7 +819,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
819
819
|
#
|
820
820
|
return self.parse_order(response, market)
|
821
821
|
|
822
|
-
async def cancel_orders(self, ids, symbol:
|
822
|
+
async def cancel_orders(self, ids, symbol: Str = None, params={}):
|
823
823
|
"""
|
824
824
|
cancel multiple orders
|
825
825
|
:param str[] ids: order ids
|
@@ -835,7 +835,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
835
835
|
}
|
836
836
|
return await self.privateDeleteBatchordersIds(self.extend(request, params))
|
837
837
|
|
838
|
-
async def cancel_order(self, id: str, symbol:
|
838
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
839
839
|
"""
|
840
840
|
cancels an open order
|
841
841
|
:param str id: order id
|
@@ -883,7 +883,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
883
883
|
}
|
884
884
|
return self.safe_string(statuses, status, status)
|
885
885
|
|
886
|
-
def parse_order(self, order, market=None) -> Order:
|
886
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
887
887
|
#
|
888
888
|
# createOrder
|
889
889
|
#
|
@@ -948,7 +948,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
948
948
|
'fee': None,
|
949
949
|
}, market)
|
950
950
|
|
951
|
-
async def fetch_order(self, id: str, symbol:
|
951
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
952
952
|
"""
|
953
953
|
fetches information on an order made by the user
|
954
954
|
:param str symbol: not used by btcmarkets fetchOrder
|
@@ -962,7 +962,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
962
962
|
response = await self.privateGetOrdersId(self.extend(request, params))
|
963
963
|
return self.parse_order(response)
|
964
964
|
|
965
|
-
async def fetch_orders(self, symbol:
|
965
|
+
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
966
966
|
"""
|
967
967
|
fetches information on multiple orders made by the user
|
968
968
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -986,7 +986,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
986
986
|
response = await self.privateGetOrders(self.extend(request, params))
|
987
987
|
return self.parse_orders(response, market, since, limit)
|
988
988
|
|
989
|
-
async def fetch_open_orders(self, symbol:
|
989
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
990
990
|
"""
|
991
991
|
fetch all unfilled currently open orders
|
992
992
|
:param str symbol: unified market symbol
|
@@ -998,7 +998,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
998
998
|
request = {'status': 'open'}
|
999
999
|
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
1000
1000
|
|
1001
|
-
async def fetch_closed_orders(self, symbol:
|
1001
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1002
1002
|
"""
|
1003
1003
|
fetches information on multiple closed orders made by the user
|
1004
1004
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1010,7 +1010,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
1010
1010
|
orders = await self.fetch_orders(symbol, since, limit, params)
|
1011
1011
|
return self.filter_by(orders, 'status', 'closed')
|
1012
1012
|
|
1013
|
-
async def fetch_my_trades(self, symbol:
|
1013
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1014
1014
|
"""
|
1015
1015
|
fetch all trades made by the user
|
1016
1016
|
:param str symbol: unified market symbol
|
ccxt/async_support/btcturk.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.btcturk import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import math
|
10
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
10
|
+
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import BadRequest
|
@@ -341,7 +341,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
341
341
|
timestamp = self.safe_integer(data, 'timestamp')
|
342
342
|
return self.parse_order_book(data, market['symbol'], timestamp, 'bids', 'asks', 0, 1)
|
343
343
|
|
344
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
344
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
345
345
|
#
|
346
346
|
# {
|
347
347
|
# "pair": "BTCTRY",
|
@@ -413,7 +413,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
413
413
|
tickers = await self.fetch_tickers([symbol], params)
|
414
414
|
return self.safe_value(tickers, symbol)
|
415
415
|
|
416
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
416
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
417
417
|
#
|
418
418
|
# fetchTrades
|
419
419
|
# {
|
@@ -512,7 +512,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
512
512
|
data = self.safe_value(response, 'data')
|
513
513
|
return self.parse_trades(data, market, since, limit)
|
514
514
|
|
515
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
515
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
516
516
|
#
|
517
517
|
# {
|
518
518
|
# "timestamp": 1661990400,
|
@@ -654,7 +654,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
654
654
|
data = self.safe_value(response, 'data')
|
655
655
|
return self.parse_order(data, market)
|
656
656
|
|
657
|
-
async def cancel_order(self, id: str, symbol:
|
657
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
658
658
|
"""
|
659
659
|
cancels an open order
|
660
660
|
:param str id: order id
|
@@ -667,7 +667,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
667
667
|
}
|
668
668
|
return await self.privateDeleteOrder(self.extend(request, params))
|
669
669
|
|
670
|
-
async def fetch_open_orders(self, symbol:
|
670
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
671
671
|
"""
|
672
672
|
fetch all unfilled currently open orders
|
673
673
|
:param str symbol: unified market symbol
|
@@ -688,7 +688,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
688
688
|
asks = self.safe_value(data, 'asks', [])
|
689
689
|
return self.parse_orders(self.array_concat(bids, asks), market, since, limit)
|
690
690
|
|
691
|
-
async def fetch_orders(self, symbol:
|
691
|
+
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
692
692
|
"""
|
693
693
|
fetches information on multiple orders made by the user
|
694
694
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -740,7 +740,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
740
740
|
}
|
741
741
|
return self.safe_string(statuses, status, status)
|
742
742
|
|
743
|
-
def parse_order(self, order, market=None) -> Order:
|
743
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
744
744
|
#
|
745
745
|
# fetchOrders / fetchOpenOrders
|
746
746
|
# {
|
@@ -806,7 +806,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
806
806
|
'fee': None,
|
807
807
|
}, market)
|
808
808
|
|
809
|
-
async def fetch_my_trades(self, symbol:
|
809
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
810
810
|
"""
|
811
811
|
fetch all trades made by the user
|
812
812
|
:param str symbol: unified market symbol
|