Display amount (fiat currency) in the sell message
This commit is contained in:
parent
9803130848
commit
c96ddc0679
@ -264,12 +264,20 @@ def create_trade(stake_amount: float) -> bool:
|
|||||||
amount = stake_amount / buy_limit
|
amount = stake_amount / buy_limit
|
||||||
|
|
||||||
order_id = exchange.buy(pair, buy_limit, amount)
|
order_id = exchange.buy(pair, buy_limit, amount)
|
||||||
|
|
||||||
|
fiat_converter = CryptoToFiatConverter()
|
||||||
|
stake_amount_fiat = fiat_converter.convert_amount(
|
||||||
|
stake_amount,
|
||||||
|
_CONF['stake_currency'],
|
||||||
|
_CONF['fiat_display_currency']
|
||||||
|
)
|
||||||
|
|
||||||
# Create trade entity and return
|
# Create trade entity and return
|
||||||
rpc.send_msg('*{}:* Buying [{}]({}) with limit `{:.8f}`'.format(
|
rpc.send_msg('*{}:* Buying [{}]({}) with limit `{:.8f}` ({:8.f} BTC, {:3.f} {})'.format(
|
||||||
exchange.get_name().upper(),
|
exchange.get_name().upper(),
|
||||||
pair.replace('_', '/'),
|
pair.replace('_', '/'),
|
||||||
exchange.get_pair_detail_url(pair),
|
exchange.get_pair_detail_url(pair),
|
||||||
buy_limit
|
buy_limit, stake_amount, stake_amount_fiat, _CONF['fiat_display_currency']
|
||||||
))
|
))
|
||||||
# Fee is applied twice because we make a LIMIT_BUY and LIMIT_SELL
|
# Fee is applied twice because we make a LIMIT_BUY and LIMIT_SELL
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
|
Loading…
Reference in New Issue
Block a user