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/bingx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bingx import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType,
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -74,7 +74,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
74
74
|
'fetchTransfers': True,
|
75
75
|
'fetchWithdrawals': True,
|
76
76
|
'setLeverage': True,
|
77
|
-
'
|
77
|
+
'setMargin': True,
|
78
78
|
'setMarginMode': True,
|
79
79
|
'transfer': True,
|
80
80
|
},
|
@@ -693,7 +693,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
693
693
|
ohlcvs = [ohlcvs]
|
694
694
|
return self.parse_ohlcvs(ohlcvs, market, timeframe, since, limit)
|
695
695
|
|
696
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
696
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
697
697
|
#
|
698
698
|
# {
|
699
699
|
# "open": "19394.4",
|
@@ -794,7 +794,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
794
794
|
trades = self.safe_value(response, 'data', [])
|
795
795
|
return self.parse_trades(trades, market, since, limit)
|
796
796
|
|
797
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
797
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
798
798
|
#
|
799
799
|
# spot
|
800
800
|
# fetchTrades
|
@@ -1015,7 +1015,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1015
1015
|
data = self.safe_value(response, 'data', {})
|
1016
1016
|
return self.parse_funding_rate(data, market)
|
1017
1017
|
|
1018
|
-
def parse_funding_rate(self, contract, market=None):
|
1018
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
1019
1019
|
#
|
1020
1020
|
# {
|
1021
1021
|
# "symbol": "BTC-USDT",
|
@@ -1047,7 +1047,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1047
1047
|
'previousFundingDatetime': None,
|
1048
1048
|
}
|
1049
1049
|
|
1050
|
-
async def fetch_funding_rate_history(self, symbol:
|
1050
|
+
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1051
1051
|
"""
|
1052
1052
|
fetches historical funding rate prices
|
1053
1053
|
:see: https://bingx-api.github.io/docs/#/swapV2/market-api.html#Funding%20Rate%20History
|
@@ -1137,7 +1137,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1137
1137
|
data = self.safe_value(response, 'data', {})
|
1138
1138
|
return self.parse_open_interest(data, market)
|
1139
1139
|
|
1140
|
-
def parse_open_interest(self, interest, market=None):
|
1140
|
+
def parse_open_interest(self, interest, market: Market = None):
|
1141
1141
|
#
|
1142
1142
|
# {
|
1143
1143
|
# "openInterest": "3289641547.10",
|
@@ -1267,7 +1267,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1267
1267
|
tickers = self.safe_value(response, 'data')
|
1268
1268
|
return self.parse_tickers(tickers, symbols)
|
1269
1269
|
|
1270
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
1270
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
1271
1271
|
#
|
1272
1272
|
# spot
|
1273
1273
|
# {
|
@@ -1509,7 +1509,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1509
1509
|
positions = self.safe_value(response, 'data', [])
|
1510
1510
|
return self.parse_positions(positions, symbols)
|
1511
1511
|
|
1512
|
-
def parse_position(self, position, market=None):
|
1512
|
+
def parse_position(self, position, market: Market = None):
|
1513
1513
|
#
|
1514
1514
|
# {
|
1515
1515
|
# "symbol": "BTC-USDT",
|
@@ -1830,7 +1830,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1830
1830
|
}
|
1831
1831
|
return self.safe_string(sides, side, side)
|
1832
1832
|
|
1833
|
-
def parse_order(self, order, market=None) -> Order:
|
1833
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1834
1834
|
#
|
1835
1835
|
# spot
|
1836
1836
|
# createOrder, createOrders, cancelOrder
|
@@ -1986,7 +1986,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1986
1986
|
}
|
1987
1987
|
return self.safe_string(statuses, status, status)
|
1988
1988
|
|
1989
|
-
async def cancel_order(self, id: str, symbol:
|
1989
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1990
1990
|
"""
|
1991
1991
|
cancels an open order
|
1992
1992
|
:see: https://bingx-api.github.io/docs/#/spot/trade-api.html#Cancel%20an%20Order
|
@@ -2059,7 +2059,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2059
2059
|
first = self.safe_value(data, 'order', data)
|
2060
2060
|
return self.parse_order(first, market)
|
2061
2061
|
|
2062
|
-
async def cancel_all_orders(self, symbol:
|
2062
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
2063
2063
|
"""
|
2064
2064
|
cancel all open orders
|
2065
2065
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20All%20Orders
|
@@ -2107,7 +2107,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2107
2107
|
#
|
2108
2108
|
return response
|
2109
2109
|
|
2110
|
-
async def cancel_orders(self, ids: List[Int], symbol:
|
2110
|
+
async def cancel_orders(self, ids: List[Int], symbol: Str = None, params={}):
|
2111
2111
|
"""
|
2112
2112
|
cancel multiple orders
|
2113
2113
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20a%20Batch%20of%20Orders
|
@@ -2166,7 +2166,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2166
2166
|
#
|
2167
2167
|
return response
|
2168
2168
|
|
2169
|
-
async def fetch_order(self, id: str, symbol:
|
2169
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
2170
2170
|
"""
|
2171
2171
|
fetches information on an order made by the user
|
2172
2172
|
:see: https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Orders
|
@@ -2243,7 +2243,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2243
2243
|
first = self.safe_value(data, 'order', data)
|
2244
2244
|
return self.parse_order(first, market)
|
2245
2245
|
|
2246
|
-
async def fetch_open_orders(self, symbol:
|
2246
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
2247
2247
|
"""
|
2248
2248
|
:see: https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Open%20Orders
|
2249
2249
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20all%20current%20pending%20orders
|
@@ -2325,7 +2325,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2325
2325
|
orders = self.safe_value(data, 'orders', [])
|
2326
2326
|
return self.parse_orders(orders, market, since, limit)
|
2327
2327
|
|
2328
|
-
async def fetch_closed_orders(self, symbol:
|
2328
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
2329
2329
|
"""
|
2330
2330
|
fetches information on multiple closed orders made by the user
|
2331
2331
|
:see: https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Order%20History
|
@@ -2453,7 +2453,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2453
2453
|
'status': None,
|
2454
2454
|
}
|
2455
2455
|
|
2456
|
-
async def fetch_transfers(self, code:
|
2456
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
2457
2457
|
"""
|
2458
2458
|
fetch a history of internal transfers made on an account
|
2459
2459
|
:see: https://bingx-api.github.io/docs/#/spot/account-api.html#Query%20User%20Universal%20Transfer%20History%20(USER_DATA)
|
@@ -2500,7 +2500,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2500
2500
|
rows = self.safe_value(response, 'rows', [])
|
2501
2501
|
return self.parse_transfers(rows, currency, since, limit)
|
2502
2502
|
|
2503
|
-
def parse_transfer(self, transfer, currency=None):
|
2503
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
2504
2504
|
tranId = self.safe_string(transfer, 'tranId')
|
2505
2505
|
timestamp = self.safe_integer(transfer, 'timestamp')
|
2506
2506
|
currencyCode = self.safe_currency_code(None, currency)
|
@@ -2565,7 +2565,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2565
2565
|
parsed = self.parse_deposit_addresses(data, [currency['code']], False)
|
2566
2566
|
return self.index_by(parsed, 'network')
|
2567
2567
|
|
2568
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
2568
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
2569
2569
|
#
|
2570
2570
|
# {
|
2571
2571
|
# "coinId": "799",
|
@@ -2590,7 +2590,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2590
2590
|
'info': depositAddress,
|
2591
2591
|
}
|
2592
2592
|
|
2593
|
-
async def fetch_deposits(self, code:
|
2593
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2594
2594
|
"""
|
2595
2595
|
fetch all deposits made to an account
|
2596
2596
|
:see: https://bingx-api.github.io/docs/#/spot/account-api.html#Deposit%20History(supporting%20network)
|
@@ -2631,7 +2631,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2631
2631
|
#
|
2632
2632
|
return self.parse_transactions(response, currency, since, limit)
|
2633
2633
|
|
2634
|
-
async def fetch_withdrawals(self, code:
|
2634
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2635
2635
|
"""
|
2636
2636
|
fetch all withdrawals made from an account
|
2637
2637
|
:see: https://bingx-api.github.io/docs/#/spot/account-api.html#Withdraw%20History%20(supporting%20network)
|
@@ -2674,7 +2674,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2674
2674
|
#
|
2675
2675
|
return self.parse_transactions(response, currency, since, limit)
|
2676
2676
|
|
2677
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
2677
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2678
2678
|
#
|
2679
2679
|
# fetchDeposits
|
2680
2680
|
#
|
@@ -2770,7 +2770,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2770
2770
|
}
|
2771
2771
|
return self.safe_string(statuses, status, status)
|
2772
2772
|
|
2773
|
-
async def set_margin_mode(self, marginMode: str, symbol:
|
2773
|
+
async def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
2774
2774
|
"""
|
2775
2775
|
set margin mode to 'cross' or 'isolated'
|
2776
2776
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Switch%20Margin%20Mode
|
@@ -2853,7 +2853,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2853
2853
|
#
|
2854
2854
|
return response
|
2855
2855
|
|
2856
|
-
async def set_leverage(self, leverage, symbol:
|
2856
|
+
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
2857
2857
|
"""
|
2858
2858
|
set the level of leverage for a market
|
2859
2859
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Switch%20Leverage
|
@@ -2884,7 +2884,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2884
2884
|
#
|
2885
2885
|
return await self.swapV2PrivatePostTradeLeverage(self.extend(request, params))
|
2886
2886
|
|
2887
|
-
async def fetch_my_trades(self, symbol:
|
2887
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2888
2888
|
"""
|
2889
2889
|
fetch all trades made by the user
|
2890
2890
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20historical%20transaction%20orders
|
@@ -2934,7 +2934,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2934
2934
|
fillOrders = self.safe_value(data, 'fill_orders', [])
|
2935
2935
|
return self.parse_trades(fillOrders, market, since, limit, query)
|
2936
2936
|
|
2937
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
2937
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
2938
2938
|
#
|
2939
2939
|
# {
|
2940
2940
|
# "coin": "BTC",
|
@@ -3063,7 +3063,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3063
3063
|
sortedParams[key] = arrStr
|
3064
3064
|
return sortedParams
|
3065
3065
|
|
3066
|
-
async def fetch_my_liquidations(self, symbol:
|
3066
|
+
async def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3067
3067
|
"""
|
3068
3068
|
retrieves the users liquidated positions
|
3069
3069
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#User's%20Force%20Orders
|
@@ -3121,7 +3121,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3121
3121
|
liquidations = self.safe_value(data, 'orders', [])
|
3122
3122
|
return self.parse_liquidations(liquidations, market, since, limit)
|
3123
3123
|
|
3124
|
-
def parse_liquidation(self, liquidation, market=None):
|
3124
|
+
def parse_liquidation(self, liquidation, market: Market = None):
|
3125
3125
|
#
|
3126
3126
|
# {
|
3127
3127
|
# "time": "int64",
|
ccxt/async_support/bit2c.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bit2c 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, Ticker, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -272,7 +272,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
272
272
|
orderbook = await self.publicGetExchangesPairOrderbook(self.extend(request, params))
|
273
273
|
return self.parse_order_book(orderbook, symbol)
|
274
274
|
|
275
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
275
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
276
276
|
symbol = self.safe_symbol(None, market)
|
277
277
|
timestamp = self.milliseconds()
|
278
278
|
averagePrice = self.safe_string(ticker, 'av')
|
@@ -421,7 +421,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
421
421
|
response = await getattr(self, method)(self.extend(request, params))
|
422
422
|
return self.parse_order(response, market)
|
423
423
|
|
424
|
-
async def cancel_order(self, id: str, symbol:
|
424
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
425
425
|
"""
|
426
426
|
cancels an open order
|
427
427
|
:param str id: order id
|
@@ -434,7 +434,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
434
434
|
}
|
435
435
|
return await self.privatePostOrderCancelOrder(self.extend(request, params))
|
436
436
|
|
437
|
-
async def fetch_open_orders(self, symbol:
|
437
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
438
438
|
"""
|
439
439
|
fetch all unfilled currently open orders
|
440
440
|
:param str symbol: unified market symbol
|
@@ -455,7 +455,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
455
455
|
bids = self.safe_value(orders, 'bid', [])
|
456
456
|
return self.parse_orders(self.array_concat(asks, bids), market, since, limit)
|
457
457
|
|
458
|
-
async def fetch_order(self, id: str, symbol:
|
458
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
459
459
|
"""
|
460
460
|
fetches information on an order made by the user
|
461
461
|
:param str symbol: unified market symbol
|
@@ -484,7 +484,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
484
484
|
#
|
485
485
|
return self.parse_order(response, market)
|
486
486
|
|
487
|
-
def parse_order(self, order, market=None) -> Order:
|
487
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
488
488
|
#
|
489
489
|
# createOrder
|
490
490
|
# {
|
@@ -591,7 +591,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
591
591
|
'average': None,
|
592
592
|
}, market)
|
593
593
|
|
594
|
-
async def fetch_my_trades(self, symbol:
|
594
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
595
595
|
"""
|
596
596
|
fetch all trades made by the user
|
597
597
|
:param str symbol: unified market symbol
|
@@ -660,7 +660,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
660
660
|
newString += strParts[i]
|
661
661
|
return newString
|
662
662
|
|
663
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
663
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
664
664
|
#
|
665
665
|
# public fetchTrades
|
666
666
|
#
|
@@ -780,7 +780,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
780
780
|
#
|
781
781
|
return self.parse_deposit_address(response, currency)
|
782
782
|
|
783
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
783
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
784
784
|
#
|
785
785
|
# {
|
786
786
|
# "address": "0xf14b94518d74aff2b1a6d3429471bcfcd3881d42",
|
ccxt/async_support/bitbank.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitbank 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 PermissionDenied
|
@@ -111,6 +111,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
111
111
|
'{pair}/transactions',
|
112
112
|
'{pair}/transactions/{yyyymmdd}',
|
113
113
|
'{pair}/candlestick/{candletype}/{yyyymmdd}',
|
114
|
+
'{pair}/circuit_break_info',
|
114
115
|
],
|
115
116
|
},
|
116
117
|
'private': {
|
@@ -256,7 +257,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
256
257
|
'info': entry,
|
257
258
|
}
|
258
259
|
|
259
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
260
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
260
261
|
symbol = self.safe_symbol(None, market)
|
261
262
|
timestamp = self.safe_integer(ticker, 'timestamp')
|
262
263
|
last = self.safe_string(ticker, 'last')
|
@@ -319,7 +320,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
319
320
|
timestamp = self.safe_integer(orderbook, 'timestamp')
|
320
321
|
return self.parse_order_book(orderbook, market['symbol'], timestamp)
|
321
322
|
|
322
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
323
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
323
324
|
#
|
324
325
|
# fetchTrades
|
325
326
|
#
|
@@ -438,7 +439,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
438
439
|
}
|
439
440
|
return result
|
440
441
|
|
441
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
442
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
442
443
|
#
|
443
444
|
# [
|
444
445
|
# "0.02501786",
|
@@ -579,7 +580,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
579
580
|
}
|
580
581
|
return self.safe_string(statuses, status, status)
|
581
582
|
|
582
|
-
def parse_order(self, order, market=None) -> Order:
|
583
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
583
584
|
id = self.safe_string(order, 'order_id')
|
584
585
|
marketId = self.safe_string(order, 'pair')
|
585
586
|
market = self.safe_market(marketId, market)
|
@@ -643,7 +644,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
643
644
|
data = self.safe_value(response, 'data')
|
644
645
|
return self.parse_order(data, market)
|
645
646
|
|
646
|
-
async def cancel_order(self, id: str, symbol:
|
647
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
647
648
|
"""
|
648
649
|
cancels an open order
|
649
650
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#cancel-order
|
@@ -662,7 +663,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
662
663
|
data = self.safe_value(response, 'data')
|
663
664
|
return data
|
664
665
|
|
665
|
-
async def fetch_order(self, id: str, symbol:
|
666
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
666
667
|
"""
|
667
668
|
fetches information on an order made by the user
|
668
669
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-order-information
|
@@ -680,7 +681,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
680
681
|
data = self.safe_value(response, 'data')
|
681
682
|
return self.parse_order(data, market)
|
682
683
|
|
683
|
-
async def fetch_open_orders(self, symbol:
|
684
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
684
685
|
"""
|
685
686
|
fetch all unfilled currently open orders
|
686
687
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-active-orders
|
@@ -704,7 +705,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
704
705
|
orders = self.safe_value(data, 'orders', [])
|
705
706
|
return self.parse_orders(orders, market, since, limit)
|
706
707
|
|
707
|
-
async def fetch_my_trades(self, symbol:
|
708
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
708
709
|
"""
|
709
710
|
fetch all trades made by the user
|
710
711
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-trade-history
|
@@ -797,7 +798,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
797
798
|
data = self.safe_value(response, 'data', {})
|
798
799
|
return self.parse_transaction(data, currency)
|
799
800
|
|
800
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
801
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
801
802
|
#
|
802
803
|
# withdraw
|
803
804
|
#
|
ccxt/async_support/bitbns.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitbns 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
|
@@ -319,7 +319,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
319
319
|
timestamp = self.safe_integer(response, 'timestamp')
|
320
320
|
return self.parse_order_book(response, market['symbol'], timestamp)
|
321
321
|
|
322
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
322
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
323
323
|
#
|
324
324
|
# {
|
325
325
|
# "symbol":"BTC/INR",
|
@@ -487,7 +487,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
487
487
|
}
|
488
488
|
return self.safe_string(statuses, status, status)
|
489
489
|
|
490
|
-
def parse_order(self, order, market=None) -> Order:
|
490
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
491
491
|
#
|
492
492
|
# createOrder
|
493
493
|
#
|
@@ -619,7 +619,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
619
619
|
#
|
620
620
|
return self.parse_order(response, market)
|
621
621
|
|
622
|
-
async def cancel_order(self, id: str, symbol:
|
622
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
623
623
|
"""
|
624
624
|
cancels an open order
|
625
625
|
:see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/cancel-orders
|
@@ -647,7 +647,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
647
647
|
response = await self.v2PostCancel(self.extend(request, params))
|
648
648
|
return self.parse_order(response, market)
|
649
649
|
|
650
|
-
async def fetch_order(self, id: str, symbol:
|
650
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
651
651
|
"""
|
652
652
|
fetches information on an order made by the user
|
653
653
|
:see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/order-status
|
@@ -696,7 +696,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
696
696
|
first = self.safe_value(data, 0)
|
697
697
|
return self.parse_order(first, market)
|
698
698
|
|
699
|
-
async def fetch_open_orders(self, symbol:
|
699
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
700
700
|
"""
|
701
701
|
fetch all unfilled currently open orders
|
702
702
|
:see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/order-status-limit
|
@@ -743,7 +743,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
743
743
|
data = self.safe_value(response, 'data', [])
|
744
744
|
return self.parse_orders(data, market, since, limit)
|
745
745
|
|
746
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
746
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
747
747
|
#
|
748
748
|
# fetchMyTrades
|
749
749
|
#
|
@@ -819,7 +819,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
819
819
|
'fee': fee,
|
820
820
|
}, market)
|
821
821
|
|
822
|
-
async def fetch_my_trades(self, symbol:
|
822
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
823
823
|
"""
|
824
824
|
fetch all trades made by the user
|
825
825
|
:param str symbol: unified market symbol
|
@@ -908,7 +908,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
908
908
|
#
|
909
909
|
return self.parse_trades(response, market, since, limit)
|
910
910
|
|
911
|
-
async def fetch_deposits(self, code:
|
911
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
912
912
|
"""
|
913
913
|
fetch all deposits made to an account
|
914
914
|
:param str code: unified currency code
|
@@ -952,7 +952,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
952
952
|
data = self.safe_value(response, 'data', [])
|
953
953
|
return self.parse_transactions(data, currency, since, limit)
|
954
954
|
|
955
|
-
async def fetch_withdrawals(self, code:
|
955
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
956
956
|
"""
|
957
957
|
fetch all withdrawals made from an account
|
958
958
|
:param str code: unified currency code
|
@@ -995,7 +995,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
995
995
|
statuses = self.safe_value(statusesByType, type, {})
|
996
996
|
return self.safe_string(statuses, status, status)
|
997
997
|
|
998
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
998
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
999
999
|
#
|
1000
1000
|
# fetchDeposits
|
1001
1001
|
#
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex 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
|
@@ -463,7 +463,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
463
463
|
withdraw = self.safe_value(response, 'withdraw')
|
464
464
|
return self.parse_deposit_withdraw_fees(withdraw, codes)
|
465
465
|
|
466
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
466
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
467
467
|
#
|
468
468
|
# '0.0004'
|
469
469
|
#
|
@@ -770,7 +770,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
770
770
|
'amount': self.parse_number(requestedAmount),
|
771
771
|
})
|
772
772
|
|
773
|
-
def parse_transfer(self, transfer, currency=None):
|
773
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
774
774
|
#
|
775
775
|
# {
|
776
776
|
# "status": "success",
|
@@ -856,7 +856,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
856
856
|
ticker = await self.publicGetPubtickerSymbol(self.extend(request, params))
|
857
857
|
return self.parse_ticker(ticker, market)
|
858
858
|
|
859
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
859
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
860
860
|
timestamp = self.safe_timestamp(ticker, 'timestamp')
|
861
861
|
marketId = self.safe_string(ticker, 'pair')
|
862
862
|
market = self.safe_market(marketId, market)
|
@@ -885,7 +885,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
885
885
|
'info': ticker,
|
886
886
|
}, market)
|
887
887
|
|
888
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
888
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
889
889
|
#
|
890
890
|
# fetchTrades(public) v1
|
891
891
|
#
|
@@ -986,7 +986,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
986
986
|
#
|
987
987
|
return self.parse_trades(response, market, since, limit)
|
988
988
|
|
989
|
-
async def fetch_my_trades(self, symbol:
|
989
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
990
990
|
"""
|
991
991
|
fetch all trades made by the user
|
992
992
|
:param str symbol: unified market symbol
|
@@ -1064,7 +1064,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1064
1064
|
response = await self.privatePostOrderCancelReplace(self.extend(order, params))
|
1065
1065
|
return self.parse_order(response)
|
1066
1066
|
|
1067
|
-
async def cancel_order(self, id: str, symbol:
|
1067
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1068
1068
|
"""
|
1069
1069
|
cancels an open order
|
1070
1070
|
:param str id: order id
|
@@ -1078,7 +1078,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1078
1078
|
}
|
1079
1079
|
return await self.privatePostOrderCancel(self.extend(request, params))
|
1080
1080
|
|
1081
|
-
async def cancel_all_orders(self, symbol:
|
1081
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1082
1082
|
"""
|
1083
1083
|
cancel all open orders
|
1084
1084
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
@@ -1087,7 +1087,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1087
1087
|
"""
|
1088
1088
|
return await self.privatePostOrderCancelAll(params)
|
1089
1089
|
|
1090
|
-
def parse_order(self, order, market=None) -> Order:
|
1090
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1091
1091
|
#
|
1092
1092
|
# {
|
1093
1093
|
# "id": 57334010955,
|
@@ -1156,7 +1156,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1156
1156
|
'trades': None,
|
1157
1157
|
}, market)
|
1158
1158
|
|
1159
|
-
async def fetch_open_orders(self, symbol:
|
1159
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1160
1160
|
"""
|
1161
1161
|
fetch all unfilled currently open orders
|
1162
1162
|
:param str symbol: unified market symbol
|
@@ -1175,7 +1175,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1175
1175
|
orders = self.filter_by(orders, 'symbol', symbol)
|
1176
1176
|
return orders
|
1177
1177
|
|
1178
|
-
async def fetch_closed_orders(self, symbol:
|
1178
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1179
1179
|
"""
|
1180
1180
|
fetches information on multiple closed orders made by the user
|
1181
1181
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1196,7 +1196,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1196
1196
|
orders = self.filter_by_array(orders, 'status', ['closed', 'canceled'], False)
|
1197
1197
|
return orders
|
1198
1198
|
|
1199
|
-
async def fetch_order(self, id: str, symbol:
|
1199
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1200
1200
|
"""
|
1201
1201
|
fetches information on an order made by the user
|
1202
1202
|
:param str symbol: not used by bitfinex fetchOrder
|
@@ -1210,7 +1210,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1210
1210
|
response = await self.privatePostOrderStatus(self.extend(request, params))
|
1211
1211
|
return self.parse_order(response)
|
1212
1212
|
|
1213
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1213
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1214
1214
|
#
|
1215
1215
|
# [
|
1216
1216
|
# 1457539800000,
|
@@ -1312,7 +1312,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1312
1312
|
'info': response,
|
1313
1313
|
}
|
1314
1314
|
|
1315
|
-
async def fetch_deposits_withdrawals(self, code:
|
1315
|
+
async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1316
1316
|
"""
|
1317
1317
|
fetch history of deposits and withdrawals
|
1318
1318
|
:param str code: unified currency code for the currency of the deposit/withdrawals
|
@@ -1355,7 +1355,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1355
1355
|
#
|
1356
1356
|
return self.parse_transactions(response, currency, since, limit)
|
1357
1357
|
|
1358
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1358
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1359
1359
|
#
|
1360
1360
|
# crypto
|
1361
1361
|
#
|