I'm trying to use this Java library for TD Ameritrade https://github.com/studerw/td-ameritrade-client
Here is the starting code
Properties props = new Properties();
props.setProperty("tda.client_id", "[email protected]"); // I have this
props.setProperty("tda.token.refresh", "XXX"); // I don't have this
I have a client_id
, a.k.a. consumer key
But I don't have a refresh token. I only want to use the Quotes API, I don't want to make any actual trades. I'm able to test the consumer key
here https://developer.tdameritrade.com/quotes/apis/get/marketdata/quotes and it works great. Do I have to obtain refresh token too? Is it mandatory? Is there any way to use consumer key
only without the refresh token
?
Here https://developer.tdameritrade.com/quotes/apis/get/marketdata/quotes it says "Authorization Token aka Refresh token is Optional", so is it really "Optional"
As far as I can tell, if you have tokens, you will get more up to date quotes. If you do not, you will get delayed data:
If you want more realtime data (I do not have an Ameritrade account, not sure exactly what the delay difference is), you can use tokens:
(Un-authenticated requests being the above delayed route)
Alternatively, if you want a Refresh Token, which expires every 90 days and is used to gain an Access Token (expires every 30 minutes), the steps are listed here: https://developer.tdameritrade.com/content/simple-auth-local-apps
Again, I do not have a TD Ameritrade account to personally confirm this, but looks like you have at least two options to get Quotes.
Further FAQ resources: