StockMarket
Table of Contents
Intro
Architecture
Main modules
App module
Data-layer module
Utility socket module
CICD and quality
Used api
Config
The endpoint used in this example is below
wss://ws-feed.gdax.com
You can test it using the following utility
https://www.websocket.org/echo.html
Request
{
"type": "subscribe",
"channels": [
{
"name": "ticker",
"product_ids": [
"BTC-EUR",
"ETH-EUR"
]
}
]
}
Response
{
"type": "ticker",
"sequence": 9537693195,
"product_id": "BTC-EUR",
"price": "22950",
"open_24h": "21589.61",
"volume_24h": "2592.29258956",
"low_24h": "21430.64",
"high_24h": "23300",
"volume_30d": "69254.40965118",
"best_bid": "22942.96",
"best_ask": "22950.00",
"side": "buy",
"time": "2020-12-30T16:59:26.344287Z",
"trade_id": 32667801,
"last_size": "0.0083387"
}
Config
Bintray
Check that you have the bintray
repository.
// Add Bintray to your repositories
repositories {
maven { url "https://dl.bintray.com/ciriti/gdax" }
}
Dependencies
dependencies {
implementation "io.github.ciriti:okhttp-socket-ext:1.6.0"
implementation "io.github.ciriti:gdax-data:1.6.0"
}
Version in env
export VERSION_NAME=$(./gradlew versionTxt -q)