moved date to top and show open order only if it is not none
This commit is contained in:
parent
1678a039ae
commit
0ca3a38ba6
@ -196,18 +196,17 @@ class Telegram(RPC):
|
|||||||
messages = []
|
messages = []
|
||||||
for r in results:
|
for r in results:
|
||||||
lines = [
|
lines = [
|
||||||
"*Trade ID:* `{trade_id}`",
|
"*Trade ID:* `{trade_id}` (since `{date}`)",
|
||||||
"*Current Pair:* {pair}",
|
"*Current Pair:* {pair}",
|
||||||
"*Open Since:* `{date}`",
|
|
||||||
"*Amount:* `{amount}`",
|
"*Amount:* `{amount}`",
|
||||||
"*Open Rate:* `{open_rate:.8f}`",
|
"*Open Rate:* `{open_rate:.8f}`",
|
||||||
"*Close Rate:* `{close_rate}`" if r['close_rate'] else "",
|
"*Close Rate:* `{close_rate}`" if r['close_rate'] else "",
|
||||||
"*Current Rate:* `{current_rate:.8f}`",
|
"*Current Rate:* `{current_rate:.8f}`",
|
||||||
"*Close Profit:* `{close_profit}`" if r['close_profit'] else "",
|
"*Close Profit:* `{close_profit}`" if r['close_profit'] else "",
|
||||||
"*Current Profit:* `{current_profit:.2f}%`",
|
"*Current Profit:* `{current_profit:.2f}%`",
|
||||||
"*Open Order:* `{open_order}`"
|
"*Open Order:* `{open_order}`" if r['open_order'] else "",
|
||||||
]
|
]
|
||||||
messages.append("\n".join(filter(None,lines)).format(**r))
|
messages.append("\n".join(filter(None ,lines)).format(**r))
|
||||||
|
|
||||||
for msg in messages:
|
for msg in messages:
|
||||||
self._send_msg(msg, bot=bot)
|
self._send_msg(msg, bot=bot)
|
||||||
|
Loading…
Reference in New Issue
Block a user