It appears that limit_price_warning is never defined inside option_trade_v2, so these two lines are no longer required. I only noticed this because VSCode highlighted those lines with a warning.
I'm not familiar enough with the Schwab API to know whether a more correct solution would be to check the validity of the limit price, as in trade_v2. Happy to give that a go if you think that would be better.
Yes, I just tried to actually place an order with dry_run=False and noticed this error. It is a copy paste error from the function trade_v2 which was used as a template.
It appears that
limit_price_warning
is never defined insideoption_trade_v2
, so these two lines are no longer required. I only noticed this because VSCode highlighted those lines with a warning.I'm not familiar enough with the Schwab API to know whether a more correct solution would be to check the validity of the limit price, as in
trade_v2
. Happy to give that a go if you think that would be better.