This app uses Spark Java to provide REST interface and to collect stock prices via websocket connection. All candlesticks are stored in memory. CandlestickStorage
also could utilise some external key-value storage like Redis
with minor adjustments.
The request format is
GET http://localhost:8080/candlesticks?symbol=TSLA.
Gradle build:
./gradlew build
Build docker:
docker build -t candlestick-aggregator .
Run this container:
docker run -it --rm -p 8080:8080 candlestick-aggregator