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/gate.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.gate import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Greeks, Int, Order, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory,
|
9
|
+
from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, FundingHistory, 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
|
@@ -1756,7 +1756,7 @@ class gate(Exchange, ImplicitAPI):
|
|
1756
1756
|
result = self.parse_funding_rates(response)
|
1757
1757
|
return self.filter_by_array(result, 'symbol', symbols)
|
1758
1758
|
|
1759
|
-
def parse_funding_rate(self, contract, market=None):
|
1759
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
1760
1760
|
#
|
1761
1761
|
# {
|
1762
1762
|
# "name": "BTC_USDT",
|
@@ -1980,7 +1980,7 @@ class gate(Exchange, ImplicitAPI):
|
|
1980
1980
|
result[symbol] = self.parse_trading_fee(response, market)
|
1981
1981
|
return result
|
1982
1982
|
|
1983
|
-
def parse_trading_fee(self, info, market=None):
|
1983
|
+
def parse_trading_fee(self, info, market: Market = None):
|
1984
1984
|
#
|
1985
1985
|
# {
|
1986
1986
|
# "user_id": 1486602,
|
@@ -2091,7 +2091,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2091
2091
|
#
|
2092
2092
|
return self.parse_deposit_withdraw_fees(response, codes, 'currency')
|
2093
2093
|
|
2094
|
-
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
2094
|
+
def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
|
2095
2095
|
#
|
2096
2096
|
# {
|
2097
2097
|
# "currency": "MTN",
|
@@ -2138,7 +2138,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2138
2138
|
}
|
2139
2139
|
return result
|
2140
2140
|
|
2141
|
-
def fetch_funding_history(self, symbol:
|
2141
|
+
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2142
2142
|
"""
|
2143
2143
|
fetch the history of funding payments paid and received on self account
|
2144
2144
|
:see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
|
@@ -2190,7 +2190,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2190
2190
|
sorted = self.sort_by(result, 'timestamp')
|
2191
2191
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
2192
2192
|
|
2193
|
-
def parse_funding_history(self, info, market=None):
|
2193
|
+
def parse_funding_history(self, info, market: Market = None):
|
2194
2194
|
#
|
2195
2195
|
# {
|
2196
2196
|
# "time": 1646899200,
|
@@ -2358,7 +2358,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2358
2358
|
ticker = self.safe_value(response, 0)
|
2359
2359
|
return self.parse_ticker(ticker, market)
|
2360
2360
|
|
2361
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
2361
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
2362
2362
|
#
|
2363
2363
|
# SPOT
|
2364
2364
|
#
|
@@ -2795,7 +2795,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2795
2795
|
response = self.publicOptionsGetCandlesticks(self.extend(request, params))
|
2796
2796
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
2797
2797
|
|
2798
|
-
def fetch_funding_rate_history(self, symbol:
|
2798
|
+
def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2799
2799
|
"""
|
2800
2800
|
fetches historical funding rate prices
|
2801
2801
|
:see: https://www.gate.io/docs/developers/apiv4/en/#funding-rate-history
|
@@ -2835,7 +2835,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2835
2835
|
sorted = self.sort_by(rates, 'timestamp')
|
2836
2836
|
return self.filter_by_symbol_since_limit(sorted, market['symbol'], since, limit)
|
2837
2837
|
|
2838
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
2838
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
2839
2839
|
#
|
2840
2840
|
# Spot market candles
|
2841
2841
|
#
|
@@ -2981,7 +2981,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2981
2981
|
#
|
2982
2982
|
return self.parse_trades(response, market, since, limit)
|
2983
2983
|
|
2984
|
-
def fetch_order_trades(self, id: str, symbol:
|
2984
|
+
def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2985
2985
|
"""
|
2986
2986
|
fetch all the trades made from a single order
|
2987
2987
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
|
@@ -3019,7 +3019,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3019
3019
|
response = self.fetch_my_trades(symbol, since, limit, {'order_id': id})
|
3020
3020
|
return response
|
3021
3021
|
|
3022
|
-
def fetch_my_trades(self, symbol:
|
3022
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3023
3023
|
"""
|
3024
3024
|
Fetch personal trading history
|
3025
3025
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-personal-trading-history
|
@@ -3144,7 +3144,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3144
3144
|
#
|
3145
3145
|
return self.parse_trades(response, market, since, limit)
|
3146
3146
|
|
3147
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
3147
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
3148
3148
|
#
|
3149
3149
|
# public
|
3150
3150
|
#
|
@@ -3286,7 +3286,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3286
3286
|
'fees': fees,
|
3287
3287
|
}, market)
|
3288
3288
|
|
3289
|
-
def fetch_deposits(self, code:
|
3289
|
+
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
3290
3290
|
"""
|
3291
3291
|
fetch all deposits made to an account
|
3292
3292
|
:see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-deposit-records
|
@@ -3318,7 +3318,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3318
3318
|
response = self.privateWalletGetDeposits(self.extend(request, params))
|
3319
3319
|
return self.parse_transactions(response, currency)
|
3320
3320
|
|
3321
|
-
def fetch_withdrawals(self, code:
|
3321
|
+
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
3322
3322
|
"""
|
3323
3323
|
fetch all withdrawals made from an account
|
3324
3324
|
:see: https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-records
|
@@ -3410,7 +3410,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3410
3410
|
}
|
3411
3411
|
return self.safe_string(types, type, type)
|
3412
3412
|
|
3413
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
3413
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
3414
3414
|
#
|
3415
3415
|
# deposits
|
3416
3416
|
#
|
@@ -3937,7 +3937,7 @@ class gate(Exchange, ImplicitAPI):
|
|
3937
3937
|
}
|
3938
3938
|
return self.safe_string(statuses, status, status)
|
3939
3939
|
|
3940
|
-
def parse_order(self, order, market=None) -> Order:
|
3940
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
3941
3941
|
#
|
3942
3942
|
# SPOT
|
3943
3943
|
# createOrder/cancelOrder/fetchOrder/editOrder
|
@@ -4186,7 +4186,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4186
4186
|
'info': order,
|
4187
4187
|
}, market)
|
4188
4188
|
|
4189
|
-
def fetch_order(self, id: str, symbol:
|
4189
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
4190
4190
|
"""
|
4191
4191
|
Retrieves information on an order
|
4192
4192
|
:see: https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order
|
@@ -4228,7 +4228,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4228
4228
|
response = getattr(self, method)(self.extend(request, requestParams))
|
4229
4229
|
return self.parse_order(response, market)
|
4230
4230
|
|
4231
|
-
def fetch_open_orders(self, symbol:
|
4231
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
4232
4232
|
"""
|
4233
4233
|
fetch all unfilled currently open orders
|
4234
4234
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-all-open-orders
|
@@ -4243,7 +4243,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4243
4243
|
"""
|
4244
4244
|
return self.fetch_orders_by_status('open', symbol, since, limit, params)
|
4245
4245
|
|
4246
|
-
def fetch_closed_orders(self, symbol:
|
4246
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
4247
4247
|
"""
|
4248
4248
|
fetches information on multiple closed orders made by the user
|
4249
4249
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-orders
|
@@ -4264,7 +4264,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4264
4264
|
"""
|
4265
4265
|
return self.fetch_orders_by_status('finished', symbol, since, limit, params)
|
4266
4266
|
|
4267
|
-
def fetch_orders_by_status(self, status, symbol:
|
4267
|
+
def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4268
4268
|
self.load_markets()
|
4269
4269
|
market = None
|
4270
4270
|
if symbol is not None:
|
@@ -4449,7 +4449,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4449
4449
|
orders = self.parse_orders(result, market, since, limit)
|
4450
4450
|
return self.filter_by_symbol_since_limit(orders, symbol, since, limit)
|
4451
4451
|
|
4452
|
-
def cancel_order(self, id: str, symbol:
|
4452
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
4453
4453
|
"""
|
4454
4454
|
Cancels an open order
|
4455
4455
|
:see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-single-order
|
@@ -4561,7 +4561,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4561
4561
|
#
|
4562
4562
|
return self.parse_order(response, market)
|
4563
4563
|
|
4564
|
-
def cancel_all_orders(self, symbol:
|
4564
|
+
def cancel_all_orders(self, symbol: Str = None, params={}):
|
4565
4565
|
"""
|
4566
4566
|
cancel all open orders
|
4567
4567
|
:see: https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
|
@@ -4671,7 +4671,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4671
4671
|
#
|
4672
4672
|
return self.parse_transfer(response, currency)
|
4673
4673
|
|
4674
|
-
def parse_transfer(self, transfer, currency=None):
|
4674
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
4675
4675
|
timestamp = self.milliseconds()
|
4676
4676
|
return {
|
4677
4677
|
'id': self.safe_string(transfer, 'tx_id'),
|
@@ -4685,7 +4685,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4685
4685
|
'info': transfer,
|
4686
4686
|
}
|
4687
4687
|
|
4688
|
-
def set_leverage(self, leverage, symbol:
|
4688
|
+
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
4689
4689
|
"""
|
4690
4690
|
set the level of leverage for a market
|
4691
4691
|
:see: https://www.gate.io/docs/developers/apiv4/en/#update-position-leverage
|
@@ -4748,7 +4748,7 @@ class gate(Exchange, ImplicitAPI):
|
|
4748
4748
|
#
|
4749
4749
|
return response
|
4750
4750
|
|
4751
|
-
def parse_position(self, position, market=None):
|
4751
|
+
def parse_position(self, position, market: Market = None):
|
4752
4752
|
#
|
4753
4753
|
# swap and future
|
4754
4754
|
#
|
@@ -5137,7 +5137,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5137
5137
|
#
|
5138
5138
|
return self.parse_leverage_tiers(response, symbols, 'name')
|
5139
5139
|
|
5140
|
-
def parse_market_leverage_tiers(self, info, market=None):
|
5140
|
+
def parse_market_leverage_tiers(self, info, market: Market = None):
|
5141
5141
|
"""
|
5142
5142
|
* @ignore
|
5143
5143
|
https://www.gate.io/help/futures/perpetual/22162/instrctions-of-risk-limit
|
@@ -5257,7 +5257,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5257
5257
|
floor = cap
|
5258
5258
|
return tiers
|
5259
5259
|
|
5260
|
-
def repay_margin(self, code: str, amount, symbol:
|
5260
|
+
def repay_margin(self, code: str, amount, symbol: Str = None, params={}):
|
5261
5261
|
"""
|
5262
5262
|
repay borrowed margin and interest
|
5263
5263
|
:see: https://www.gate.io/docs/apiv4/en/#repay-cross-margin-loan
|
@@ -5335,7 +5335,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5335
5335
|
response = response[0]
|
5336
5336
|
return self.parse_margin_loan(response, currency)
|
5337
5337
|
|
5338
|
-
def borrow_margin(self, code: str, amount, symbol:
|
5338
|
+
def borrow_margin(self, code: str, amount, symbol: Str = None, params={}):
|
5339
5339
|
"""
|
5340
5340
|
create a loan to borrow margin
|
5341
5341
|
:see: https://www.gate.io/docs/apiv4/en/#create-a-cross-margin-borrow-loan
|
@@ -5407,7 +5407,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5407
5407
|
#
|
5408
5408
|
return self.parse_margin_loan(response, currency)
|
5409
5409
|
|
5410
|
-
def parse_margin_loan(self, info, currency=None):
|
5410
|
+
def parse_margin_loan(self, info, currency: Currency = None):
|
5411
5411
|
#
|
5412
5412
|
# Cross
|
5413
5413
|
#
|
@@ -5533,7 +5533,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5533
5533
|
response = getattr(self, method)(self.extend(request, query))
|
5534
5534
|
return self.parse_margin_modification(response, market)
|
5535
5535
|
|
5536
|
-
def parse_margin_modification(self, data, market=None):
|
5536
|
+
def parse_margin_modification(self, data, market: Market = None):
|
5537
5537
|
#
|
5538
5538
|
# {
|
5539
5539
|
# "value": "11.9257",
|
@@ -5649,7 +5649,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5649
5649
|
#
|
5650
5650
|
return self.parse_open_interests(response, market, since, limit)
|
5651
5651
|
|
5652
|
-
def parse_open_interest(self, interest, market=None):
|
5652
|
+
def parse_open_interest(self, interest, market: Market = None):
|
5653
5653
|
#
|
5654
5654
|
# {
|
5655
5655
|
# "long_liq_size": "0",
|
@@ -5678,7 +5678,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5678
5678
|
'info': interest,
|
5679
5679
|
}
|
5680
5680
|
|
5681
|
-
def fetch_settlement_history(self, symbol:
|
5681
|
+
def fetch_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5682
5682
|
"""
|
5683
5683
|
fetches historical settlement records
|
5684
5684
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-settlement-history-2
|
@@ -5721,7 +5721,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5721
5721
|
sorted = self.sort_by(settlements, 'timestamp')
|
5722
5722
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
5723
5723
|
|
5724
|
-
def fetch_my_settlement_history(self, symbol:
|
5724
|
+
def fetch_my_settlement_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5725
5725
|
"""
|
5726
5726
|
fetches historical settlement records of the user
|
5727
5727
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-my-options-settlements
|
@@ -5843,7 +5843,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5843
5843
|
result.append(self.parse_settlement(settlements[i], market))
|
5844
5844
|
return result
|
5845
5845
|
|
5846
|
-
def fetch_ledger(self, code:
|
5846
|
+
def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
5847
5847
|
"""
|
5848
5848
|
fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
5849
5849
|
:see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book
|
@@ -5947,7 +5947,7 @@ class gate(Exchange, ImplicitAPI):
|
|
5947
5947
|
#
|
5948
5948
|
return self.parse_ledger(response, currency, since, limit)
|
5949
5949
|
|
5950
|
-
def parse_ledger_entry(self, item, currency=None):
|
5950
|
+
def parse_ledger_entry(self, item, currency: Currency = None):
|
5951
5951
|
#
|
5952
5952
|
# spot
|
5953
5953
|
#
|
@@ -6158,7 +6158,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6158
6158
|
#
|
6159
6159
|
return self.parse_liquidations(response, market, since, limit)
|
6160
6160
|
|
6161
|
-
def fetch_my_liquidations(self, symbol:
|
6161
|
+
def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
6162
6162
|
"""
|
6163
6163
|
retrieves the users liquidated positions
|
6164
6164
|
:see: https://www.gate.io/docs/developers/apiv4/en/#list-liquidation-history
|
@@ -6228,7 +6228,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6228
6228
|
#
|
6229
6229
|
return self.parse_liquidations(response, market, since, limit)
|
6230
6230
|
|
6231
|
-
def parse_liquidation(self, liquidation, market=None):
|
6231
|
+
def parse_liquidation(self, liquidation, market: Market = None):
|
6232
6232
|
#
|
6233
6233
|
# fetchLiquidations
|
6234
6234
|
#
|
@@ -6334,7 +6334,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6334
6334
|
if entryMarketId == marketId:
|
6335
6335
|
return self.parse_greeks(entry, market)
|
6336
6336
|
|
6337
|
-
def parse_greeks(self, greeks, market=None):
|
6337
|
+
def parse_greeks(self, greeks, market: Market = None):
|
6338
6338
|
#
|
6339
6339
|
# {
|
6340
6340
|
# "vega": "1.78992",
|
ccxt/gemini.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.gemini import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -729,7 +729,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
729
729
|
return self.fetch_ticker_v2(symbol, params)
|
730
730
|
return self.fetch_ticker_v1_and_v2(symbol, params)
|
731
731
|
|
732
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
732
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
733
733
|
#
|
734
734
|
# fetchTickers
|
735
735
|
#
|
@@ -844,7 +844,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
844
844
|
#
|
845
845
|
return self.parse_tickers(response, symbols)
|
846
846
|
|
847
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
847
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
848
848
|
#
|
849
849
|
# public fetchTrades
|
850
850
|
#
|
@@ -1019,7 +1019,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1019
1019
|
response = self.privatePostV1Balances(params)
|
1020
1020
|
return self.parse_balance(response)
|
1021
1021
|
|
1022
|
-
def parse_order(self, order, market=None) -> Order:
|
1022
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1023
1023
|
#
|
1024
1024
|
# createOrder(private)
|
1025
1025
|
#
|
@@ -1179,7 +1179,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1179
1179
|
'trades': None,
|
1180
1180
|
}, market)
|
1181
1181
|
|
1182
|
-
def fetch_order(self, id: str, symbol:
|
1182
|
+
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1183
1183
|
"""
|
1184
1184
|
fetches information on an order made by the user
|
1185
1185
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -1216,7 +1216,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1216
1216
|
#
|
1217
1217
|
return self.parse_order(response)
|
1218
1218
|
|
1219
|
-
def fetch_open_orders(self, symbol:
|
1219
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1220
1220
|
"""
|
1221
1221
|
fetch all unfilled currently open orders
|
1222
1222
|
:param str symbol: unified market symbol
|
@@ -1342,7 +1342,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1342
1342
|
#
|
1343
1343
|
return self.parse_order(response)
|
1344
1344
|
|
1345
|
-
def cancel_order(self, id: str, symbol:
|
1345
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1346
1346
|
"""
|
1347
1347
|
cancels an open order
|
1348
1348
|
:param str id: order id
|
@@ -1381,7 +1381,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1381
1381
|
#
|
1382
1382
|
return self.parse_order(response)
|
1383
1383
|
|
1384
|
-
def fetch_my_trades(self, symbol:
|
1384
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1385
1385
|
"""
|
1386
1386
|
fetch all trades made by the user
|
1387
1387
|
:param str symbol: unified market symbol
|
@@ -1457,7 +1457,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1457
1457
|
return self.milliseconds()
|
1458
1458
|
return self.seconds()
|
1459
1459
|
|
1460
|
-
def fetch_deposits_withdrawals(self, code:
|
1460
|
+
def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1461
1461
|
"""
|
1462
1462
|
fetch history of deposits and withdrawals
|
1463
1463
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
@@ -1475,7 +1475,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1475
1475
|
response = self.privatePostV1Transfers(self.extend(request, params))
|
1476
1476
|
return self.parse_transactions(response)
|
1477
1477
|
|
1478
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1478
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1479
1479
|
#
|
1480
1480
|
# withdraw
|
1481
1481
|
#
|
@@ -1538,7 +1538,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1538
1538
|
}
|
1539
1539
|
return self.safe_string(statuses, status, status)
|
1540
1540
|
|
1541
|
-
def parse_deposit_address(self, depositAddress, currency=None):
|
1541
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1542
1542
|
#
|
1543
1543
|
# {
|
1544
1544
|
# "address": "0xed6494Fe7c1E56d1bd6136e89268C51E32d9708B",
|
ccxt/hitbtc.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.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
|
-
def fetch_my_trades(self, symbol:
|
1164
|
+
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 = 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
|
-
def fetch_deposits_withdrawals(self, code:
|
1437
|
+
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 self.fetch_transactions_helper('DEPOSIT,WITHDRAW', code, since, limit, params)
|
1447
1447
|
|
1448
|
-
def fetch_deposits(self, code:
|
1448
|
+
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 self.fetch_transactions_helper('DEPOSIT', code, since, limit, params)
|
1458
1458
|
|
1459
|
-
def fetch_withdrawals(self, code:
|
1459
|
+
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
|
-
def fetch_closed_orders(self, symbol:
|
1694
|
+
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
|
-
def fetch_order(self, id: str, symbol:
|
1729
|
+
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
|
-
def fetch_order_trades(self, id: str, symbol:
|
1778
|
+
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
|
-
def fetch_open_orders(self, symbol:
|
1848
|
+
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
|
-
def fetch_open_order(self, id: str, symbol:
|
1897
|
+
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 = getattr(self, method)(self.extend(request, query))
|
1925
1925
|
return self.parse_order(response, market)
|
1926
1926
|
|
1927
|
-
def cancel_all_orders(self, symbol:
|
1927
|
+
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 = getattr(self, method)(self.extend(request, query))
|
1953
1953
|
return self.parse_orders(response, market)
|
1954
1954
|
|
1955
|
-
def cancel_order(self, id: str, symbol:
|
1955
|
+
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
|
-
def fetch_margin_mode(self, symbol:
|
2228
|
+
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
|
-
def fetch_funding_rate_history(self, symbol:
|
2469
|
+
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
|
-
def set_leverage(self, leverage, symbol:
|
3015
|
+
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",
|