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/bingx.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bingx import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, 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
|
@@ -73,7 +73,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
73
73
|
'fetchTransfers': True,
|
74
74
|
'fetchWithdrawals': True,
|
75
75
|
'setLeverage': True,
|
76
|
-
'
|
76
|
+
'setMargin': True,
|
77
77
|
'setMarginMode': True,
|
78
78
|
'transfer': True,
|
79
79
|
},
|
@@ -692,7 +692,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
692
692
|
ohlcvs = [ohlcvs]
|
693
693
|
return self.parse_ohlcvs(ohlcvs, market, timeframe, since, limit)
|
694
694
|
|
695
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
695
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
696
696
|
#
|
697
697
|
# {
|
698
698
|
# "open": "19394.4",
|
@@ -793,7 +793,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
793
793
|
trades = self.safe_value(response, 'data', [])
|
794
794
|
return self.parse_trades(trades, market, since, limit)
|
795
795
|
|
796
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
796
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
797
797
|
#
|
798
798
|
# spot
|
799
799
|
# fetchTrades
|
@@ -1014,7 +1014,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1014
1014
|
data = self.safe_value(response, 'data', {})
|
1015
1015
|
return self.parse_funding_rate(data, market)
|
1016
1016
|
|
1017
|
-
def parse_funding_rate(self, contract, market=None):
|
1017
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
1018
1018
|
#
|
1019
1019
|
# {
|
1020
1020
|
# "symbol": "BTC-USDT",
|
@@ -1046,7 +1046,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1046
1046
|
'previousFundingDatetime': None,
|
1047
1047
|
}
|
1048
1048
|
|
1049
|
-
def fetch_funding_rate_history(self, symbol:
|
1049
|
+
def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1050
1050
|
"""
|
1051
1051
|
fetches historical funding rate prices
|
1052
1052
|
:see: https://bingx-api.github.io/docs/#/swapV2/market-api.html#Funding%20Rate%20History
|
@@ -1136,7 +1136,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1136
1136
|
data = self.safe_value(response, 'data', {})
|
1137
1137
|
return self.parse_open_interest(data, market)
|
1138
1138
|
|
1139
|
-
def parse_open_interest(self, interest, market=None):
|
1139
|
+
def parse_open_interest(self, interest, market: Market = None):
|
1140
1140
|
#
|
1141
1141
|
# {
|
1142
1142
|
# "openInterest": "3289641547.10",
|
@@ -1266,7 +1266,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1266
1266
|
tickers = self.safe_value(response, 'data')
|
1267
1267
|
return self.parse_tickers(tickers, symbols)
|
1268
1268
|
|
1269
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
1269
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
1270
1270
|
#
|
1271
1271
|
# spot
|
1272
1272
|
# {
|
@@ -1508,7 +1508,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1508
1508
|
positions = self.safe_value(response, 'data', [])
|
1509
1509
|
return self.parse_positions(positions, symbols)
|
1510
1510
|
|
1511
|
-
def parse_position(self, position, market=None):
|
1511
|
+
def parse_position(self, position, market: Market = None):
|
1512
1512
|
#
|
1513
1513
|
# {
|
1514
1514
|
# "symbol": "BTC-USDT",
|
@@ -1829,7 +1829,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1829
1829
|
}
|
1830
1830
|
return self.safe_string(sides, side, side)
|
1831
1831
|
|
1832
|
-
def parse_order(self, order, market=None) -> Order:
|
1832
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1833
1833
|
#
|
1834
1834
|
# spot
|
1835
1835
|
# createOrder, createOrders, cancelOrder
|
@@ -1985,7 +1985,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1985
1985
|
}
|
1986
1986
|
return self.safe_string(statuses, status, status)
|
1987
1987
|
|
1988
|
-
def cancel_order(self, id: str, symbol:
|
1988
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1989
1989
|
"""
|
1990
1990
|
cancels an open order
|
1991
1991
|
:see: https://bingx-api.github.io/docs/#/spot/trade-api.html#Cancel%20an%20Order
|
@@ -2058,7 +2058,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2058
2058
|
first = self.safe_value(data, 'order', data)
|
2059
2059
|
return self.parse_order(first, market)
|
2060
2060
|
|
2061
|
-
def cancel_all_orders(self, symbol:
|
2061
|
+
def cancel_all_orders(self, symbol: Str = None, params={}):
|
2062
2062
|
"""
|
2063
2063
|
cancel all open orders
|
2064
2064
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20All%20Orders
|
@@ -2106,7 +2106,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2106
2106
|
#
|
2107
2107
|
return response
|
2108
2108
|
|
2109
|
-
def cancel_orders(self, ids: List[Int], symbol:
|
2109
|
+
def cancel_orders(self, ids: List[Int], symbol: Str = None, params={}):
|
2110
2110
|
"""
|
2111
2111
|
cancel multiple orders
|
2112
2112
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20a%20Batch%20of%20Orders
|
@@ -2165,7 +2165,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2165
2165
|
#
|
2166
2166
|
return response
|
2167
2167
|
|
2168
|
-
def fetch_order(self, id: str, symbol:
|
2168
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
2169
2169
|
"""
|
2170
2170
|
fetches information on an order made by the user
|
2171
2171
|
:see: https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Orders
|
@@ -2242,7 +2242,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2242
2242
|
first = self.safe_value(data, 'order', data)
|
2243
2243
|
return self.parse_order(first, market)
|
2244
2244
|
|
2245
|
-
def fetch_open_orders(self, symbol:
|
2245
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
2246
2246
|
"""
|
2247
2247
|
:see: https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Open%20Orders
|
2248
2248
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20all%20current%20pending%20orders
|
@@ -2324,7 +2324,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2324
2324
|
orders = self.safe_value(data, 'orders', [])
|
2325
2325
|
return self.parse_orders(orders, market, since, limit)
|
2326
2326
|
|
2327
|
-
def fetch_closed_orders(self, symbol:
|
2327
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
2328
2328
|
"""
|
2329
2329
|
fetches information on multiple closed orders made by the user
|
2330
2330
|
:see: https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Order%20History
|
@@ -2452,7 +2452,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2452
2452
|
'status': None,
|
2453
2453
|
}
|
2454
2454
|
|
2455
|
-
def fetch_transfers(self, code:
|
2455
|
+
def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
2456
2456
|
"""
|
2457
2457
|
fetch a history of internal transfers made on an account
|
2458
2458
|
:see: https://bingx-api.github.io/docs/#/spot/account-api.html#Query%20User%20Universal%20Transfer%20History%20(USER_DATA)
|
@@ -2499,7 +2499,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2499
2499
|
rows = self.safe_value(response, 'rows', [])
|
2500
2500
|
return self.parse_transfers(rows, currency, since, limit)
|
2501
2501
|
|
2502
|
-
def parse_transfer(self, transfer, currency=None):
|
2502
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
2503
2503
|
tranId = self.safe_string(transfer, 'tranId')
|
2504
2504
|
timestamp = self.safe_integer(transfer, 'timestamp')
|
2505
2505
|
currencyCode = self.safe_currency_code(None, currency)
|
@@ -2564,7 +2564,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2564
2564
|
parsed = self.parse_deposit_addresses(data, [currency['code']], False)
|
2565
2565
|
return self.index_by(parsed, 'network')
|
2566
2566
|
|
2567
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
2567
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
2568
2568
|
#
|
2569
2569
|
# {
|
2570
2570
|
# "coinId": "799",
|
@@ -2589,7 +2589,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2589
2589
|
'info': depositAddress,
|
2590
2590
|
}
|
2591
2591
|
|
2592
|
-
def fetch_deposits(self, code:
|
2592
|
+
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2593
2593
|
"""
|
2594
2594
|
fetch all deposits made to an account
|
2595
2595
|
:see: https://bingx-api.github.io/docs/#/spot/account-api.html#Deposit%20History(supporting%20network)
|
@@ -2630,7 +2630,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2630
2630
|
#
|
2631
2631
|
return self.parse_transactions(response, currency, since, limit)
|
2632
2632
|
|
2633
|
-
def fetch_withdrawals(self, code:
|
2633
|
+
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
2634
2634
|
"""
|
2635
2635
|
fetch all withdrawals made from an account
|
2636
2636
|
:see: https://bingx-api.github.io/docs/#/spot/account-api.html#Withdraw%20History%20(supporting%20network)
|
@@ -2673,7 +2673,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2673
2673
|
#
|
2674
2674
|
return self.parse_transactions(response, currency, since, limit)
|
2675
2675
|
|
2676
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
2676
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
2677
2677
|
#
|
2678
2678
|
# fetchDeposits
|
2679
2679
|
#
|
@@ -2769,7 +2769,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2769
2769
|
}
|
2770
2770
|
return self.safe_string(statuses, status, status)
|
2771
2771
|
|
2772
|
-
def set_margin_mode(self, marginMode: str, symbol:
|
2772
|
+
def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
2773
2773
|
"""
|
2774
2774
|
set margin mode to 'cross' or 'isolated'
|
2775
2775
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Switch%20Margin%20Mode
|
@@ -2852,7 +2852,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2852
2852
|
#
|
2853
2853
|
return response
|
2854
2854
|
|
2855
|
-
def set_leverage(self, leverage, symbol:
|
2855
|
+
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
2856
2856
|
"""
|
2857
2857
|
set the level of leverage for a market
|
2858
2858
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Switch%20Leverage
|
@@ -2883,7 +2883,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2883
2883
|
#
|
2884
2884
|
return self.swapV2PrivatePostTradeLeverage(self.extend(request, params))
|
2885
2885
|
|
2886
|
-
def fetch_my_trades(self, symbol:
|
2886
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2887
2887
|
"""
|
2888
2888
|
fetch all trades made by the user
|
2889
2889
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20historical%20transaction%20orders
|
@@ -2933,7 +2933,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2933
2933
|
fillOrders = self.safe_value(data, 'fill_orders', [])
|
2934
2934
|
return self.parse_trades(fillOrders, market, since, limit, query)
|
2935
2935
|
|
2936
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
2936
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
2937
2937
|
#
|
2938
2938
|
# {
|
2939
2939
|
# "coin": "BTC",
|
@@ -3062,7 +3062,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3062
3062
|
sortedParams[key] = arrStr
|
3063
3063
|
return sortedParams
|
3064
3064
|
|
3065
|
-
def fetch_my_liquidations(self, symbol:
|
3065
|
+
def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3066
3066
|
"""
|
3067
3067
|
retrieves the users liquidated positions
|
3068
3068
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#User's%20Force%20Orders
|
@@ -3120,7 +3120,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3120
3120
|
liquidations = self.safe_value(data, 'orders', [])
|
3121
3121
|
return self.parse_liquidations(liquidations, market, since, limit)
|
3122
3122
|
|
3123
|
-
def parse_liquidation(self, liquidation, market=None):
|
3123
|
+
def parse_liquidation(self, liquidation, market: Market = None):
|
3124
3124
|
#
|
3125
3125
|
# {
|
3126
3126
|
# "time": "int64",
|
ccxt/bit2c.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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 = 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 = getattr(self, method)(self.extend(request, params))
|
422
422
|
return self.parse_order(response, market)
|
423
423
|
|
424
|
-
def cancel_order(self, id: str, symbol:
|
424
|
+
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 self.privatePostOrderCancelOrder(self.extend(request, params))
|
436
436
|
|
437
|
-
def fetch_open_orders(self, symbol:
|
437
|
+
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
|
-
def fetch_order(self, id: str, symbol:
|
458
|
+
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
|
-
def fetch_my_trades(self, symbol:
|
594
|
+
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/bitbank.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def cancel_order(self, id: str, symbol:
|
647
|
+
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
|
-
def fetch_order(self, id: str, symbol:
|
666
|
+
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
|
-
def fetch_open_orders(self, symbol:
|
684
|
+
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
|
-
def fetch_my_trades(self, symbol:
|
708
|
+
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/bitbns.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def cancel_order(self, id: str, symbol:
|
622
|
+
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 = self.v2PostCancel(self.extend(request, params))
|
648
648
|
return self.parse_order(response, market)
|
649
649
|
|
650
|
-
def fetch_order(self, id: str, symbol:
|
650
|
+
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
|
-
def fetch_open_orders(self, symbol:
|
699
|
+
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
|
-
def fetch_my_trades(self, symbol:
|
822
|
+
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
|
-
def fetch_deposits(self, code:
|
911
|
+
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
|
-
def fetch_withdrawals(self, code:
|
955
|
+
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/bitfinex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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 = 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
|
-
def fetch_my_trades(self, symbol:
|
989
|
+
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 = self.privatePostOrderCancelReplace(self.extend(order, params))
|
1065
1065
|
return self.parse_order(response)
|
1066
1066
|
|
1067
|
-
def cancel_order(self, id: str, symbol:
|
1067
|
+
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 self.privatePostOrderCancel(self.extend(request, params))
|
1080
1080
|
|
1081
|
-
def cancel_all_orders(self, symbol:
|
1081
|
+
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 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
|
-
def fetch_open_orders(self, symbol:
|
1159
|
+
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
|
-
def fetch_closed_orders(self, symbol:
|
1178
|
+
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
|
-
def fetch_order(self, id: str, symbol:
|
1199
|
+
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 = 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
|
-
def fetch_deposits_withdrawals(self, code:
|
1315
|
+
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
|
#
|