td-ameritrade-client 2.4.3 API

The TdaClient is your main interface into the API. Note that in TDA's documentation, sometimes the term client id is used and other times consumer key is used. They are the same. You should not have @AMER.OAUTHAP appended to the client id. That is only used when creating a new refresh token.

Create a tda-api.properties in your classpath with the following properties:

  • tda.client_id
  • tda.token.refresh
  TdaClient client = new HttpTdaClient();

  Quote quote = client.fetchQuote("msft");
  EquityQuote equityQuote = (EquityQuote) quote;

  System.out.println("Current ask price of MSFT: " + equityQuote.getAskPrice());