Apple Inc
Education

How to crawl history price or options from TD Ameritrade API?

I crawl options data from Yahoo Finance but actually, Yahoo returned fake data if I send a thousand requests.
I research and use TD Ameritrade API to get options, both github.com/areed1192/td-ameritrade-python-api and github.com/timkpaine/tdameritrade is a good rating. However, every time I send a request a new token is generated then the TD Ameritrade API team noticed me. I like tdameritrade package than td-ameritrade-python-api because of the handled tokens.
======================
Major changes in the v0.1.0 update to the way tokens are handled.
You will still need the original authentication instructions, but the TDClient now takes the refresh token and client id, not the access token. A new session class handles token expiration and will automatically call a new token as needed.
======================
And I used Redis to keep tokens in 30 minutes, then my project works smoothly.

You have a job similar please reference github.com/dearvn/tdameritrade_ext, you can download source code and use (the package I am testing)

I hope this source saves your time.
codingDATAFundamental Analysisoptionstdameritrade

Also on:

Disclaimer