Files
ATS_Esper/docs/setup.org

2.1 KiB

Install SDKman

Java Software Development Kit Manager

curl -s "https://get.sdkman.io" | bash

Install Gradle

Java build tool

sdk install gradle 4.6

Init project

mkdir ATS_Esper && cd $!
gradle init --type java-application

Hack hack hack

./gradlew build
./gradlew run

Get sample data

curl -H "Authorization: Bearer 9a480f0b83e987f4015cf0846790c7d9-695ced635526744abd61bdf0e2ae8b71" https://stream-fxpractice.oanda.com/v3/accounts/101-001-7935538-001/pricing/stream\?instruments\=USD_CAD
{"type":"PRICE",
 "time":"2018-03-06T03:55:26.327901133Z",
 "bids":[{"price":"1.29728","liquidity":10000000}],
 "asks":[{"price":"1.29744","liquidity":10000000}],
 "closeoutBid":"1.29728",
 "closeoutAsk":"1.29744",
 "status":"tradeable",
 "tradeable":true,
 "instrument":"USD_CAD"}
{"type":"HEARTBEAT","time":"2018-03-06T03:55:38.607009935Z"}
{"type":"PRICE","time":"2018-03-06T03:55:43.572975078Z","bids":[{"price":"1.29727","liquidity":10000000}],"asks":[{"price":"1.29745","liquidity":10000000}],"closeoutBid":"1.29727","closeoutAsk":"1.29745","status":"tradeable","tradeable":true,"instrument":"USD_CAD"}
{"type":"HEARTBEAT","time":"2018-03-06T03:55:43.625479422Z"}
{"type":"PRICE","time":"2018-03-06T03:55:43.635882478Z","bids":[{"price":"1.29726","liquidity":10000000}],"asks":[{"price":"1.29745","liquidity":10000000}],"closeoutBid":"1.29726","closeoutAsk":"1.29745","status":"tradeable","tradeable":true,"instrument":"USD_CAD"}

eclim server

http://eclim.org/install.html

had to manually symlink eclim in home/alx/eclipse/java-oxygen/eclipse after install. use the eclimd symlink there as a guide.

set up gradle project in eclipse

  • install Buildship eclipse plugin
  • import Gradle project in eclipse

start eclim

start with:

/home/alx/eclipse/java-oxygen/eclipse/eclimd

then M-x eclim-mode in a java buffer.