Skip to content

A demo app in Java for streaming rates using OANDA open api

License

Notifications You must be signed in to change notification settings

platform-economy/java-api-streaming

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-api-streaming

A simple demo app in Java for getting streaming rates using OANDA API. This example uses apache httpcomponents for https connections and json-simple for json decoding.

Setup

Clone this repo to the location of your choice.

Modify the following variables in JavaApiStreaming.java:

domain
access_token
account_id
instruments

Maven is used for building. Install from http://maven.apache.org/download.cgi. On Ubuntu, you can run sudo apt-get install maven.

To create and execute the jar file, run

mvn package
java -jar target/streaming-example-java-1.jar

Sample Output

EUR_USD
2014-03-21T17:56:09.932922Z
1.37912
1.37923
-------
USD_CAD
2014-03-21T17:56:20.776248Z
1.12011
1.12029
-------
USD_JPY
2014-03-21T17:56:13.668154Z
102.262
102.275

More Information

http://developer.oanda.com/docs/v1/stream/#rates-streaming

About

A demo app in Java for streaming rates using OANDA open api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%