Most of the inputs are available from the etrade real-time api, the others (r,q) are not real-time critical and you can use the same value all day. X and t are available from the options symbol. t can be calculated easily from the expiry date (the six numbers following the options base) minus the current date over 365. X is the eight numbers after the date with an implied three decimal places. S requires another call to the api to get the current price of the underlying, the symbol of which is usually the option base (first letters before date in symbol). For r, you can use the same risk-free curve all day, just average between the two nearest points. The same curve can be used for all options. And you can download rate curves from various sources (FRED,yahoo,bloomberg...) before open. σ can be calculated from all the other inputs and the mid price. q is a bit problematic as a continuous div yield is misspecified for american options with discrete dividends, but if you insist on using blackscholes for american options you can get TTM dividends on the underlying from an etrade api call. Just divide the TTM divs by the current price and multiply by 1.1 for a guess at the forward div rate. Are you using the etrade rest api? What language are you programming in?
Thanks, this is the most comprehensive one, will take me some time to digest. I just briefly looked at etrade api, looks pretty limited. I mostly do in python, c and rest-api is new so there are some crash course involved. Thx!
Don't know about eTrade but Interactive Brokers (IB) has a pretty decent api in C# as well as Python which you can use to pull out prices/vols. I normally calculate the greeks myself using the vol surface.