Remove options chain mid price debug logs

This commit is contained in:
moshferatu 2024-03-08 11:59:34 -08:00
parent 34cb5f3fe9
commit 6f8aaa0c74

View File

@ -65,12 +65,6 @@ def _enter_iron_condor(entry_time: datetime):
logging.info(f'Short Call Strike: {short_call_strike}') logging.info(f'Short Call Strike: {short_call_strike}')
logging.info(f'Long Call Strike: {long_call_strike}') logging.info(f'Long Call Strike: {long_call_strike}')
put_spread_price = options_chain.spread_mid_price(short_put_strike, long_put_strike, OptionType.PUT)
logging.info(f'Options Chain Put Spread Mid Price: {put_spread_price}')
call_spread_price = options_chain.spread_mid_price(short_call_strike, long_call_strike, OptionType.CALL)
logging.info(f'Options Chain Call Spread Mid Price: {call_spread_price}')
ibkr_client = Client() ibkr_client = Client()
trade = IronCondorTrade(symbol, credit_target, entry_time, float(getenv('STOP_MULTIPLE'))) trade = IronCondorTrade(symbol, credit_target, entry_time, float(getenv('STOP_MULTIPLE')))
@ -81,7 +75,6 @@ def _enter_iron_condor(entry_time: datetime):
logging.info(f'Call Spread Mid Price: {call_spread_order.mid_price}') logging.info(f'Call Spread Mid Price: {call_spread_order.mid_price}')
logging.info(f'Call Spread Fill Price: {call_spread_order.fill_price}') logging.info(f'Call Spread Fill Price: {call_spread_order.fill_price}')
logging.info(f'Call Spread Slippage: {call_spread_order.mid_price - call_spread_order.fill_price}') logging.info(f'Call Spread Slippage: {call_spread_order.mid_price - call_spread_order.fill_price}')
logging.info(f'Options Chain Call Spread Slippage: {call_spread_price - call_spread_order.fill_price}')
monitor_spread(trade, call_spread_order, ibkr_client) monitor_spread(trade, call_spread_order, ibkr_client)
@ -92,7 +85,6 @@ def _enter_iron_condor(entry_time: datetime):
logging.info(f'Put Spread Mid Price: {put_spread_order.mid_price}') logging.info(f'Put Spread Mid Price: {put_spread_order.mid_price}')
logging.info(f'Put Spread Fill Price: {put_spread_order.fill_price}') logging.info(f'Put Spread Fill Price: {put_spread_order.fill_price}')
logging.info(f'Put Spread Slippage: {put_spread_order.mid_price - put_spread_order.fill_price}') logging.info(f'Put Spread Slippage: {put_spread_order.mid_price - put_spread_order.fill_price}')
logging.info(f'Options Chain Put Spread Slippage: {put_spread_price - put_spread_order.fill_price}')
monitor_spread(trade, put_spread_order, ibkr_client) monitor_spread(trade, put_spread_order, ibkr_client)