fix float precision rendering

This commit is contained in:
gcarq
2017-11-05 16:13:55 +01:00
parent 0a5eba64e2
commit 8fdd127f72
2 changed files with 5 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ def execute_sell(trade: Trade, limit: float) -> None:
trade.close_date = datetime.utcnow()
fmt_exp_profit = round(trade.calc_profit(limit) * 100, 2)
message = '*{}:* Selling [{}]({}) with limit `{:f} (profit: ~{}%)`'.format(
message = '*{}:* Selling [{}]({}) with limit `{:.8f} (profit: ~{:.2f}%)`'.format(
trade.exchange,
trade.pair.replace('_', '/'),
exchange.get_pair_detail_url(trade.pair),
@@ -189,7 +189,7 @@ def create_trade(stake_amount: float) -> Optional[Trade]:
order_id = exchange.buy(pair, buy_limit, amount)
# Create trade entity and return
message = '*{}:* Buying [{}]({}) with limit `{:f}`'.format(
message = '*{}:* Buying [{}]({}) with limit `{:.8f}`'.format(
exchange.get_name().upper(),
pair.replace('_', '/'),
exchange.get_pair_detail_url(pair),