mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-11 08:40:46 +00:00
respect stake_currency conf
This commit is contained in:
4
main.py
4
main.py
@@ -185,8 +185,8 @@ def create_trade(stake_amount: float, exchange):
|
||||
logger.info('Creating new trade with stake_amount: {} ...'.format(stake_amount))
|
||||
whitelist = conf[exchange.name.lower()]['pair_whitelist']
|
||||
# Check if btc_amount is fulfilled
|
||||
if api_wrapper.get_balance('BTC') < stake_amount:
|
||||
raise ValueError('BTC amount is not fulfilled')
|
||||
if api_wrapper.get_balance(conf['stake_currency']) < stake_amount:
|
||||
raise ValueError('stake amount is not fulfilled (currency={}'.format(conf['stake_currency']))
|
||||
|
||||
# Remove currently opened and latest pairs from whitelist
|
||||
latest_trade = Trade.query.filter(Trade.is_open.is_(False)).order_by(Trade.id.desc()).first()
|
||||
|
||||
Reference in New Issue
Block a user