itsjafer / schwab-api

A python library for placing trades on Charles Schwab
MIT License
201 stars 64 forks source link

Remove redundant code #57

Closed tristanpenman closed 5 months ago

tristanpenman commented 5 months ago

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.

4rumprom commented 5 months ago

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.