Skip to content

studerw/td-ameritrade-java-client-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TD Ameritrade Java Client Demo

Version 1.0

This is a simple Spring Boot 2 Application demonstrating a custom web service built on top of the TD-Ameritrade-Client for Java API.

Requirements

  • TDA Ameritrade Developer API Client ID and Token
  • Java 8 runtime on path

Build

mvn clean package

Running in IDE or with Maven

If you want to run for development purposes using e.g. mvn spring-boot:run or in your IDE, then you should copy the file src/main/assembly/zip/config/application.properties to the src/main/resources folder and modify any properties as needed.

If you then build the application and use the zipped version, then application.properties file that ends up in the config folder will override the properties that end up bundled in the jar from src/main/resources. See rules 14 and 15 in the Spring Boot Externalized Configuration section of the manual for more info.

Run

The distro is located in target folder as td-ameritrade-java-client-demo-<version>.zip

Unzip this in a directory.

  1. Go into config/application.properties and set, at a minimum, the tda.client_id and tda.token.refresh properties.
  2. Run java -jar ./td-ameritrade-java-client-demo-<version>.jar.
  3. Import the client cert located at X509/tda_client_1.p12 into your OS keystore or browser. All keystore, certificate, etc. passwords are password.
  4. You should be able to hit any api via your browser, e.g. https://localhost:443/api/v1/tda/quotes?symbols=msft.
  5. There are several curl scripts in src/test/curl which you can use for testing the REST calls.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published