ccxt 4.2.87__py2.py3-none-any.whl → 4.2.89__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 +1 -1
- ccxt/ascendex.py +5 -3
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ascendex.py +5 -3
- ccxt/async_support/base/exchange.py +3 -2
- ccxt/async_support/bigone.py +2 -2
- ccxt/async_support/binance.py +17 -11
- ccxt/async_support/bingx.py +2 -2
- ccxt/async_support/bit2c.py +2 -2
- ccxt/async_support/bitbank.py +2 -2
- ccxt/async_support/bitfinex.py +2 -2
- ccxt/async_support/bitfinex2.py +3 -3
- ccxt/async_support/bitflyer.py +4 -2
- ccxt/async_support/bitget.py +27 -21
- ccxt/async_support/bitmart.py +6 -4
- ccxt/async_support/bitmex.py +2 -2
- ccxt/async_support/bitopro.py +3 -3
- ccxt/async_support/bitrue.py +2 -2
- ccxt/async_support/bitso.py +2 -2
- ccxt/async_support/bitstamp.py +89 -97
- ccxt/async_support/bitteam.py +2 -2
- ccxt/async_support/bitvavo.py +3 -3
- ccxt/async_support/bl3p.py +2 -2
- ccxt/async_support/blockchaincom.py +2 -2
- ccxt/async_support/blofin.py +4 -2
- ccxt/async_support/bybit.py +7 -5
- ccxt/async_support/cex.py +3 -3
- ccxt/async_support/coinbase.py +2 -2
- ccxt/async_support/coinbaseinternational.py +2 -2
- ccxt/async_support/coinbasepro.py +3 -3
- ccxt/async_support/coincheck.py +2 -2
- ccxt/async_support/coinex.py +5 -5
- ccxt/async_support/coinlist.py +3 -3
- ccxt/async_support/coinmate.py +2 -2
- ccxt/async_support/coinmetro.py +2 -2
- ccxt/async_support/coinone.py +2 -2
- ccxt/async_support/coinsph.py +6 -4
- ccxt/async_support/cryptocom.py +1 -1
- ccxt/async_support/currencycom.py +3 -3
- ccxt/async_support/delta.py +2 -2
- ccxt/async_support/deribit.py +3 -3
- ccxt/async_support/digifinex.py +6 -4
- ccxt/async_support/exmo.py +3 -3
- ccxt/async_support/gate.py +20 -18
- ccxt/async_support/gemini.py +3 -3
- ccxt/async_support/hitbtc.py +7 -5
- ccxt/async_support/hollaex.py +3 -3
- ccxt/async_support/htx.py +6 -4
- ccxt/async_support/huobijp.py +2 -2
- ccxt/async_support/hyperliquid.py +2 -2
- ccxt/async_support/idex.py +3 -3
- ccxt/async_support/independentreserve.py +2 -2
- ccxt/async_support/kraken.py +3 -3
- ccxt/async_support/krakenfutures.py +2 -1
- ccxt/async_support/kucoin.py +49 -22
- ccxt/async_support/kuna.py +2 -2
- ccxt/async_support/latoken.py +7 -3
- ccxt/async_support/lbank.py +7 -5
- ccxt/async_support/luno.py +4 -2
- ccxt/async_support/lykke.py +2 -2
- ccxt/async_support/mexc.py +57 -10
- ccxt/async_support/ndax.py +2 -2
- ccxt/async_support/oceanex.py +2 -2
- ccxt/async_support/okcoin.py +2 -2
- ccxt/async_support/okx.py +6 -4
- ccxt/async_support/onetrading.py +3 -3
- ccxt/async_support/phemex.py +2 -2
- ccxt/async_support/poloniex.py +3 -3
- ccxt/async_support/probit.py +2 -2
- ccxt/async_support/timex.py +6 -4
- ccxt/async_support/upbit.py +2 -2
- ccxt/async_support/wazirx.py +2 -2
- ccxt/async_support/whitebit.py +3 -3
- ccxt/async_support/woo.py +3 -3
- ccxt/async_support/yobit.py +2 -2
- ccxt/base/exchange.py +35 -9
- ccxt/base/types.py +32 -0
- ccxt/bigone.py +2 -2
- ccxt/binance.py +17 -11
- ccxt/bingx.py +2 -2
- ccxt/bit2c.py +2 -2
- ccxt/bitbank.py +2 -2
- ccxt/bitfinex.py +2 -2
- ccxt/bitfinex2.py +3 -3
- ccxt/bitflyer.py +4 -2
- ccxt/bitget.py +27 -21
- ccxt/bitmart.py +6 -4
- ccxt/bitmex.py +2 -2
- ccxt/bitopro.py +3 -3
- ccxt/bitrue.py +2 -2
- ccxt/bitso.py +2 -2
- ccxt/bitstamp.py +89 -97
- ccxt/bitteam.py +2 -2
- ccxt/bitvavo.py +3 -3
- ccxt/bl3p.py +2 -2
- ccxt/blockchaincom.py +2 -2
- ccxt/blofin.py +4 -2
- ccxt/bybit.py +7 -5
- ccxt/cex.py +3 -3
- ccxt/coinbase.py +2 -2
- ccxt/coinbaseinternational.py +2 -2
- ccxt/coinbasepro.py +3 -3
- ccxt/coincheck.py +2 -2
- ccxt/coinex.py +5 -5
- ccxt/coinlist.py +3 -3
- ccxt/coinmate.py +2 -2
- ccxt/coinmetro.py +2 -2
- ccxt/coinone.py +2 -2
- ccxt/coinsph.py +6 -4
- ccxt/cryptocom.py +1 -1
- ccxt/currencycom.py +3 -3
- ccxt/delta.py +2 -2
- ccxt/deribit.py +3 -3
- ccxt/digifinex.py +6 -4
- ccxt/exmo.py +3 -3
- ccxt/gate.py +20 -18
- ccxt/gemini.py +3 -3
- ccxt/hitbtc.py +7 -5
- ccxt/hollaex.py +3 -3
- ccxt/htx.py +6 -4
- ccxt/huobijp.py +2 -2
- ccxt/hyperliquid.py +2 -2
- ccxt/idex.py +3 -3
- ccxt/independentreserve.py +2 -2
- ccxt/kraken.py +3 -3
- ccxt/krakenfutures.py +2 -1
- ccxt/kucoin.py +49 -22
- ccxt/kuna.py +2 -2
- ccxt/latoken.py +7 -3
- ccxt/lbank.py +7 -5
- ccxt/luno.py +4 -2
- ccxt/lykke.py +2 -2
- ccxt/mexc.py +57 -10
- ccxt/ndax.py +2 -2
- ccxt/oceanex.py +2 -2
- ccxt/okcoin.py +2 -2
- ccxt/okx.py +6 -4
- ccxt/onetrading.py +3 -3
- ccxt/phemex.py +2 -2
- ccxt/poloniex.py +3 -3
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitget.py +2 -0
- ccxt/pro/bitvavo.py +2 -2
- ccxt/probit.py +2 -2
- ccxt/timex.py +6 -4
- ccxt/upbit.py +2 -2
- ccxt/wazirx.py +2 -2
- ccxt/whitebit.py +3 -3
- ccxt/woo.py +3 -3
- ccxt/yobit.py +2 -2
- {ccxt-4.2.87.dist-info → ccxt-4.2.89.dist-info}/METADATA +5 -6
- {ccxt-4.2.87.dist-info → ccxt-4.2.89.dist-info}/RECORD +154 -154
- {ccxt-4.2.87.dist-info → ccxt-4.2.89.dist-info}/WHEEL +0 -0
- {ccxt-4.2.87.dist-info → ccxt-4.2.89.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/ascendex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.ascendex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currency, Int, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -395,7 +395,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
395
395
|
lowercaseAccount = account.lower()
|
396
396
|
return self.capitalize(lowercaseAccount)
|
397
397
|
|
398
|
-
def fetch_currencies(self, params={}):
|
398
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
399
399
|
"""
|
400
400
|
fetches all available currencies on an exchange
|
401
401
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1394,7 +1394,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1394
1394
|
'trades': None,
|
1395
1395
|
}, market)
|
1396
1396
|
|
1397
|
-
def fetch_trading_fees(self, params={}):
|
1397
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
1398
1398
|
"""
|
1399
1399
|
fetch the trading fees for multiple markets
|
1400
1400
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1437,6 +1437,8 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1437
1437
|
'symbol': symbol,
|
1438
1438
|
'maker': self.safe_number(takerMaker, 'maker'),
|
1439
1439
|
'taker': self.safe_number(takerMaker, 'taker'),
|
1440
|
+
'percentage': None,
|
1441
|
+
'tierBased': None,
|
1440
1442
|
}
|
1441
1443
|
return result
|
1442
1444
|
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/ascendex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.ascendex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currency, Int, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -395,7 +395,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
395
395
|
lowercaseAccount = account.lower()
|
396
396
|
return self.capitalize(lowercaseAccount)
|
397
397
|
|
398
|
-
async def fetch_currencies(self, params={}):
|
398
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
399
399
|
"""
|
400
400
|
fetches all available currencies on an exchange
|
401
401
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1394,7 +1394,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1394
1394
|
'trades': None,
|
1395
1395
|
}, market)
|
1396
1396
|
|
1397
|
-
async def fetch_trading_fees(self, params={}):
|
1397
|
+
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
1398
1398
|
"""
|
1399
1399
|
fetch the trading fees for multiple markets
|
1400
1400
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1437,6 +1437,8 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1437
1437
|
'symbol': symbol,
|
1438
1438
|
'maker': self.safe_number(takerMaker, 'maker'),
|
1439
1439
|
'taker': self.safe_number(takerMaker, 'taker'),
|
1440
|
+
'percentage': None,
|
1441
|
+
'tierBased': None,
|
1440
1442
|
}
|
1441
1443
|
return result
|
1442
1444
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.2.
|
5
|
+
__version__ = '4.2.89'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -1406,7 +1406,8 @@ class Exchange(BaseExchange):
|
|
1406
1406
|
async def fetch_trading_fee(self, symbol: str, params={}):
|
1407
1407
|
if not self.has['fetchTradingFees']:
|
1408
1408
|
raise NotSupported(self.id + ' fetchTradingFee() is not supported yet')
|
1409
|
-
|
1409
|
+
fees = await self.fetch_trading_fees(params)
|
1410
|
+
return self.safe_dict(fees, symbol)
|
1410
1411
|
|
1411
1412
|
async def fetch_funding_rate(self, symbol: str, params={}):
|
1412
1413
|
if self.has['fetchFundingRates']:
|
ccxt/async_support/bigone.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bigone import ImplicitAPI
|
8
8
|
import asyncio
|
9
|
-
from ccxt.base.types import Balances, Bool, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Bool, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -340,7 +340,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
340
340
|
},
|
341
341
|
})
|
342
342
|
|
343
|
-
async def fetch_currencies(self, params={}):
|
343
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
344
344
|
"""
|
345
345
|
fetches all available currencies on an exchange
|
346
346
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
ccxt/async_support/binance.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.binance import ImplicitAPI
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import json
|
11
|
-
from ccxt.base.types import Balances, Currency, Greeks, Int, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
11
|
+
from ccxt.base.types import Balances, Currencies, Currency, Greeks, Int, Leverage, Leverages, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
14
|
from ccxt.base.errors import PermissionDenied
|
@@ -1883,7 +1883,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1883
1883
|
'-4140': BadRequest, # Invalid symbol status for opening position
|
1884
1884
|
'-4141': OperationRejected, # Symbol is closed
|
1885
1885
|
'-4144': BadSymbol, # Invalid pair
|
1886
|
-
'-4164':
|
1886
|
+
'-4164': InvalidOrder, # {"code":-4164,"msg":"Order's notional must be no smaller than 20(unless you choose reduce only)."}
|
1887
1887
|
'-4165': BadRequest, # Invalid time interval
|
1888
1888
|
'-4167': BadRequest, # Unable to adjust to Multi-Assets mode with symbols of USDⓈ-M Futures under isolated-margin mode.
|
1889
1889
|
'-4168': BadRequest, # Unable to adjust to isolated-margin mode under the Multi-Assets mode.
|
@@ -2593,7 +2593,7 @@ class binance(Exchange, ImplicitAPI):
|
|
2593
2593
|
response = await self.publicGetTime(query)
|
2594
2594
|
return self.safe_integer(response, 'serverTime')
|
2595
2595
|
|
2596
|
-
async def fetch_currencies(self, params={}):
|
2596
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
2597
2597
|
"""
|
2598
2598
|
fetches all available currencies on an exchange
|
2599
2599
|
:see: https://binance-docs.github.io/apidocs/spot/en/#all-coins-39-information-user_data
|
@@ -8037,7 +8037,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8037
8037
|
# {id: '9a67628b16ba4988ae20d329333f16bc'}
|
8038
8038
|
return self.parse_transaction(response, currency)
|
8039
8039
|
|
8040
|
-
def parse_trading_fee(self, fee, market: Market = None):
|
8040
|
+
def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
|
8041
8041
|
#
|
8042
8042
|
# spot
|
8043
8043
|
# [
|
@@ -8062,9 +8062,11 @@ class binance(Exchange, ImplicitAPI):
|
|
8062
8062
|
'symbol': symbol,
|
8063
8063
|
'maker': self.safe_number_2(fee, 'makerCommission', 'makerCommissionRate'),
|
8064
8064
|
'taker': self.safe_number_2(fee, 'takerCommission', 'takerCommissionRate'),
|
8065
|
+
'percentage': None,
|
8066
|
+
'tierBased': None,
|
8065
8067
|
}
|
8066
8068
|
|
8067
|
-
async def fetch_trading_fee(self, symbol: str, params={}):
|
8069
|
+
async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
8068
8070
|
"""
|
8069
8071
|
fetch the trading fees for a market
|
8070
8072
|
:see: https://binance-docs.github.io/apidocs/spot/en/#trade-fee-user_data
|
@@ -8127,7 +8129,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8127
8129
|
data = self.safe_dict(data, 0, {})
|
8128
8130
|
return self.parse_trading_fee(data, market)
|
8129
8131
|
|
8130
|
-
async def fetch_trading_fees(self, params={}):
|
8132
|
+
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
8131
8133
|
"""
|
8132
8134
|
fetch the trading fees for multiple markets
|
8133
8135
|
:see: https://binance-docs.github.io/apidocs/spot/en/#trade-fee-user_data
|
@@ -8500,7 +8502,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8500
8502
|
'previousFundingDatetime': None,
|
8501
8503
|
}
|
8502
8504
|
|
8503
|
-
def parse_account_positions(self, account):
|
8505
|
+
def parse_account_positions(self, account, filterClosed=False):
|
8504
8506
|
positions = self.safe_list(account, 'positions')
|
8505
8507
|
assets = self.safe_list(account, 'assets', [])
|
8506
8508
|
balances = {}
|
@@ -8522,7 +8524,8 @@ class binance(Exchange, ImplicitAPI):
|
|
8522
8524
|
code = market['quote'] if market['linear'] else market['base']
|
8523
8525
|
maintenanceMargin = self.safe_string(position, 'maintMargin')
|
8524
8526
|
# check for maintenance margin so empty positions are not returned
|
8525
|
-
|
8527
|
+
isPositionOpen = (maintenanceMargin != '0') and (maintenanceMargin != '0.00000000')
|
8528
|
+
if not filterClosed or isPositionOpen:
|
8526
8529
|
# sometimes not all the codes are correctly returned...
|
8527
8530
|
if code in balances:
|
8528
8531
|
parsed = self.parse_account_position(self.extend(position, {
|
@@ -9288,10 +9291,11 @@ class binance(Exchange, ImplicitAPI):
|
|
9288
9291
|
:see: https://binance-docs.github.io/apidocs/delivery/en/#account-information-user_data
|
9289
9292
|
:see: https://binance-docs.github.io/apidocs/pm/en/#get-um-account-detail-user_data
|
9290
9293
|
:see: https://binance-docs.github.io/apidocs/pm/en/#get-cm-account-detail-user_data
|
9291
|
-
:param str[]
|
9294
|
+
:param str[] [symbols]: list of unified market symbols
|
9292
9295
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
9293
9296
|
:param boolean [params.portfolioMargin]: set to True if you would like to fetch positions in a portfolio margin account
|
9294
9297
|
:param str [params.subType]: "linear" or "inverse"
|
9298
|
+
:param boolean [params.filterClosed]: set to True if you would like to filter out closed positions, default is False
|
9295
9299
|
:returns dict: data on account positions
|
9296
9300
|
"""
|
9297
9301
|
if symbols is not None:
|
@@ -9319,7 +9323,9 @@ class binance(Exchange, ImplicitAPI):
|
|
9319
9323
|
response = await self.dapiPrivateGetAccount(params)
|
9320
9324
|
else:
|
9321
9325
|
raise NotSupported(self.id + ' fetchPositions() supports linear and inverse contracts only')
|
9322
|
-
|
9326
|
+
filterClosed = None
|
9327
|
+
filterClosed, params = self.handle_option_and_params(params, 'fetchAccountPositions', 'filterClosed', False)
|
9328
|
+
result = self.parse_account_positions(response, filterClosed)
|
9323
9329
|
symbols = self.market_symbols(symbols)
|
9324
9330
|
return self.filter_by_array_positions(result, 'symbol', symbols, False)
|
9325
9331
|
|
@@ -10287,7 +10293,7 @@ class binance(Exchange, ImplicitAPI):
|
|
10287
10293
|
raise NotSupported(self.id + ' add / reduce margin only supported with type future or delivery')
|
10288
10294
|
await self.load_markets()
|
10289
10295
|
market = self.market(symbol)
|
10290
|
-
amount = self.
|
10296
|
+
amount = self.amount_to_precision(symbol, amount)
|
10291
10297
|
request = {
|
10292
10298
|
'type': addOrReduce,
|
10293
10299
|
'symbol': market['id'],
|
ccxt/async_support/bingx.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.bingx import ImplicitAPI
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import numbers
|
11
|
-
from ccxt.base.types import Balances, Currency, Int, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
11
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
14
|
from ccxt.base.errors import PermissionDenied
|
@@ -455,7 +455,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
455
455
|
data = self.safe_dict(response, 'data')
|
456
456
|
return self.safe_integer(data, 'serverTime')
|
457
457
|
|
458
|
-
async def fetch_currencies(self, params={}):
|
458
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
459
459
|
"""
|
460
460
|
fetches all available currencies on an exchange
|
461
461
|
:see: https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins
|
ccxt/async_support/bit2c.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bit2c import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -360,7 +360,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
360
360
|
raise ExchangeError(response)
|
361
361
|
return self.parse_trades(response, market, since, limit)
|
362
362
|
|
363
|
-
async def fetch_trading_fees(self, params={}):
|
363
|
+
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
364
364
|
"""
|
365
365
|
fetch the trading fees for multiple markets
|
366
366
|
:see: https://bit2c.co.il/home/api#balance
|
ccxt/async_support/bitbank.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitbank import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -390,7 +390,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
390
390
|
trades = self.safe_list(data, 'transactions', [])
|
391
391
|
return self.parse_trades(trades, market, since, limit)
|
392
392
|
|
393
|
-
async def fetch_trading_fees(self, params={}):
|
393
|
+
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
394
394
|
"""
|
395
395
|
fetch the trading fees for multiple markets
|
396
396
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-all-pairs-info
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -480,7 +480,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
480
480
|
'info': fee,
|
481
481
|
}
|
482
482
|
|
483
|
-
async def fetch_trading_fees(self, params={}):
|
483
|
+
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
484
484
|
"""
|
485
485
|
fetch the trading fees for multiple markets
|
486
486
|
:see: https://docs.bitfinex.com/v1/reference/rest-auth-summary
|
ccxt/async_support/bitfinex2.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex2 import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -630,7 +630,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
630
630
|
})
|
631
631
|
return result
|
632
632
|
|
633
|
-
async def fetch_currencies(self, params={}):
|
633
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
634
634
|
"""
|
635
635
|
fetches all available currencies on an exchange
|
636
636
|
:see: https://docs.bitfinex.com/reference/rest-public-conf
|
@@ -2261,7 +2261,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2261
2261
|
},
|
2262
2262
|
}
|
2263
2263
|
|
2264
|
-
async def fetch_trading_fees(self, params={}):
|
2264
|
+
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
2265
2265
|
"""
|
2266
2266
|
fetch the trading fees for multiple markets
|
2267
2267
|
:see: https://docs.bitfinex.com/reference/rest-auth-summary
|
ccxt/async_support/bitflyer.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitflyer import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, MarketInterface, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, MarketInterface, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, TradingFeeInterface, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -493,7 +493,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
493
493
|
#
|
494
494
|
return self.parse_trades(response, market, since, limit)
|
495
495
|
|
496
|
-
async def fetch_trading_fee(self, symbol: str, params={}):
|
496
|
+
async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
497
497
|
"""
|
498
498
|
fetch the trading fees for a market
|
499
499
|
:see: https://lightning.bitflyer.com/docs?lang=en#get-trading-commission
|
@@ -518,6 +518,8 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
518
518
|
'symbol': market['symbol'],
|
519
519
|
'maker': fee,
|
520
520
|
'taker': fee,
|
521
|
+
'percentage': None,
|
522
|
+
'tierBased': None,
|
521
523
|
}
|
522
524
|
|
523
525
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
ccxt/async_support/bitget.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.bitget import ImplicitAPI
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import json
|
11
|
-
from ccxt.base.types import Balances, Currency, FundingHistory, Int, Liquidation, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
11
|
+
from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Int, Liquidation, Leverage, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
14
|
from ccxt.base.errors import PermissionDenied
|
@@ -1317,6 +1317,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1317
1317
|
'commonCurrencies': {
|
1318
1318
|
'JADE': 'Jade Protocol',
|
1319
1319
|
'DEGEN': 'DegenReborn',
|
1320
|
+
'TONCOIN': 'TON',
|
1320
1321
|
},
|
1321
1322
|
'options': {
|
1322
1323
|
'timeframes': {
|
@@ -1813,7 +1814,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1813
1814
|
data = self.safe_value(response, 'data', [])
|
1814
1815
|
return self.parse_markets(data)
|
1815
1816
|
|
1816
|
-
async def fetch_currencies(self, params={}):
|
1817
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
1817
1818
|
"""
|
1818
1819
|
fetches all available currencies on an exchange
|
1819
1820
|
:see: https://www.bitget.com/api-doc/spot/market/Get-Coin-List
|
@@ -1854,8 +1855,8 @@ class bitget(Exchange, ImplicitAPI):
|
|
1854
1855
|
data = self.safe_value(response, 'data', [])
|
1855
1856
|
for i in range(0, len(data)):
|
1856
1857
|
entry = data[i]
|
1857
|
-
id = self.safe_string(entry, 'coinId')
|
1858
|
-
code = self.safe_currency_code(
|
1858
|
+
id = self.safe_string(entry, 'coin') # we don't use 'coinId' has no use. it is 'coin' field that needs to be used in currency related endpoints(deposit, withdraw, etc..)
|
1859
|
+
code = self.safe_currency_code(id)
|
1859
1860
|
chains = self.safe_value(entry, 'chains', [])
|
1860
1861
|
networks = {}
|
1861
1862
|
deposit = False
|
@@ -1972,7 +1973,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1972
1973
|
raise ArgumentsRequired(self.id + ' fetchMarketLeverageTiers() requires a code argument')
|
1973
1974
|
params = self.omit(params, 'code')
|
1974
1975
|
currency = self.currency(code)
|
1975
|
-
request['coin'] = currency['
|
1976
|
+
request['coin'] = currency['id']
|
1976
1977
|
response = await self.privateMarginGetV2MarginCrossedTierData(self.extend(request, params))
|
1977
1978
|
else:
|
1978
1979
|
raise BadRequest(self.id + ' fetchMarketLeverageTiers() symbol does not support market ' + market['symbol'])
|
@@ -2119,7 +2120,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2119
2120
|
if since is None:
|
2120
2121
|
since = self.milliseconds() - 7776000000 # 90 days
|
2121
2122
|
request = {
|
2122
|
-
'coin': currency['
|
2123
|
+
'coin': currency['id'],
|
2123
2124
|
'startTime': since,
|
2124
2125
|
'endTime': self.milliseconds(),
|
2125
2126
|
}
|
@@ -2174,7 +2175,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2174
2175
|
currency = self.currency(code)
|
2175
2176
|
networkId = self.network_code_to_id(chain)
|
2176
2177
|
request = {
|
2177
|
-
'coin': currency['
|
2178
|
+
'coin': currency['id'],
|
2178
2179
|
'address': address,
|
2179
2180
|
'chain': networkId,
|
2180
2181
|
'size': amount,
|
@@ -2253,7 +2254,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2253
2254
|
if since is None:
|
2254
2255
|
since = self.milliseconds() - 7776000000 # 90 days
|
2255
2256
|
request = {
|
2256
|
-
'coin': currency['
|
2257
|
+
'coin': currency['id'],
|
2257
2258
|
'startTime': since,
|
2258
2259
|
'endTime': self.milliseconds(),
|
2259
2260
|
}
|
@@ -2391,7 +2392,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2391
2392
|
networkId = self.network_code_to_id(networkCode, code)
|
2392
2393
|
currency = self.currency(code)
|
2393
2394
|
request = {
|
2394
|
-
'coin': currency['
|
2395
|
+
'coin': currency['id'],
|
2395
2396
|
}
|
2396
2397
|
if networkId is not None:
|
2397
2398
|
request['chain'] = networkId
|
@@ -2557,7 +2558,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
2557
2558
|
#
|
2558
2559
|
marketId = self.safe_string(ticker, 'symbol')
|
2559
2560
|
close = self.safe_string(ticker, 'lastPr')
|
2560
|
-
|
2561
|
+
timestampString = self.omit_zero(self.safe_string(ticker, 'ts')) # exchange sometimes provided 0
|
2562
|
+
timestamp = None
|
2563
|
+
if timestampString is not None:
|
2564
|
+
timestamp = self.parse_to_int(timestampString)
|
2561
2565
|
change = self.safe_string(ticker, 'change24h')
|
2562
2566
|
open24 = self.safe_string(ticker, 'open24')
|
2563
2567
|
open = self.safe_string(ticker, 'open')
|
@@ -3004,7 +3008,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3004
3008
|
data = self.safe_list(response, 'data', [])
|
3005
3009
|
return self.parse_trades(data, market, since, limit)
|
3006
3010
|
|
3007
|
-
async def fetch_trading_fee(self, symbol: str, params={}):
|
3011
|
+
async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
3008
3012
|
"""
|
3009
3013
|
fetch the trading fees for a market
|
3010
3014
|
:see: https://www.bitget.com/api-doc/common/public/Get-Trade-Rate
|
@@ -3042,7 +3046,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3042
3046
|
data = self.safe_value(response, 'data', {})
|
3043
3047
|
return self.parse_trading_fee(data, market)
|
3044
3048
|
|
3045
|
-
async def fetch_trading_fees(self, params={}):
|
3049
|
+
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
3046
3050
|
"""
|
3047
3051
|
fetch the trading fees for multiple markets
|
3048
3052
|
:see: https://www.bitget.com/api-doc/spot/market/Get-Symbols
|
@@ -3162,6 +3166,8 @@ class bitget(Exchange, ImplicitAPI):
|
|
3162
3166
|
'symbol': self.safe_symbol(marketId, market),
|
3163
3167
|
'maker': self.safe_number(data, 'makerFeeRate'),
|
3164
3168
|
'taker': self.safe_number(data, 'takerFeeRate'),
|
3169
|
+
'percentage': None,
|
3170
|
+
'tierBased': None,
|
3165
3171
|
}
|
3166
3172
|
|
3167
3173
|
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
@@ -5493,7 +5499,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5493
5499
|
request = {}
|
5494
5500
|
if code is not None:
|
5495
5501
|
currency = self.currency(code)
|
5496
|
-
request['coin'] = currency['
|
5502
|
+
request['coin'] = currency['id']
|
5497
5503
|
request, params = self.handle_until_option('endTime', request, params)
|
5498
5504
|
if since is not None:
|
5499
5505
|
request['startTime'] = since
|
@@ -6807,7 +6813,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6807
6813
|
type = self.safe_string(accountsByType, fromAccount)
|
6808
6814
|
currency = self.currency(code)
|
6809
6815
|
request = {
|
6810
|
-
'coin': currency['
|
6816
|
+
'coin': currency['id'],
|
6811
6817
|
'fromType': type,
|
6812
6818
|
}
|
6813
6819
|
if since is not None:
|
@@ -6862,7 +6868,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6862
6868
|
'fromType': fromType,
|
6863
6869
|
'toType': toType,
|
6864
6870
|
'amount': amount,
|
6865
|
-
'coin': currency['
|
6871
|
+
'coin': currency['id'],
|
6866
6872
|
}
|
6867
6873
|
symbol = self.safe_string(params, 'symbol')
|
6868
6874
|
params = self.omit(params, 'symbol')
|
@@ -7042,7 +7048,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7042
7048
|
await self.load_markets()
|
7043
7049
|
currency = self.currency(code)
|
7044
7050
|
request = {
|
7045
|
-
'coin': currency['
|
7051
|
+
'coin': currency['id'],
|
7046
7052
|
'borrowAmount': self.currency_to_precision(code, amount),
|
7047
7053
|
}
|
7048
7054
|
response = await self.privateMarginPostV2MarginCrossedAccountBorrow(self.extend(request, params))
|
@@ -7075,7 +7081,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7075
7081
|
currency = self.currency(code)
|
7076
7082
|
market = self.market(symbol)
|
7077
7083
|
request = {
|
7078
|
-
'coin': currency['
|
7084
|
+
'coin': currency['id'],
|
7079
7085
|
'borrowAmount': self.currency_to_precision(code, amount),
|
7080
7086
|
'symbol': market['id'],
|
7081
7087
|
}
|
@@ -7110,7 +7116,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7110
7116
|
currency = self.currency(code)
|
7111
7117
|
market = self.market(symbol)
|
7112
7118
|
request = {
|
7113
|
-
'coin': currency['
|
7119
|
+
'coin': currency['id'],
|
7114
7120
|
'repayAmount': self.currency_to_precision(code, amount),
|
7115
7121
|
'symbol': market['id'],
|
7116
7122
|
}
|
@@ -7144,7 +7150,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7144
7150
|
await self.load_markets()
|
7145
7151
|
currency = self.currency(code)
|
7146
7152
|
request = {
|
7147
|
-
'coin': currency['
|
7153
|
+
'coin': currency['id'],
|
7148
7154
|
'repayAmount': self.currency_to_precision(code, amount),
|
7149
7155
|
}
|
7150
7156
|
response = await self.privateMarginPostV2MarginCrossedAccountRepay(self.extend(request, params))
|
@@ -7490,7 +7496,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7490
7496
|
await self.load_markets()
|
7491
7497
|
currency = self.currency(code)
|
7492
7498
|
request = {
|
7493
|
-
'coin': currency['
|
7499
|
+
'coin': currency['id'],
|
7494
7500
|
}
|
7495
7501
|
response = await self.privateMarginGetV2MarginCrossedInterestRateAndLimit(self.extend(request, params))
|
7496
7502
|
#
|
@@ -7581,7 +7587,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
7581
7587
|
currency = None
|
7582
7588
|
if code is not None:
|
7583
7589
|
currency = self.currency(code)
|
7584
|
-
request['coin'] = currency['
|
7590
|
+
request['coin'] = currency['id']
|
7585
7591
|
if since is not None:
|
7586
7592
|
request['startTime'] = since
|
7587
7593
|
else:
|
ccxt/async_support/bitmart.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitmart import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -985,7 +985,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
985
985
|
contract = await self.fetch_contract_markets(params)
|
986
986
|
return self.array_concat(spot, contract)
|
987
987
|
|
988
|
-
async def fetch_currencies(self, params={}):
|
988
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
989
989
|
"""
|
990
990
|
fetches all available currencies on an exchange
|
991
991
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1999,7 +1999,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1999
1999
|
#
|
2000
2000
|
return self.custom_parse_balance(response, marketType)
|
2001
2001
|
|
2002
|
-
def parse_trading_fee(self, fee, market: Market = None):
|
2002
|
+
def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
|
2003
2003
|
#
|
2004
2004
|
# {
|
2005
2005
|
# "symbol": "ETH_USDT",
|
@@ -2014,9 +2014,11 @@ class bitmart(Exchange, ImplicitAPI):
|
|
2014
2014
|
'symbol': symbol,
|
2015
2015
|
'maker': self.safe_number(fee, 'maker_fee_rate'),
|
2016
2016
|
'taker': self.safe_number(fee, 'taker_fee_rate'),
|
2017
|
+
'percentage': None,
|
2018
|
+
'tierBased': None,
|
2017
2019
|
}
|
2018
2020
|
|
2019
|
-
async def fetch_trading_fee(self, symbol: str, params={}):
|
2021
|
+
async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
2020
2022
|
"""
|
2021
2023
|
fetch the trading fees for a market
|
2022
2024
|
:param str symbol: unified market symbol
|
ccxt/async_support/bitmex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitmex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Leverage, Leverages, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, Leverages, Market, MarketType, Num, 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
|
@@ -290,7 +290,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
290
290
|
},
|
291
291
|
})
|
292
292
|
|
293
|
-
async def fetch_currencies(self, params={}):
|
293
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
294
294
|
"""
|
295
295
|
fetches all available currencies on an exchange
|
296
296
|
:see: https://www.bitmex.com/api/explorer/#not /Wallet/Wallet_getAssetsConfig
|
ccxt/async_support/bitopro.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bitopro import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import math
|
10
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -220,7 +220,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
220
220
|
},
|
221
221
|
})
|
222
222
|
|
223
|
-
async def fetch_currencies(self, params={}):
|
223
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
224
224
|
"""
|
225
225
|
fetches all available currencies on an exchange
|
226
226
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_currency_info.md
|
@@ -617,7 +617,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
617
617
|
#
|
618
618
|
return self.parse_trades(trades, market, since, limit)
|
619
619
|
|
620
|
-
async def fetch_trading_fees(self, params={}):
|
620
|
+
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
621
621
|
"""
|
622
622
|
fetch the trading fees for multiple markets
|
623
623
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/public/get_limitations_and_fees.md
|