Round exit slippage calculation as well

This commit is contained in:
moshferatu 2024-02-21 13:02:36 -08:00
parent b26c4068ac
commit ffc281fcc2

View File

@ -64,7 +64,7 @@ def monitor_spread_price(short_leg: OptionLeg, long_leg: OptionLeg, stop_price:
exit_order = client.submit_option_order(short_leg_exit)
logging.info('Short leg only exited.')
logging.info(f'Exit Slippage: {exit_order.fill_price - stop_price}')
logging.info(f'Exit Slippage: {round(exit_order.fill_price - stop_price, 3)}')
# Unsubscribe from market data updates once the trade has exited.
for leg in [short_leg, long_leg]: