You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to retrieve option chain for an optionable sotck, for example, DD.
TDSessions has get_options_chains method, but I am probably no using it correctly. Could you please provide an example around retrieving option chains?
TDSession.get_option_chain expects an instance of OptionChain as its argument, so you have to first create your option chain object then pass it to your request like below.
# Import OptionChain class
from td.option_chain import OptionChain
# Create an instance of OC with your args
option_chain_1 = OptionChain(symbol='DD', strikeCount=5, toDate = '2020-02-15')
# Make API call for your chain by passing the option chain object
TDSession.get_options_chain(option_chain_1)
I am trying to retrieve option chain for an optionable sotck, for example, DD.
TDSessions has get_options_chains method, but I am probably no using it correctly. Could you please provide an example around retrieving option chains?
TDSession.get_options_chain({'symbol': 'DD', 'strikeCount': 5, 'toDate': '2020-02-15'})
Returns
I can retrieve stock quotes w/o problems, so the authentications for my account is working fine.
The text was updated successfully, but these errors were encountered: