feat: log successful swap details with accounting information in follow_move function

This commit is contained in:
Dobromir Popov (aider) 2024-10-20 14:30:17 +03:00
parent 17dde54986
commit 37bc6bb086

View File

@ -1223,6 +1223,11 @@ async def follow_move(move):
)
logging.info(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:
logging.error(f"Error sending notification: {e}")