feat: log successful swap details with accounting information in follow_move function
This commit is contained in:
parent
17dde54986
commit
37bc6bb086
@ -1223,6 +1223,11 @@ async def follow_move(move):
|
|||||||
)
|
)
|
||||||
logging.info(notification)
|
logging.info(notification)
|
||||||
await send_telegram_message(notification)
|
await send_telegram_message(notification)
|
||||||
|
|
||||||
|
# Log successful swap details
|
||||||
|
success_logger_accounting_csv.info(
|
||||||
|
f"{move['symbol_in']},{move['symbol_out']},{amount_to_swap:.6f},{tx_details['amount_out']:.6f},{move['amount_in_USD']:.2f},{tx_details['amount_out_USD']:.2f},{move['percentage_swapped']:.2f}"
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Error sending notification: {e}")
|
logging.error(f"Error sending notification: {e}")
|
||||||
|
|
||||||
@ -1473,4 +1478,4 @@ async def run_all():
|
|||||||
)
|
)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
asyncio.run(run_all())
|
asyncio.run(run_all())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user