A demo app in Java for streaming rates using OANDA open api
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is even with oanda:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/main/java
.gitignore
LICENCE.md
README.md
pom.xml

README.md

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