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/gate.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.gate import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, Greeks, Int, Order, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory,
|
10
|
+
from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory, 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
|
@@ -1757,7 +1757,7 @@ class gate(Exchange, ImplicitAPI):
|
|
1757
1757
|
result = self.parse_funding_rates(response)
|
1758
1758
|
return self.filter_by_array(result, 'symbol', symbols)
|
1759
1759
|
|
1760
|
-
def parse_funding_rate(self, contract, market=None):
|
1760
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
1761
1761
|
#
|
1762
1762
|
# {
|
1763
1763
|
# "name": "BTC_USDT",
|
@@ -1981,7 +1981,7 @@ class gate(Exchange, ImplicitAPI):
|
|
1981
1981
|
result[symbol] = self.parse_trading_fee(response, market)
|
1982
1982
|
return result
|
1983
1983
|
|
1984
|
-
def parse_trading_fee(self, info, market=None):
|
1984
|
+
def parse_trading_fee(self, info, market: Market = None):
|
1985
1985
|
#
|
1986
1986
|
# {
|
1987
1987
|
# "user_id": 1486602,
|
@@ -2092,7 +2092,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2092
2092
|
#
|
2093
2093
|
return self.parse_deposit_withdraw_fees(response, codes, 'currency')
|
2094
2094
|
|
2095
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
2095
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
2096
2096
|
#
|
2097
2097
|
# {
|
2098
2098
|
# "currency": "MTN",
|
@@ -2139,7 +2139,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2139
2139
|
}
|
2140
2140
|
return result
|
2141
2141
|
|
2142
|
-
async def fetch_funding_history(self, symbol:
|
2142
|
+
async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2143
2143
|
"""
|
2144
2144
|
fetch the history of funding payments paid and received on self account
|
2145
2145
|
:see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
|
@@ -2191,7 +2191,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2191
2191
|
sorted = self.sort_by(result, 'timestamp')
|
2192
2192
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
2193
2193
|
|
2194
|
-
def parse_funding_history(self, info, market=None):
|
2194
|
+
def parse_funding_history(self, info, market: Market = None):
|
2195
2195
|
#
|
2196
2196
|
# {
|
2197
2197
|
# "time": 1646899200,
|
@@ -2359,7 +2359,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2359
2359
|
ticker = self.safe_value(response, 0)
|
2360
2360
|
return self.parse_ticker(ticker, market)
|
2361
2361
|
|
2362
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
2362
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
2363
2363
|
#
|
2364
2364
|
# SPOT
|
2365
2365
|
#
|
@@ -2796,7 +2796,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2796
2796
|
response = await self.publicOptionsGetCandlesticks(self.extend(request, params))
|
2797
2797
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
2798
2798
|
|
2799
|
-
async def fetch_funding_rate_history(self, symbol:
|
2799
|
+
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2800
2800
|
"""
|
2801
2801
|
fetches historical funding rate prices
|
2802
2802
|
:see: https://www.gate.io/docs/developers/apiv4/en/#funding-rate-history
|
@@ -2836,7 +2836,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2836
2836
|
sorted = self.sort_by(rates, 'timestamp')
|
2837
2837
|
return self.filter_by_symbol_since_limit(sorted, market['symbol'], since, limit)
|
2838
2838
|
|
2839
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
2839
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
2840
2840
|
#
|
2841
2841
|
# Spot market candles
|
2842
2842
|
#
|
@@ -2982,7 +2982,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2982
2982
|
#
|
2983
2983
|
return self.parse_trades(response, market, since, limit)
|
2984
2984
|
|
2985
|
-
async def fetch_order_trades(self, id: str, symbol:
|
2985
|
+
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2986
2986
|
"""
|
2987
2987
|
fetch all the trades made from a single order
|
2988
2988
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
|
@@ -3020,7 +3020,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3020
3020
|
response = await self.fetch_my_trades(symbol, since, limit, {'order_id': id})
|
3021
3021
|
return response
|
3022
3022
|
|
3023
|
-
async def fetch_my_trades(self, symbol:
|
3023
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3024
3024
|
"""
|
3025
3025
|
Fetch personal trading history
|
3026
3026
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
|
@@ -3145,7 +3145,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3145
3145
|
#
|
3146
3146
|
return self.parse_trades(response, market, since, limit)
|
3147
3147
|
|
3148
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
3148
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
3149
3149
|
#
|
3150
3150
|
# public
|
3151
3151
|
#
|
@@ -3287,7 +3287,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3287
3287
|
'fees': fees,
|
3288
3288
|
}, market)
|
3289
3289
|
|
3290
|
-
async def fetch_deposits(self, code:
|
3290
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
3291
3291
|
"""
|
3292
3292
|
fetch all deposits made to an account
|
3293
3293
|
:see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-deposit-records
|
@@ -3319,7 +3319,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3319
3319
|
response = await self.privateWalletGetDeposits(self.extend(request, params))
|
3320
3320
|
return self.parse_transactions(response, currency)
|
3321
3321
|
|
3322
|
-
async def fetch_withdrawals(self, code:
|
3322
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
3323
3323
|
"""
|
3324
3324
|
fetch all withdrawals made from an account
|
3325
3325
|
:see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-records
|
@@ -3411,7 +3411,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3411
3411
|
}
|
3412
3412
|
return self.safe_string(types, type, type)
|
3413
3413
|
|
3414
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
3414
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
3415
3415
|
#
|
3416
3416
|
# deposits
|
3417
3417
|
#
|
@@ -3938,7 +3938,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3938
3938
|
}
|
3939
3939
|
return self.safe_string(statuses, status, status)
|
3940
3940
|
|
3941
|
-
def parse_order(self, order, market=None) -> Order:
|
3941
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
3942
3942
|
#
|
3943
3943
|
# SPOT
|
3944
3944
|
# createOrder/cancelOrder/fetchOrder/editOrder
|
@@ -4187,7 +4187,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4187
4187
|
'info': order,
|
4188
4188
|
}, market)
|
4189
4189
|
|
4190
|
-
async def fetch_order(self, id: str, symbol:
|
4190
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
4191
4191
|
"""
|
4192
4192
|
Retrieves information on an order
|
4193
4193
|
:see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order
|
@@ -4229,7 +4229,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4229
4229
|
response = await getattr(self, method)(self.extend(request, requestParams))
|
4230
4230
|
return self.parse_order(response, market)
|
4231
4231
|
|
4232
|
-
async def fetch_open_orders(self, symbol:
|
4232
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
4233
4233
|
"""
|
4234
4234
|
fetch all unfilled currently open orders
|
4235
4235
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-all-open-orders
|
@@ -4244,7 +4244,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4244
4244
|
"""
|
4245
4245
|
return await self.fetch_orders_by_status('open', symbol, since, limit, params)
|
4246
4246
|
|
4247
|
-
async def fetch_closed_orders(self, symbol:
|
4247
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
4248
4248
|
"""
|
4249
4249
|
fetches information on multiple closed orders made by the user
|
4250
4250
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-orders
|
@@ -4265,7 +4265,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4265
4265
|
"""
|
4266
4266
|
return await self.fetch_orders_by_status('finished', symbol, since, limit, params)
|
4267
4267
|
|
4268
|
-
async def fetch_orders_by_status(self, status, symbol:
|
4268
|
+
async def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4269
4269
|
await self.load_markets()
|
4270
4270
|
market = None
|
4271
4271
|
if symbol is not None:
|
@@ -4450,7 +4450,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4450
4450
|
orders = self.parse_orders(result, market, since, limit)
|
4451
4451
|
return self.filter_by_symbol_since_limit(orders, symbol, since, limit)
|
4452
4452
|
|
4453
|
-
async def cancel_order(self, id: str, symbol:
|
4453
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
4454
4454
|
"""
|
4455
4455
|
Cancels an open order
|
4456
4456
|
:see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order
|
@@ -4562,7 +4562,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4562
4562
|
#
|
4563
4563
|
return self.parse_order(response, market)
|
4564
4564
|
|
4565
|
-
async def cancel_all_orders(self, symbol:
|
4565
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
4566
4566
|
"""
|
4567
4567
|
cancel all open orders
|
4568
4568
|
:see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
|
@@ -4672,7 +4672,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4672
4672
|
#
|
4673
4673
|
return self.parse_transfer(response, currency)
|
4674
4674
|
|
4675
|
-
def parse_transfer(self, transfer, currency=None):
|
4675
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
4676
4676
|
timestamp = self.milliseconds()
|
4677
4677
|
return {
|
4678
4678
|
'id': self.safe_string(transfer, 'tx_id'),
|
@@ -4686,7 +4686,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4686
4686
|
'info': transfer,
|
4687
4687
|
}
|
4688
4688
|
|
4689
|
-
async def set_leverage(self, leverage, symbol:
|
4689
|
+
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
4690
4690
|
"""
|
4691
4691
|
set the level of leverage for a market
|
4692
4692
|
:see: https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage
|
@@ -4749,7 +4749,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4749
4749
|
#
|
4750
4750
|
return response
|
4751
4751
|
|
4752
|
-
def parse_position(self, position, market=None):
|
4752
|
+
def parse_position(self, position, market: Market = None):
|
4753
4753
|
#
|
4754
4754
|
# swap and future
|
4755
4755
|
#
|
@@ -5138,7 +5138,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5138
5138
|
#
|
5139
5139
|
return self.parse_leverage_tiers(response, symbols, 'name')
|
5140
5140
|
|
5141
|
-
def parse_market_leverage_tiers(self, info, market=None):
|
5141
|
+
def parse_market_leverage_tiers(self, info, market: Market = None):
|
5142
5142
|
"""
|
5143
5143
|
* @ignore
|
5144
5144
|
https://www.gate.io/help/futures/perpetual/22162/instrctions-of-risk-limit
|
@@ -5258,7 +5258,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5258
5258
|
floor = cap
|
5259
5259
|
return tiers
|
5260
5260
|
|
5261
|
-
async def repay_margin(self, code: str, amount, symbol:
|
5261
|
+
async def repay_margin(self, code: str, amount, symbol: Str = None, params={}):
|
5262
5262
|
"""
|
5263
5263
|
repay borrowed margin and interest
|
5264
5264
|
:see: https://www.gate.io/docs/apiv4/en/#repay-cross-margin-loan
|
@@ -5336,7 +5336,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5336
5336
|
response = response[0]
|
5337
5337
|
return self.parse_margin_loan(response, currency)
|
5338
5338
|
|
5339
|
-
async def borrow_margin(self, code: str, amount, symbol:
|
5339
|
+
async def borrow_margin(self, code: str, amount, symbol: Str = None, params={}):
|
5340
5340
|
"""
|
5341
5341
|
create a loan to borrow margin
|
5342
5342
|
:see: https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan
|
@@ -5408,7 +5408,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5408
5408
|
#
|
5409
5409
|
return self.parse_margin_loan(response, currency)
|
5410
5410
|
|
5411
|
-
def parse_margin_loan(self, info, currency=None):
|
5411
|
+
def parse_margin_loan(self, info, currency: Currency = None):
|
5412
5412
|
#
|
5413
5413
|
# Cross
|
5414
5414
|
#
|
@@ -5534,7 +5534,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5534
5534
|
response = await getattr(self, method)(self.extend(request, query))
|
5535
5535
|
return self.parse_margin_modification(response, market)
|
5536
5536
|
|
5537
|
-
def parse_margin_modification(self, data, market=None):
|
5537
|
+
def parse_margin_modification(self, data, market: Market = None):
|
5538
5538
|
#
|
5539
5539
|
# {
|
5540
5540
|
# "value": "11.9257",
|
@@ -5650,7 +5650,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5650
5650
|
#
|
5651
5651
|
return self.parse_open_interests(response, market, since, limit)
|
5652
5652
|
|
5653
|
-
def parse_open_interest(self, interest, market=None):
|
5653
|
+
def parse_open_interest(self, interest, market: Market = None):
|
5654
5654
|
#
|
5655
5655
|
# {
|
5656
5656
|
# "long_liq_size": "0",
|
@@ -5679,7 +5679,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5679
5679
|
'info': interest,
|
5680
5680
|
}
|
5681
5681
|
|
5682
|
-
async def fetch_settlement_history(self, symbol:
|
5682
|
+
async def fetch_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5683
5683
|
"""
|
5684
5684
|
fetches historical settlement records
|
5685
5685
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-settlement-history-2
|
@@ -5722,7 +5722,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5722
5722
|
sorted = self.sort_by(settlements, 'timestamp')
|
5723
5723
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
5724
5724
|
|
5725
|
-
async def fetch_my_settlement_history(self, symbol:
|
5725
|
+
async def fetch_my_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5726
5726
|
"""
|
5727
5727
|
fetches historical settlement records of the user
|
5728
5728
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-my-options-settlements
|
@@ -5844,7 +5844,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5844
5844
|
result.append(self.parse_settlement(settlements[i], market))
|
5845
5845
|
return result
|
5846
5846
|
|
5847
|
-
async def fetch_ledger(self, code:
|
5847
|
+
async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
5848
5848
|
"""
|
5849
5849
|
fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
5850
5850
|
:see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book
|
@@ -5948,7 +5948,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5948
5948
|
#
|
5949
5949
|
return self.parse_ledger(response, currency, since, limit)
|
5950
5950
|
|
5951
|
-
def parse_ledger_entry(self, item, currency=None):
|
5951
|
+
def parse_ledger_entry(self, item, currency: Currency = None):
|
5952
5952
|
#
|
5953
5953
|
# spot
|
5954
5954
|
#
|
@@ -6159,7 +6159,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6159
6159
|
#
|
6160
6160
|
return self.parse_liquidations(response, market, since, limit)
|
6161
6161
|
|
6162
|
-
async def fetch_my_liquidations(self, symbol:
|
6162
|
+
async def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6163
6163
|
"""
|
6164
6164
|
retrieves the users liquidated positions
|
6165
6165
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history
|
@@ -6229,7 +6229,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6229
6229
|
#
|
6230
6230
|
return self.parse_liquidations(response, market, since, limit)
|
6231
6231
|
|
6232
|
-
def parse_liquidation(self, liquidation, market=None):
|
6232
|
+
def parse_liquidation(self, liquidation, market: Market = None):
|
6233
6233
|
#
|
6234
6234
|
# fetchLiquidations
|
6235
6235
|
#
|
@@ -6335,7 +6335,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6335
6335
|
if entryMarketId == marketId:
|
6336
6336
|
return self.parse_greeks(entry, market)
|
6337
6337
|
|
6338
|
-
def parse_greeks(self, greeks, market=None):
|
6338
|
+
def parse_greeks(self, greeks, market: Market = None):
|
6339
6339
|
#
|
6340
6340
|
# {
|
6341
6341
|
# "vega": "1.78992",
|
ccxt/async_support/gemini.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.gemini import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, 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
|
@@ -730,7 +730,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
730
730
|
return await self.fetch_ticker_v2(symbol, params)
|
731
731
|
return await self.fetch_ticker_v1_and_v2(symbol, params)
|
732
732
|
|
733
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
733
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
734
734
|
#
|
735
735
|
# fetchTickers
|
736
736
|
#
|
@@ -845,7 +845,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
845
845
|
#
|
846
846
|
return self.parse_tickers(response, symbols)
|
847
847
|
|
848
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
848
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
849
849
|
#
|
850
850
|
# public fetchTrades
|
851
851
|
#
|
@@ -1020,7 +1020,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1020
1020
|
response = await self.privatePostV1Balances(params)
|
1021
1021
|
return self.parse_balance(response)
|
1022
1022
|
|
1023
|
-
def parse_order(self, order, market=None) -> Order:
|
1023
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1024
1024
|
#
|
1025
1025
|
# createOrder(private)
|
1026
1026
|
#
|
@@ -1180,7 +1180,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1180
1180
|
'trades': None,
|
1181
1181
|
}, market)
|
1182
1182
|
|
1183
|
-
async def fetch_order(self, id: str, symbol:
|
1183
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1184
1184
|
"""
|
1185
1185
|
fetches information on an order made by the user
|
1186
1186
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -1217,7 +1217,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1217
1217
|
#
|
1218
1218
|
return self.parse_order(response)
|
1219
1219
|
|
1220
|
-
async def fetch_open_orders(self, symbol:
|
1220
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1221
1221
|
"""
|
1222
1222
|
fetch all unfilled currently open orders
|
1223
1223
|
:param str symbol: unified market symbol
|
@@ -1343,7 +1343,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1343
1343
|
#
|
1344
1344
|
return self.parse_order(response)
|
1345
1345
|
|
1346
|
-
async def cancel_order(self, id: str, symbol:
|
1346
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1347
1347
|
"""
|
1348
1348
|
cancels an open order
|
1349
1349
|
:param str id: order id
|
@@ -1382,7 +1382,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1382
1382
|
#
|
1383
1383
|
return self.parse_order(response)
|
1384
1384
|
|
1385
|
-
async def fetch_my_trades(self, symbol:
|
1385
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1386
1386
|
"""
|
1387
1387
|
fetch all trades made by the user
|
1388
1388
|
:param str symbol: unified market symbol
|
@@ -1458,7 +1458,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1458
1458
|
return self.milliseconds()
|
1459
1459
|
return self.seconds()
|
1460
1460
|
|
1461
|
-
async def fetch_deposits_withdrawals(self, code:
|
1461
|
+
async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1462
1462
|
"""
|
1463
1463
|
fetch history of deposits and withdrawals
|
1464
1464
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
@@ -1476,7 +1476,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1476
1476
|
response = await self.privatePostV1Transfers(self.extend(request, params))
|
1477
1477
|
return self.parse_transactions(response)
|
1478
1478
|
|
1479
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1479
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1480
1480
|
#
|
1481
1481
|
# withdraw
|
1482
1482
|
#
|
@@ -1539,7 +1539,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1539
1539
|
}
|
1540
1540
|
return self.safe_string(statuses, status, status)
|
1541
1541
|
|
1542
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
1542
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1543
1543
|
#
|
1544
1544
|
# {
|
1545
1545
|
# "address": "0xed6494Fe7c1E56d1bd6136e89268C51E32d9708B",
|
ccxt/async_support/hitbtc.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.hitbtc import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, MarginMode, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, MarginMode, 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
|
@@ -1082,7 +1082,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1082
1082
|
result[symbol] = self.parse_ticker(entry, market)
|
1083
1083
|
return self.filter_by_array_tickers(result, 'symbol', symbols)
|
1084
1084
|
|
1085
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
1085
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
1086
1086
|
#
|
1087
1087
|
# {
|
1088
1088
|
# "ask": "62756.01",
|
@@ -1161,7 +1161,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1161
1161
|
trades = self.array_concat(trades, parsed)
|
1162
1162
|
return trades
|
1163
1163
|
|
1164
|
-
async def fetch_my_trades(self, symbol:
|
1164
|
+
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1165
1165
|
"""
|
1166
1166
|
fetch all trades made by the user
|
1167
1167
|
:param str symbol: unified market symbol
|
@@ -1195,7 +1195,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1195
1195
|
response = await getattr(self, method)(self.extend(request, query))
|
1196
1196
|
return self.parse_trades(response, market, since, limit)
|
1197
1197
|
|
1198
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
1198
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1199
1199
|
#
|
1200
1200
|
# createOrder(market)
|
1201
1201
|
#
|
@@ -1351,7 +1351,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1351
1351
|
}
|
1352
1352
|
return self.safe_string(types, type, type)
|
1353
1353
|
|
1354
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1354
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1355
1355
|
#
|
1356
1356
|
# transaction
|
1357
1357
|
#
|
@@ -1434,7 +1434,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1434
1434
|
'fee': fee,
|
1435
1435
|
}
|
1436
1436
|
|
1437
|
-
async def fetch_deposits_withdrawals(self, code:
|
1437
|
+
async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1438
1438
|
"""
|
1439
1439
|
fetch history of deposits and withdrawals
|
1440
1440
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
@@ -1445,7 +1445,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1445
1445
|
"""
|
1446
1446
|
return await self.fetch_transactions_helper('DEPOSIT,WITHDRAW', code, since, limit, params)
|
1447
1447
|
|
1448
|
-
async def fetch_deposits(self, code:
|
1448
|
+
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1449
1449
|
"""
|
1450
1450
|
fetch all deposits made to an account
|
1451
1451
|
:param str code: unified currency code
|
@@ -1456,7 +1456,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1456
1456
|
"""
|
1457
1457
|
return await self.fetch_transactions_helper('DEPOSIT', code, since, limit, params)
|
1458
1458
|
|
1459
|
-
async def fetch_withdrawals(self, code:
|
1459
|
+
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1460
1460
|
"""
|
1461
1461
|
fetch all withdrawals made from an account
|
1462
1462
|
:param str code: unified currency code
|
@@ -1514,7 +1514,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1514
1514
|
timestamp = self.parse8601(self.safe_string(response, 'timestamp'))
|
1515
1515
|
return self.parse_order_book(response, symbol, timestamp, 'bid', 'ask')
|
1516
1516
|
|
1517
|
-
def parse_trading_fee(self, fee, market=None):
|
1517
|
+
def parse_trading_fee(self, fee, market: Market = None):
|
1518
1518
|
#
|
1519
1519
|
# {
|
1520
1520
|
# "symbol":"ARVUSDT", # returned from fetchTradingFees only
|
@@ -1658,7 +1658,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1658
1658
|
#
|
1659
1659
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
1660
1660
|
|
1661
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1661
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1662
1662
|
#
|
1663
1663
|
# Spot and Swap
|
1664
1664
|
#
|
@@ -1691,7 +1691,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1691
1691
|
self.safe_number(ohlcv, 'volume'),
|
1692
1692
|
]
|
1693
1693
|
|
1694
|
-
async def fetch_closed_orders(self, symbol:
|
1694
|
+
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1695
1695
|
"""
|
1696
1696
|
fetches information on multiple closed orders made by the user
|
1697
1697
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1726,7 +1726,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1726
1726
|
parsed = self.parse_orders(response, market, since, limit)
|
1727
1727
|
return self.filter_by_array(parsed, 'status', ['closed', 'canceled'], False)
|
1728
1728
|
|
1729
|
-
async def fetch_order(self, id: str, symbol:
|
1729
|
+
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1730
1730
|
"""
|
1731
1731
|
fetches information on an order made by the user
|
1732
1732
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -1775,7 +1775,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1775
1775
|
order = self.safe_value(response, 0)
|
1776
1776
|
return self.parse_order(order, market)
|
1777
1777
|
|
1778
|
-
async def fetch_order_trades(self, id: str, symbol:
|
1778
|
+
async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1779
1779
|
"""
|
1780
1780
|
fetch all the trades made from a single order
|
1781
1781
|
:param str id: order id
|
@@ -1845,7 +1845,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1845
1845
|
#
|
1846
1846
|
return self.parse_trades(response, market, since, limit)
|
1847
1847
|
|
1848
|
-
async def fetch_open_orders(self, symbol:
|
1848
|
+
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1849
1849
|
"""
|
1850
1850
|
fetch all unfilled currently open orders
|
1851
1851
|
:param str symbol: unified market symbol
|
@@ -1894,7 +1894,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1894
1894
|
#
|
1895
1895
|
return self.parse_orders(response, market, since, limit)
|
1896
1896
|
|
1897
|
-
async def fetch_open_order(self, id: str, symbol:
|
1897
|
+
async def fetch_open_order(self, id: str, symbol: Str = None, params={}):
|
1898
1898
|
"""
|
1899
1899
|
fetch an open order by it's id
|
1900
1900
|
:param str id: order id
|
@@ -1924,7 +1924,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1924
1924
|
response = await getattr(self, method)(self.extend(request, query))
|
1925
1925
|
return self.parse_order(response, market)
|
1926
1926
|
|
1927
|
-
async def cancel_all_orders(self, symbol:
|
1927
|
+
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1928
1928
|
"""
|
1929
1929
|
cancel all open orders
|
1930
1930
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
@@ -1952,7 +1952,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1952
1952
|
response = await getattr(self, method)(self.extend(request, query))
|
1953
1953
|
return self.parse_orders(response, market)
|
1954
1954
|
|
1955
|
-
async def cancel_order(self, id: str, symbol:
|
1955
|
+
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1956
1956
|
"""
|
1957
1957
|
cancels an open order
|
1958
1958
|
:param str id: order id
|
@@ -2106,7 +2106,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2106
2106
|
}
|
2107
2107
|
return self.safe_string(statuses, status, status)
|
2108
2108
|
|
2109
|
-
def parse_order(self, order, market=None) -> Order:
|
2109
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
2110
2110
|
#
|
2111
2111
|
# limit
|
2112
2112
|
# {
|
@@ -2225,7 +2225,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2225
2225
|
'stopLossPrice': None,
|
2226
2226
|
}, market)
|
2227
2227
|
|
2228
|
-
async def fetch_margin_mode(self, symbol:
|
2228
|
+
async def fetch_margin_mode(self, symbol: Str = None, params={}) -> MarginMode:
|
2229
2229
|
"""
|
2230
2230
|
fetches margin mode of the user
|
2231
2231
|
:see: https://api.hitbtc.com/#get-margin-position-parameters
|
@@ -2331,7 +2331,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2331
2331
|
#
|
2332
2332
|
return self.parse_transfer(response, currency)
|
2333
2333
|
|
2334
|
-
def parse_transfer(self, transfer, currency=None):
|
2334
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
2335
2335
|
#
|
2336
2336
|
# transfer
|
2337
2337
|
#
|
@@ -2466,7 +2466,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2466
2466
|
fundingRates[symbol] = fundingRate
|
2467
2467
|
return self.filter_by_array(fundingRates, 'symbol', symbols)
|
2468
2468
|
|
2469
|
-
async def fetch_funding_rate_history(self, symbol:
|
2469
|
+
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2470
2470
|
"""
|
2471
2471
|
:see: https://api.hitbtc.com/#funding-history
|
2472
2472
|
fetches historical funding rate prices
|
@@ -2655,7 +2655,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2655
2655
|
#
|
2656
2656
|
return self.parse_position(response, market)
|
2657
2657
|
|
2658
|
-
def parse_position(self, position, market=None):
|
2658
|
+
def parse_position(self, position, market: Market = None):
|
2659
2659
|
#
|
2660
2660
|
# [
|
2661
2661
|
# {
|
@@ -2739,7 +2739,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2739
2739
|
'takeProfitPrice': None,
|
2740
2740
|
})
|
2741
2741
|
|
2742
|
-
def parse_open_interest(self, interest, market=None):
|
2742
|
+
def parse_open_interest(self, interest, market: Market = None):
|
2743
2743
|
#
|
2744
2744
|
# {
|
2745
2745
|
# "contract_type": "perpetual",
|
@@ -2832,7 +2832,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2832
2832
|
#
|
2833
2833
|
return self.parse_funding_rate(response, market)
|
2834
2834
|
|
2835
|
-
def parse_funding_rate(self, contract, market=None):
|
2835
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
2836
2836
|
#
|
2837
2837
|
# {
|
2838
2838
|
# "contract_type": "perpetual",
|
@@ -2919,7 +2919,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2919
2919
|
'type': type,
|
2920
2920
|
})
|
2921
2921
|
|
2922
|
-
def parse_margin_modification(self, data, market=None):
|
2922
|
+
def parse_margin_modification(self, data, market: Market = None):
|
2923
2923
|
currencies = self.safe_value(data, 'currencies', [])
|
2924
2924
|
currencyInfo = self.safe_value(currencies, 0)
|
2925
2925
|
return {
|
@@ -3012,7 +3012,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
3012
3012
|
#
|
3013
3013
|
return self.safe_number(response, 'leverage')
|
3014
3014
|
|
3015
|
-
async def set_leverage(self, leverage, symbol:
|
3015
|
+
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
3016
3016
|
"""
|
3017
3017
|
set the level of leverage for a market
|
3018
3018
|
:param float leverage: the rate of leverage
|
@@ -3076,7 +3076,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
3076
3076
|
#
|
3077
3077
|
return self.parse_deposit_withdraw_fees(response, codes)
|
3078
3078
|
|
3079
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
3079
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
3080
3080
|
#
|
3081
3081
|
# {
|
3082
3082
|
# "full_name": "ConnectWealth",
|