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/bitfinex2.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex2 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
|
@@ -893,7 +893,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
893
893
|
raise ExchangeError(self.id + ' ' + message)
|
894
894
|
return self.parse_transfer(response, currency)
|
895
895
|
|
896
|
-
def parse_transfer(self, transfer, currency=None):
|
896
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
897
897
|
#
|
898
898
|
# transfer
|
899
899
|
#
|
@@ -1006,7 +1006,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1006
1006
|
result['asks'] = self.sort_by(result['asks'], 0)
|
1007
1007
|
return result
|
1008
1008
|
|
1009
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
1009
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
1010
1010
|
#
|
1011
1011
|
# on trading pairs(ex. tBTCUSD)
|
1012
1012
|
#
|
@@ -1155,7 +1155,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1155
1155
|
ticker = await self.publicGetTickerSymbol(self.extend(request, params))
|
1156
1156
|
return self.parse_ticker(ticker, market)
|
1157
1157
|
|
1158
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
1158
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1159
1159
|
#
|
1160
1160
|
# fetchTrades(public)
|
1161
1161
|
#
|
@@ -1317,7 +1317,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1317
1317
|
#
|
1318
1318
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
1319
1319
|
|
1320
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1320
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1321
1321
|
#
|
1322
1322
|
# [
|
1323
1323
|
# 1457539800000,
|
@@ -1378,7 +1378,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1378
1378
|
}
|
1379
1379
|
return self.safe_string(orderTypes, orderType, 'GTC')
|
1380
1380
|
|
1381
|
-
def parse_order(self, order, market=None) -> Order:
|
1381
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1382
1382
|
id = self.safe_string(order, 0)
|
1383
1383
|
marketId = self.safe_string(order, 3)
|
1384
1384
|
symbol = self.safe_symbol(marketId)
|
@@ -1587,7 +1587,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1587
1587
|
order = self.safe_value(orders, 0)
|
1588
1588
|
return self.parse_order(order, market)
|
1589
1589
|
|
1590
|
-
async def cancel_all_orders(self, symbol:
|
1590
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1591
1591
|
"""
|
1592
1592
|
cancel all open orders
|
1593
1593
|
:see: https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
|
@@ -1602,7 +1602,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1602
1602
|
orders = self.safe_value(response, 4, [])
|
1603
1603
|
return self.parse_orders(orders)
|
1604
1604
|
|
1605
|
-
async def cancel_order(self, id: str, symbol:
|
1605
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1606
1606
|
"""
|
1607
1607
|
cancels an open order
|
1608
1608
|
:see: https://docs.bitfinex.com/reference/rest-auth-cancel-order
|
@@ -1630,7 +1630,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1630
1630
|
order = self.safe_value(response, 4)
|
1631
1631
|
return self.parse_order(order)
|
1632
1632
|
|
1633
|
-
async def fetch_open_order(self, id: str, symbol:
|
1633
|
+
async def fetch_open_order(self, id: str, symbol: Str = None, params={}):
|
1634
1634
|
"""
|
1635
1635
|
fetch an open order by it's id
|
1636
1636
|
:see: https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
@@ -1649,7 +1649,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1649
1649
|
raise OrderNotFound(self.id + ' order ' + id + ' not found')
|
1650
1650
|
return order
|
1651
1651
|
|
1652
|
-
async def fetch_closed_order(self, id: str, symbol:
|
1652
|
+
async def fetch_closed_order(self, id: str, symbol: Str = None, params={}):
|
1653
1653
|
"""
|
1654
1654
|
fetch an open order by it's id
|
1655
1655
|
:see: https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
@@ -1668,7 +1668,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1668
1668
|
raise OrderNotFound(self.id + ' order ' + id + ' not found')
|
1669
1669
|
return order
|
1670
1670
|
|
1671
|
-
async def fetch_open_orders(self, symbol:
|
1671
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1672
1672
|
"""
|
1673
1673
|
fetch all unfilled currently open orders
|
1674
1674
|
:see: https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
@@ -1729,7 +1729,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1729
1729
|
#
|
1730
1730
|
return self.parse_orders(response, market, since, limit)
|
1731
1731
|
|
1732
|
-
async def fetch_closed_orders(self, symbol:
|
1732
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1733
1733
|
"""
|
1734
1734
|
fetches information on multiple closed orders made by the user
|
1735
1735
|
:see: https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
@@ -1802,7 +1802,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1802
1802
|
#
|
1803
1803
|
return self.parse_orders(response, market, since, limit)
|
1804
1804
|
|
1805
|
-
async def fetch_order_trades(self, id: str, symbol:
|
1805
|
+
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1806
1806
|
"""
|
1807
1807
|
fetch all the trades made from a single order
|
1808
1808
|
:see: https://docs.bitfinex.com/reference/rest-auth-order-trades
|
@@ -1825,7 +1825,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1825
1825
|
response = await self.privatePostAuthROrderSymbolIdTrades(self.extend(request, params))
|
1826
1826
|
return self.parse_trades(response, market, since, limit)
|
1827
1827
|
|
1828
|
-
async def fetch_my_trades(self, symbol:
|
1828
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1829
1829
|
"""
|
1830
1830
|
fetch all trades made by the user
|
1831
1831
|
:see: https://docs.bitfinex.com/reference/rest-auth-trades
|
@@ -1941,7 +1941,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1941
1941
|
}
|
1942
1942
|
return self.safe_string(statuses, status, status)
|
1943
1943
|
|
1944
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1944
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1945
1945
|
#
|
1946
1946
|
# withdraw
|
1947
1947
|
#
|
@@ -2180,7 +2180,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2180
2180
|
result[symbol] = fee
|
2181
2181
|
return result
|
2182
2182
|
|
2183
|
-
async def fetch_deposits_withdrawals(self, code:
|
2183
|
+
async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2184
2184
|
"""
|
2185
2185
|
fetch history of deposits and withdrawals
|
2186
2186
|
:see: https://docs.bitfinex.com/reference/movement-info
|
@@ -2365,7 +2365,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2365
2365
|
#
|
2366
2366
|
return self.parse_positions(response, symbols)
|
2367
2367
|
|
2368
|
-
def parse_position(self, position, market=None):
|
2368
|
+
def parse_position(self, position, market: Market = None):
|
2369
2369
|
#
|
2370
2370
|
# [
|
2371
2371
|
# "tBTCUSD", # SYMBOL
|
@@ -2504,7 +2504,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2504
2504
|
else:
|
2505
2505
|
return type
|
2506
2506
|
|
2507
|
-
def parse_ledger_entry(self, item, currency=None):
|
2507
|
+
def parse_ledger_entry(self, item, currency: Currency = None):
|
2508
2508
|
#
|
2509
2509
|
# [
|
2510
2510
|
# [
|
@@ -2550,7 +2550,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2550
2550
|
'info': item,
|
2551
2551
|
}
|
2552
2552
|
|
2553
|
-
async def fetch_ledger(self, code:
|
2553
|
+
async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
2554
2554
|
"""
|
2555
2555
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
2556
2556
|
:see: https://docs.bitfinex.com/reference/rest-auth-ledgers
|
@@ -2657,7 +2657,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2657
2657
|
#
|
2658
2658
|
return self.parse_funding_rates(response)
|
2659
2659
|
|
2660
|
-
async def fetch_funding_rate_history(self, symbol:
|
2660
|
+
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2661
2661
|
"""
|
2662
2662
|
fetches historical funding rate prices
|
2663
2663
|
:see: https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
|
@@ -2718,7 +2718,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2718
2718
|
rates.append(rate)
|
2719
2719
|
return self.filter_by_symbol_since_limit(rates, symbol, since, limit)
|
2720
2720
|
|
2721
|
-
def parse_funding_rate(self, contract, market=None):
|
2721
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
2722
2722
|
#
|
2723
2723
|
# [
|
2724
2724
|
# "tBTCF0:USTF0",
|
@@ -2770,7 +2770,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2770
2770
|
'previousFundingDatetime': None,
|
2771
2771
|
}
|
2772
2772
|
|
2773
|
-
def parse_funding_rate_history(self, contract, market=None):
|
2773
|
+
def parse_funding_rate_history(self, contract, market: Market = None):
|
2774
2774
|
#
|
2775
2775
|
# [
|
2776
2776
|
# 1691165494000,
|
ccxt/async_support/bitflyer.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitflyer 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, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -351,7 +351,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
351
351
|
orderbook = await self.publicGetGetboard(self.extend(request, params))
|
352
352
|
return self.parse_order_book(orderbook, market['symbol'], None, 'bids', 'asks', 'price', 'size')
|
353
353
|
|
354
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
354
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
355
355
|
symbol = self.safe_symbol(None, market)
|
356
356
|
timestamp = self.parse8601(self.safe_string(ticker, 'timestamp'))
|
357
357
|
last = self.safe_string(ticker, 'ltp')
|
@@ -394,7 +394,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
394
394
|
response = await self.publicGetGetticker(self.extend(request, params))
|
395
395
|
return self.parse_ticker(response, market)
|
396
396
|
|
397
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
397
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
398
398
|
#
|
399
399
|
# fetchTrades(public) v1
|
400
400
|
#
|
@@ -541,7 +541,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
541
541
|
'info': result,
|
542
542
|
})
|
543
543
|
|
544
|
-
async def cancel_order(self, id: str, symbol:
|
544
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
545
545
|
"""
|
546
546
|
cancels an open order
|
547
547
|
:see: https://lightning.bitflyer.com/docs?lang=en#cancel-order
|
@@ -568,7 +568,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
568
568
|
}
|
569
569
|
return self.safe_string(statuses, status, status)
|
570
570
|
|
571
|
-
def parse_order(self, order, market=None) -> Order:
|
571
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
572
572
|
timestamp = self.parse8601(self.safe_string(order, 'child_order_date'))
|
573
573
|
price = self.safe_string(order, 'price')
|
574
574
|
amount = self.safe_string(order, 'size')
|
@@ -613,7 +613,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
613
613
|
'trades': None,
|
614
614
|
}, market)
|
615
615
|
|
616
|
-
async def fetch_orders(self, symbol:
|
616
|
+
async def fetch_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
|
617
617
|
"""
|
618
618
|
fetches information on multiple orders made by the user
|
619
619
|
:see: https://lightning.bitflyer.com/docs?lang=en#list-orders
|
@@ -636,7 +636,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
636
636
|
orders = self.filter_by(orders, 'symbol', symbol)
|
637
637
|
return orders
|
638
638
|
|
639
|
-
async def fetch_open_orders(self, symbol:
|
639
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
|
640
640
|
"""
|
641
641
|
fetch all unfilled currently open orders
|
642
642
|
:see: https://lightning.bitflyer.com/docs?lang=en#list-orders
|
@@ -651,7 +651,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
651
651
|
}
|
652
652
|
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
653
653
|
|
654
|
-
async def fetch_closed_orders(self, symbol:
|
654
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
|
655
655
|
"""
|
656
656
|
fetches information on multiple closed orders made by the user
|
657
657
|
:see: https://lightning.bitflyer.com/docs?lang=en#list-orders
|
@@ -666,7 +666,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
666
666
|
}
|
667
667
|
return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
|
668
668
|
|
669
|
-
async def fetch_order(self, id: str, symbol:
|
669
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
670
670
|
"""
|
671
671
|
fetches information on an order made by the user
|
672
672
|
:see: https://lightning.bitflyer.com/docs?lang=en#list-orders
|
@@ -681,7 +681,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
681
681
|
return ordersById[id]
|
682
682
|
raise OrderNotFound(self.id + ' No order found with id ' + id)
|
683
683
|
|
684
|
-
async def fetch_my_trades(self, symbol:
|
684
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
685
685
|
"""
|
686
686
|
fetch all trades made by the user
|
687
687
|
:see: https://lightning.bitflyer.com/docs?lang=en#list-executions
|
@@ -780,7 +780,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
780
780
|
#
|
781
781
|
return self.parse_transaction(response, currency)
|
782
782
|
|
783
|
-
async def fetch_deposits(self, code:
|
783
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
784
784
|
"""
|
785
785
|
fetch all deposits made to an account
|
786
786
|
:see: https://lightning.bitflyer.com/docs?lang=en#get-crypto-assets-deposit-history
|
@@ -814,7 +814,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
814
814
|
#
|
815
815
|
return self.parse_transactions(response, currency, since, limit)
|
816
816
|
|
817
|
-
async def fetch_withdrawals(self, code:
|
817
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
818
818
|
"""
|
819
819
|
fetch all withdrawals made from an account
|
820
820
|
:see: https://lightning.bitflyer.com/docs?lang=en#get-crypto-assets-transaction-history
|
@@ -864,7 +864,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
864
864
|
}
|
865
865
|
return self.safe_string(statuses, status, status)
|
866
866
|
|
867
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
867
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
868
868
|
#
|
869
869
|
# fetchDeposits
|
870
870
|
#
|
ccxt/async_support/bitforex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitforex 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.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -267,7 +267,7 @@ class bitforex(Exchange, ImplicitAPI):
|
|
267
267
|
})
|
268
268
|
return result
|
269
269
|
|
270
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
270
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
271
271
|
#
|
272
272
|
# fetchTrades(public) v1
|
273
273
|
#
|
@@ -372,7 +372,7 @@ class bitforex(Exchange, ImplicitAPI):
|
|
372
372
|
#
|
373
373
|
return self.parse_trades(response['data'], market, since, limit)
|
374
374
|
|
375
|
-
async def fetch_my_trades(self, symbol:
|
375
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
376
376
|
"""
|
377
377
|
fetch all trades made by the user
|
378
378
|
:see: https://apidoc.bitforex.com/#spot-account-trade
|
@@ -451,7 +451,7 @@ class bitforex(Exchange, ImplicitAPI):
|
|
451
451
|
response = await self.privatePostApiV1FundAllAccount(params)
|
452
452
|
return self.parse_balance(response)
|
453
453
|
|
454
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
454
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
455
455
|
#
|
456
456
|
# {
|
457
457
|
# "buy":7.04E-7,
|
@@ -520,7 +520,7 @@ class bitforex(Exchange, ImplicitAPI):
|
|
520
520
|
#
|
521
521
|
return self.parse_ticker(ticker, market)
|
522
522
|
|
523
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
523
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
524
524
|
#
|
525
525
|
# {
|
526
526
|
# "close":0.02505143,
|
@@ -614,7 +614,7 @@ class bitforex(Exchange, ImplicitAPI):
|
|
614
614
|
else:
|
615
615
|
return None
|
616
616
|
|
617
|
-
def parse_order(self, order, market=None) -> Order:
|
617
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
618
618
|
id = self.safe_string(order, 'orderId')
|
619
619
|
timestamp = self.safe_number(order, 'createTime')
|
620
620
|
lastTradeTimestamp = self.safe_number(order, 'lastTime')
|
@@ -658,7 +658,7 @@ class bitforex(Exchange, ImplicitAPI):
|
|
658
658
|
'trades': None,
|
659
659
|
}, market)
|
660
660
|
|
661
|
-
async def fetch_order(self, id: str, symbol:
|
661
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
662
662
|
"""
|
663
663
|
fetches information on an order made by the user
|
664
664
|
:see: https://apidoc.bitforex.com/#order-information-user_data
|
@@ -676,7 +676,7 @@ class bitforex(Exchange, ImplicitAPI):
|
|
676
676
|
order = self.parse_order(response['data'], market)
|
677
677
|
return order
|
678
678
|
|
679
|
-
async def fetch_open_orders(self, symbol:
|
679
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
680
680
|
"""
|
681
681
|
fetch all unfilled currently open orders
|
682
682
|
:param str symbol: unified market symbol
|
@@ -695,7 +695,7 @@ class bitforex(Exchange, ImplicitAPI):
|
|
695
695
|
response = await self.privatePostApiV1TradeOrderInfos(self.extend(request, params))
|
696
696
|
return self.parse_orders(response['data'], market, since, limit)
|
697
697
|
|
698
|
-
async def fetch_closed_orders(self, symbol:
|
698
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
699
699
|
"""
|
700
700
|
fetches information on multiple closed orders made by the user
|
701
701
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -746,7 +746,7 @@ class bitforex(Exchange, ImplicitAPI):
|
|
746
746
|
'id': self.safe_string(data, 'orderId'),
|
747
747
|
}, market)
|
748
748
|
|
749
|
-
async def cancel_order(self, id: str, symbol:
|
749
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
750
750
|
"""
|
751
751
|
cancels an open order
|
752
752
|
:see: https://apidoc.bitforex.com/#cancel-order-trade
|