ccxt 4.2.88__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 +7 -5
- 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 +10 -5
- 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/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 +6 -4
- 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/kucoin.py +42 -18
- 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 +56 -9
- 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 +14 -7
- ccxt/base/types.py +32 -0
- ccxt/bigone.py +2 -2
- ccxt/binance.py +7 -5
- 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 +10 -5
- 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/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 +6 -4
- 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/kucoin.py +42 -18
- 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 +56 -9
- 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.88.dist-info → ccxt-4.2.89.dist-info}/METADATA +4 -4
- {ccxt-4.2.88.dist-info → ccxt-4.2.89.dist-info}/RECORD +150 -150
- {ccxt-4.2.88.dist-info → ccxt-4.2.89.dist-info}/WHEEL +0 -0
- {ccxt-4.2.88.dist-info → ccxt-4.2.89.dist-info}/top_level.txt +0 -0
ccxt/bitstamp.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitstamp 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, 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
|
@@ -441,6 +441,30 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
441
441
|
'commonCurrencies': {
|
442
442
|
'UST': 'USTC',
|
443
443
|
},
|
444
|
+
# exchange-specific options
|
445
|
+
'options': {
|
446
|
+
'networksById': {
|
447
|
+
'bitcoin-cash': 'BCH',
|
448
|
+
'bitcoin': 'BTC',
|
449
|
+
'ethereum': 'ERC20',
|
450
|
+
'litecoin': 'LTC',
|
451
|
+
'stellar': 'XLM',
|
452
|
+
'xrpl': 'XRP',
|
453
|
+
'tron': 'TRC20',
|
454
|
+
'algorand': 'ALGO',
|
455
|
+
'flare': 'FLR',
|
456
|
+
'hedera': 'HBAR',
|
457
|
+
'cardana': 'ADA',
|
458
|
+
'songbird': 'FLR',
|
459
|
+
'avalanche-c-chain': 'AVAX',
|
460
|
+
'solana': 'SOL',
|
461
|
+
'polkadot': 'DOT',
|
462
|
+
'near': 'NEAR',
|
463
|
+
'doge': 'DOGE',
|
464
|
+
'sui': 'SUI',
|
465
|
+
'casper': 'CSRP',
|
466
|
+
},
|
467
|
+
},
|
444
468
|
'exceptions': {
|
445
469
|
'exact': {
|
446
470
|
'No permission found': PermissionDenied,
|
@@ -607,7 +631,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
607
631
|
})
|
608
632
|
return self.safe_value(self.options['fetchMarkets'], 'response')
|
609
633
|
|
610
|
-
def fetch_currencies(self, params={}):
|
634
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
611
635
|
"""
|
612
636
|
fetches all available currencies on an exchange
|
613
637
|
:see: https://www.bitstamp.net/api/#tag/Market-info/operation/GetTradingPairsInfo
|
@@ -1117,7 +1141,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1117
1141
|
#
|
1118
1142
|
return self.parse_balance(response)
|
1119
1143
|
|
1120
|
-
def fetch_trading_fee(self, symbol: str, params={}):
|
1144
|
+
def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
1121
1145
|
"""
|
1122
1146
|
fetch the trading fees for a market
|
1123
1147
|
:see: https://www.bitstamp.net/api/#tag/Fees/operation/GetTradingFeesForCurrency
|
@@ -1149,7 +1173,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1149
1173
|
tradingFee = self.safe_dict(tradingFeesByMarketId, market['id'])
|
1150
1174
|
return self.parse_trading_fee(tradingFee, market)
|
1151
1175
|
|
1152
|
-
def parse_trading_fee(self, fee, market: Market = None):
|
1176
|
+
def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
|
1153
1177
|
marketId = self.safe_string(fee, 'market')
|
1154
1178
|
fees = self.safe_dict(fee, 'fees', {})
|
1155
1179
|
return {
|
@@ -1157,6 +1181,8 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1157
1181
|
'symbol': self.safe_symbol(marketId, market),
|
1158
1182
|
'maker': self.safe_number(fees, 'maker'),
|
1159
1183
|
'taker': self.safe_number(fees, 'taker'),
|
1184
|
+
'percentage': None,
|
1185
|
+
'tierBased': None,
|
1160
1186
|
}
|
1161
1187
|
|
1162
1188
|
def parse_trading_fees(self, fees):
|
@@ -1168,7 +1194,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1168
1194
|
result[symbol] = fee
|
1169
1195
|
return result
|
1170
1196
|
|
1171
|
-
def fetch_trading_fees(self, params={}):
|
1197
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
1172
1198
|
"""
|
1173
1199
|
fetch the trading fees for multiple markets
|
1174
1200
|
:see: https://www.bitstamp.net/api/#tag/Fees/operation/GetAllTradingFees
|
@@ -1197,58 +1223,43 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1197
1223
|
"""
|
1198
1224
|
* @deprecated
|
1199
1225
|
please use fetchDepositWithdrawFees instead
|
1200
|
-
:see: https://www.bitstamp.net/api/#
|
1226
|
+
:see: https://www.bitstamp.net/api/#tag/Fees
|
1201
1227
|
:param str[]|None codes: list of unified currency codes
|
1202
1228
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1203
1229
|
:returns dict[]: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
1204
1230
|
"""
|
1205
1231
|
self.load_markets()
|
1206
|
-
|
1207
|
-
|
1232
|
+
response = self.privatePostFeesWithdrawal(params)
|
1233
|
+
#
|
1234
|
+
# [
|
1235
|
+
# {
|
1236
|
+
# "currency": "btc",
|
1237
|
+
# "fee": "0.00015000",
|
1238
|
+
# "network": "bitcoin"
|
1239
|
+
# }
|
1240
|
+
# ...
|
1241
|
+
# ]
|
1242
|
+
#
|
1243
|
+
return self.parse_transaction_fees(response)
|
1208
1244
|
|
1209
1245
|
def parse_transaction_fees(self, response, codes=None):
|
1210
|
-
#
|
1211
|
-
# {
|
1212
|
-
# "yfi_available": "0.00000000",
|
1213
|
-
# "yfi_balance": "0.00000000",
|
1214
|
-
# "yfi_reserved": "0.00000000",
|
1215
|
-
# "yfi_withdrawal_fee": "0.00070000",
|
1216
|
-
# "yfieur_fee": "0.000",
|
1217
|
-
# "yfiusd_fee": "0.000",
|
1218
|
-
# "zrx_available": "0.00000000",
|
1219
|
-
# "zrx_balance": "0.00000000",
|
1220
|
-
# "zrx_reserved": "0.00000000",
|
1221
|
-
# "zrx_withdrawal_fee": "12.00000000",
|
1222
|
-
# "zrxeur_fee": "0.000",
|
1223
|
-
# "zrxusd_fee": "0.000",
|
1224
|
-
# ...
|
1225
|
-
# }
|
1226
|
-
#
|
1227
|
-
if codes is None:
|
1228
|
-
codes = list(self.currencies.keys())
|
1229
1246
|
result = {}
|
1230
|
-
|
1231
|
-
ids = list(
|
1247
|
+
currencies = self.index_by(response, 'currency')
|
1248
|
+
ids = list(currencies.keys())
|
1232
1249
|
for i in range(0, len(ids)):
|
1233
1250
|
id = ids[i]
|
1234
|
-
|
1235
|
-
code = self.safe_currency_code(
|
1236
|
-
if codes is not None and not self.in_array(code, codes):
|
1251
|
+
fees = self.safe_value(response, i, {})
|
1252
|
+
code = self.safe_currency_code(id)
|
1253
|
+
if (codes is not None) and not self.in_array(code, codes):
|
1237
1254
|
continue
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
'info': {},
|
1244
|
-
}
|
1245
|
-
if currencyId == mainCurrencyId:
|
1246
|
-
result[code]['info'][id] = self.safe_number(response, id)
|
1247
|
-
if id.find('_withdrawal_fee') >= 0:
|
1248
|
-
result[code]['withdraw'] = self.safe_number(response, id)
|
1255
|
+
result[code] = {
|
1256
|
+
'withdraw_fee': self.safe_number(fees, 'fee'),
|
1257
|
+
'deposit': {},
|
1258
|
+
'info': self.safe_dict(currencies, id),
|
1259
|
+
}
|
1249
1260
|
return result
|
1250
1261
|
|
1251
|
-
def fetch_deposit_withdraw_fees(self, codes
|
1262
|
+
def fetch_deposit_withdraw_fees(self, codes=None, params={}):
|
1252
1263
|
"""
|
1253
1264
|
fetch deposit and withdraw fees
|
1254
1265
|
:see: https://www.bitstamp.net/api/#tag/Fees/operation/GetAllWithdrawalFees
|
@@ -1257,60 +1268,41 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1257
1268
|
:returns dict[]: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
1258
1269
|
"""
|
1259
1270
|
self.load_markets()
|
1260
|
-
response = self.
|
1261
|
-
#
|
1262
|
-
# {
|
1263
|
-
# "yfi_available": "0.00000000",
|
1264
|
-
# "yfi_balance": "0.00000000",
|
1265
|
-
# "yfi_reserved": "0.00000000",
|
1266
|
-
# "yfi_withdrawal_fee": "0.00070000",
|
1267
|
-
# "yfieur_fee": "0.000",
|
1268
|
-
# "yfiusd_fee": "0.000",
|
1269
|
-
# "zrx_available": "0.00000000",
|
1270
|
-
# "zrx_balance": "0.00000000",
|
1271
|
-
# "zrx_reserved": "0.00000000",
|
1272
|
-
# "zrx_withdrawal_fee": "12.00000000",
|
1273
|
-
# "zrxeur_fee": "0.000",
|
1274
|
-
# "zrxusd_fee": "0.000",
|
1275
|
-
# ...
|
1276
|
-
# }
|
1277
|
-
#
|
1278
|
-
return self.parse_deposit_withdraw_fees(response, codes)
|
1279
|
-
|
1280
|
-
def parse_deposit_withdraw_fees(self, response, codes=None, currencyIdKey=None):
|
1281
|
-
#
|
1282
|
-
# {
|
1283
|
-
# "yfi_available": "0.00000000",
|
1284
|
-
# "yfi_balance": "0.00000000",
|
1285
|
-
# "yfi_reserved": "0.00000000",
|
1286
|
-
# "yfi_withdrawal_fee": "0.00070000",
|
1287
|
-
# "yfieur_fee": "0.000",
|
1288
|
-
# "yfiusd_fee": "0.000",
|
1289
|
-
# "zrx_available": "0.00000000",
|
1290
|
-
# "zrx_balance": "0.00000000",
|
1291
|
-
# "zrx_reserved": "0.00000000",
|
1292
|
-
# "zrx_withdrawal_fee": "12.00000000",
|
1293
|
-
# "zrxeur_fee": "0.000",
|
1294
|
-
# "zrxusd_fee": "0.000",
|
1295
|
-
# ...
|
1296
|
-
# }
|
1271
|
+
response = self.privatePostFeesWithdrawal(params)
|
1297
1272
|
#
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1273
|
+
# [
|
1274
|
+
# {
|
1275
|
+
# "currency": "btc",
|
1276
|
+
# "fee": "0.00015000",
|
1277
|
+
# "network": "bitcoin"
|
1278
|
+
# }
|
1279
|
+
# ...
|
1280
|
+
# ]
|
1281
|
+
#
|
1282
|
+
responseByCurrencyId = self.group_by(response, 'currency')
|
1283
|
+
return self.parse_deposit_withdraw_fees(responseByCurrencyId, codes)
|
1284
|
+
|
1285
|
+
def parse_deposit_withdraw_fee(self, fee, currency=None):
|
1286
|
+
result = self.deposit_withdraw_fee(fee)
|
1287
|
+
for j in range(0, len(fee)):
|
1288
|
+
networkEntry = fee[j]
|
1289
|
+
networkId = self.safe_string(networkEntry, 'network')
|
1290
|
+
networkCode = self.network_id_to_code(networkId)
|
1291
|
+
withdrawFee = self.safe_number(networkEntry, 'fee')
|
1292
|
+
result['withdraw'] = {
|
1293
|
+
'fee': withdrawFee,
|
1294
|
+
'percentage': None,
|
1295
|
+
}
|
1296
|
+
result['networks'][networkCode] = {
|
1297
|
+
'withdraw': {
|
1298
|
+
'fee': withdrawFee,
|
1299
|
+
'percentage': None,
|
1300
|
+
},
|
1301
|
+
'deposit': {
|
1302
|
+
'fee': None,
|
1303
|
+
'percentage': None,
|
1304
|
+
},
|
1305
|
+
}
|
1314
1306
|
return result
|
1315
1307
|
|
1316
1308
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
ccxt/bitteam.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitteam import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
8
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -415,7 +415,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
415
415
|
'info': market,
|
416
416
|
})
|
417
417
|
|
418
|
-
def fetch_currencies(self, params={}):
|
418
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
419
419
|
"""
|
420
420
|
fetches all available currencies on an exchange
|
421
421
|
:see: https://bit.team/trade/api/documentation#/PUBLIC/getTradeApiCurrencies
|
ccxt/bitvavo.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitvavo 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
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, 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
|
@@ -414,7 +414,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
414
414
|
}))
|
415
415
|
return result
|
416
416
|
|
417
|
-
def fetch_currencies(self, params={}):
|
417
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
418
418
|
"""
|
419
419
|
:see: https://docs.bitvavo.com/#tag/General/paths/~1assets/get
|
420
420
|
fetches all available currencies on an exchange
|
@@ -805,7 +805,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
805
805
|
'fee': fee,
|
806
806
|
}, market)
|
807
807
|
|
808
|
-
def fetch_trading_fees(self, params={}):
|
808
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
809
809
|
"""
|
810
810
|
:see: https://docs.bitvavo.com/#tag/Account/paths/~1account/get
|
811
811
|
fetch the trading fees for multiple markets
|
ccxt/bl3p.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bl3p import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, IndexType, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
|
9
|
+
from ccxt.base.types import Balances, Currency, IndexType, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
12
12
|
from ccxt.base.precise import Precise
|
@@ -311,7 +311,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
311
311
|
result = self.parse_trades(response['data']['trades'], market, since, limit)
|
312
312
|
return result
|
313
313
|
|
314
|
-
def fetch_trading_fees(self, params={}):
|
314
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
315
315
|
"""
|
316
316
|
fetch the trading fees for multiple markets
|
317
317
|
:see: https://github.com/BitonicNL/bl3p-api/blob/master/docs/authenticated_api/http.md#35---get-account-info--balance
|
ccxt/blockchaincom.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.blockchaincom import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
8
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -617,7 +617,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
617
617
|
'info': response,
|
618
618
|
}
|
619
619
|
|
620
|
-
def fetch_trading_fees(self, params={}):
|
620
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
621
621
|
"""
|
622
622
|
fetch the trading fees for multiple markets
|
623
623
|
:see: https://api.blockchain.com/v3/#/trading/getFees
|
ccxt/blofin.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.blofin import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Leverage, Leverages, MarginMode, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Leverage, Leverages, MarginMode, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, 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 ArgumentsRequired
|
@@ -906,13 +906,15 @@ class blofin(Exchange, ImplicitAPI):
|
|
906
906
|
result[code] = account
|
907
907
|
return self.safe_balance(result)
|
908
908
|
|
909
|
-
def parse_trading_fee(self, fee, market: Market = None):
|
909
|
+
def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
|
910
910
|
return {
|
911
911
|
'info': fee,
|
912
912
|
'symbol': self.safe_symbol(None, market),
|
913
913
|
# blofin returns the fees values opposed to other exchanges, so the sign needs to be flipped
|
914
914
|
'maker': self.parse_number(Precise.string_neg(self.safe_string_2(fee, 'maker', 'makerU'))),
|
915
915
|
'taker': self.parse_number(Precise.string_neg(self.safe_string_2(fee, 'taker', 'takerU'))),
|
916
|
+
'percentage': None,
|
917
|
+
'tierBased': None,
|
916
918
|
}
|
917
919
|
|
918
920
|
def fetch_balance(self, params={}) -> Balances:
|
ccxt/bybit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bybit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Greeks, Int, Leverage, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, Greeks, Int, Leverage, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, 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
|
@@ -1233,7 +1233,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1233
1233
|
#
|
1234
1234
|
return self.safe_integer(response, 'time')
|
1235
1235
|
|
1236
|
-
def fetch_currencies(self, params={}):
|
1236
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
1237
1237
|
"""
|
1238
1238
|
fetches all available currencies on an exchange
|
1239
1239
|
:see: https://bybit-exchange.github.io/docs/v5/asset/coin-info
|
@@ -6736,7 +6736,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
6736
6736
|
request['symbol'] = market['id']
|
6737
6737
|
return self.fetch_derivatives_market_leverage_tiers(symbol, params)
|
6738
6738
|
|
6739
|
-
def parse_trading_fee(self, fee, market: Market = None):
|
6739
|
+
def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
|
6740
6740
|
#
|
6741
6741
|
# {
|
6742
6742
|
# "symbol": "ETHUSDT",
|
@@ -6752,9 +6752,11 @@ class bybit(Exchange, ImplicitAPI):
|
|
6752
6752
|
'symbol': symbol,
|
6753
6753
|
'maker': self.safe_number(fee, 'makerFeeRate'),
|
6754
6754
|
'taker': self.safe_number(fee, 'takerFeeRate'),
|
6755
|
+
'percentage': None,
|
6756
|
+
'tierBased': None,
|
6755
6757
|
}
|
6756
6758
|
|
6757
|
-
def fetch_trading_fee(self, symbol: str, params={}):
|
6759
|
+
def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
6758
6760
|
"""
|
6759
6761
|
fetch the trading fees for a market
|
6760
6762
|
:see: https://bybit-exchange.github.io/docs/v5/account/fee-rate
|
@@ -6800,7 +6802,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
6800
6802
|
first = self.safe_value(fees, 0, {})
|
6801
6803
|
return self.parse_trading_fee(first, market)
|
6802
6804
|
|
6803
|
-
def fetch_trading_fees(self, params={}):
|
6805
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
6804
6806
|
"""
|
6805
6807
|
fetch the trading fees for multiple markets
|
6806
6808
|
:see: https://bybit-exchange.github.io/docs/v5/account/fee-rate
|
ccxt/cex.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.cex import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
10
|
+
from ccxt.base.types import Balances, Currencies, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -237,7 +237,7 @@ class cex(Exchange, ImplicitAPI):
|
|
237
237
|
})
|
238
238
|
return self.safe_value(self.options['fetchCurrencies'], 'response')
|
239
239
|
|
240
|
-
def fetch_currencies(self, params={}):
|
240
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
241
241
|
"""
|
242
242
|
fetches all available currencies on an exchange
|
243
243
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -681,7 +681,7 @@ class cex(Exchange, ImplicitAPI):
|
|
681
681
|
response = self.publicGetTradeHistoryPair(self.extend(request, params))
|
682
682
|
return self.parse_trades(response, market, since, limit)
|
683
683
|
|
684
|
-
def fetch_trading_fees(self, params={}):
|
684
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
685
685
|
"""
|
686
686
|
:see: https://docs.cex.io/#get-my-fee
|
687
687
|
fetch the trading fees for multiple markets
|
ccxt/coinbase.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinbase import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, 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 ArgumentsRequired
|
@@ -1287,7 +1287,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1287
1287
|
})
|
1288
1288
|
return self.safe_dict(self.options, 'fetchCurrencies', {})
|
1289
1289
|
|
1290
|
-
def fetch_currencies(self, params={}):
|
1290
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
1291
1291
|
"""
|
1292
1292
|
fetches all available currencies on an exchange
|
1293
1293
|
:see: https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
|
ccxt/coinbaseinternational.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinbaseinternational import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Order, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from typing import Any
|
12
12
|
from ccxt.base.errors import ExchangeError
|
@@ -1065,7 +1065,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
1065
1065
|
'created': None,
|
1066
1066
|
}
|
1067
1067
|
|
1068
|
-
def fetch_currencies(self, params={}) ->
|
1068
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
1069
1069
|
"""
|
1070
1070
|
fetches all available currencies on an exchange
|
1071
1071
|
:see: https://docs.cloud.coinbase.com/intx/reference/getassets
|
ccxt/coinbasepro.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinbasepro import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, 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
|
@@ -239,7 +239,7 @@ class coinbasepro(Exchange, ImplicitAPI):
|
|
239
239
|
},
|
240
240
|
})
|
241
241
|
|
242
|
-
def fetch_currencies(self, params={}):
|
242
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
243
243
|
"""
|
244
244
|
fetches all available currencies on an exchange
|
245
245
|
:see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getcurrencies
|
@@ -833,7 +833,7 @@ class coinbasepro(Exchange, ImplicitAPI):
|
|
833
833
|
#
|
834
834
|
return self.parse_trades(response, market, since, limit)
|
835
835
|
|
836
|
-
def fetch_trading_fees(self, params={}):
|
836
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
837
837
|
"""
|
838
838
|
fetch the trading fees for multiple markets
|
839
839
|
:see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfees
|
ccxt/coincheck.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coincheck 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 BadSymbol
|
@@ -503,7 +503,7 @@ class coincheck(Exchange, ImplicitAPI):
|
|
503
503
|
data = self.safe_list(response, 'data', [])
|
504
504
|
return self.parse_trades(data, market, since, limit)
|
505
505
|
|
506
|
-
def fetch_trading_fees(self, params={}):
|
506
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
507
507
|
"""
|
508
508
|
fetch the trading fees for multiple markets
|
509
509
|
:see: https://coincheck.com/documents/exchange/api#account-info
|
ccxt/coinex.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinex import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, Int, Leverage, Leverages, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
8
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, Leverages, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import PermissionDenied
|
@@ -489,7 +489,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
489
489
|
},
|
490
490
|
})
|
491
491
|
|
492
|
-
def fetch_currencies(self, params={}):
|
492
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
493
493
|
response = self.v1PublicGetCommonAssetConfig(params)
|
494
494
|
# {
|
495
495
|
# "code": 0,
|
@@ -1305,7 +1305,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
1305
1305
|
#
|
1306
1306
|
return self.parse_trades(response['data'], market, since, limit)
|
1307
1307
|
|
1308
|
-
def fetch_trading_fee(self, symbol: str, params={}):
|
1308
|
+
def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
1309
1309
|
"""
|
1310
1310
|
fetch the trading fees for a market
|
1311
1311
|
:see: https://docs.coinex.com/api/v2/spot/market/http/list-market
|
@@ -1369,7 +1369,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
1369
1369
|
result = self.safe_dict(data, 0, {})
|
1370
1370
|
return self.parse_trading_fee(result, market)
|
1371
1371
|
|
1372
|
-
def fetch_trading_fees(self, params={}):
|
1372
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
1373
1373
|
"""
|
1374
1374
|
fetch the trading fees for multiple markets
|
1375
1375
|
:see: https://docs.coinex.com/api/v2/spot/market/http/list-market
|
@@ -1436,7 +1436,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
1436
1436
|
result[symbol] = self.parse_trading_fee(entry, market)
|
1437
1437
|
return result
|
1438
1438
|
|
1439
|
-
def parse_trading_fee(self, fee, market: Market = None):
|
1439
|
+
def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
|
1440
1440
|
marketId = self.safe_value(fee, 'market')
|
1441
1441
|
symbol = self.safe_symbol(marketId, market)
|
1442
1442
|
return {
|
ccxt/coinlist.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.coinlist import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import math
|
10
|
-
from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -336,7 +336,7 @@ class coinlist(Exchange, ImplicitAPI):
|
|
336
336
|
string = self.safe_string(response, 'iso')
|
337
337
|
return self.parse8601(string)
|
338
338
|
|
339
|
-
def fetch_currencies(self, params={}):
|
339
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
340
340
|
"""
|
341
341
|
fetches all available currencies on an exchange
|
342
342
|
:see: https://trade-docs.coinlist.co/?javascript--nodejs#list-supported-assets
|
@@ -856,7 +856,7 @@ class coinlist(Exchange, ImplicitAPI):
|
|
856
856
|
'info': trade,
|
857
857
|
}, market)
|
858
858
|
|
859
|
-
def fetch_trading_fees(self, params={}):
|
859
|
+
def fetch_trading_fees(self, params={}) -> TradingFees:
|
860
860
|
"""
|
861
861
|
fetch the trading fees for multiple markets
|
862
862
|
:see: https://trade-docs.coinlist.co/?javascript--nodejs#list-fees
|
ccxt/coinmate.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinmate 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
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, 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
|
@@ -761,7 +761,7 @@ class coinmate(Exchange, ImplicitAPI):
|
|
761
761
|
data = self.safe_list(response, 'data', [])
|
762
762
|
return self.parse_trades(data, market, since, limit)
|
763
763
|
|
764
|
-
def fetch_trading_fee(self, symbol: str, params={}):
|
764
|
+
def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
765
765
|
"""
|
766
766
|
fetch the trading fees for a market
|
767
767
|
:see: https://coinmate.docs.apiary.io/#reference/trader-fees/get-trading-fees/post
|
ccxt/coinmetro.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinmetro import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
8
|
+
from ccxt.base.types import Balances, Currencies, Currency, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import PermissionDenied
|
@@ -256,7 +256,7 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
256
256
|
},
|
257
257
|
})
|
258
258
|
|
259
|
-
def fetch_currencies(self, params={}):
|
259
|
+
def fetch_currencies(self, params={}) -> Currencies:
|
260
260
|
"""
|
261
261
|
fetches all available currencies on an exchange
|
262
262
|
:see: https://documenter.getpostman.com/view/3653795/SVfWN6KS#d5876d43-a3fe-4479-8c58-24d0f044edfb
|