Allow forcebuy price to be a string by converting it to float
fix #3970
This commit is contained in:
@@ -508,6 +508,8 @@ class ApiServer(RPC):
|
||||
"""
|
||||
asset = request.json.get("pair")
|
||||
price = request.json.get("price", None)
|
||||
price = float(price) if price is not None else price
|
||||
|
||||
trade = self._rpc_forcebuy(asset, price)
|
||||
if trade:
|
||||
return jsonify(trade.to_json())
|
||||
|
@@ -524,7 +524,7 @@ class RPC:
|
||||
stake_currency = self._freqtrade.config.get('stake_currency')
|
||||
if not self._freqtrade.exchange.get_pair_quote_currency(pair) == stake_currency:
|
||||
raise RPCException(
|
||||
f'Wrong pair selected. Please pairs with stake {stake_currency} pairs only')
|
||||
f'Wrong pair selected. Only pairs with stake-currency {stake_currency} allowed.')
|
||||
# check if valid pair
|
||||
|
||||
# check if pair already has an open pair
|
||||
|
Reference in New Issue
Block a user