gdax-datalayer

Example of socket usage

License

License

Sourcepoint License
Categories

Categories

Data
GroupId

GroupId

io.github.ciriti
ArtifactId

ArtifactId

datalayer
Last Version

Last Version

1.4.0
Release Date

Release Date

Type

Type

aar
Description

Description

gdax-datalayer
Example of socket usage
Project URL

Project URL

https://github.com/ciriti/StockMarket

Download datalayer

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.ciriti/datalayer/ -->
<dependency>
    <groupId>io.github.ciriti</groupId>
    <artifactId>datalayer</artifactId>
    <version>1.4.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/io.github.ciriti/datalayer/
implementation 'io.github.ciriti:datalayer:1.4.0'
// https://jarcasting.com/artifacts/io.github.ciriti/datalayer/
implementation ("io.github.ciriti:datalayer:1.4.0")
'io.github.ciriti:datalayer:aar:1.4.0'
<dependency org="io.github.ciriti" name="datalayer" rev="1.4.0">
  <artifact name="datalayer" type="aar" />
</dependency>
@Grapes(
@Grab(group='io.github.ciriti', module='datalayer', version='1.4.0')
)
libraryDependencies += "io.github.ciriti" % "datalayer" % "1.4.0"
[io.github.ciriti/datalayer "1.4.0"]

Dependencies

compile (1)

Group / Artifact Type Version
io.github.ciriti : okhttp-socket-ext jar 1.4.0

runtime (26)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-android-extensions-runtime jar 1.3.72
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.3.72
org.jetbrains.kotlin : kotlin-reflect jar 1.3.72
androidx.appcompat » appcompat jar 1.1.0
androidx.core » core-ktx jar 1.3.1
androidx.constraintlayout » constraintlayout jar 1.1.3
org.jetbrains.kotlinx : kotlinx-coroutines-android jar 1.3.8
com.google.android.material » material jar 1.1.0
io.arrow-kt : arrow-core jar 0.10.4
org.koin » koin-core jar 2.0.1
org.koin » koin-android-viewmodel jar 2.0.1
com.tinder.scarlet : scarlet jar 0.1.10
com.tinder.scarlet : websocket-okhttp jar 0.1.10
com.tinder.scarlet : stream-adapter-coroutines jar 0.1.10
com.tinder.scarlet : stream-adapter-rxjava2 jar 0.1.10
com.tinder.scarlet : message-adapter-moshi jar 0.1.10
com.tinder.scarlet : lifecycle-android jar 0.1.10
com.google.code.gson : gson jar 2.8.6
com.squareup.okhttp3 : okhttp jar 4.4.0
androidx.lifecycle » lifecycle-viewmodel-ktx jar 2.3.0-alpha06
androidx.lifecycle » lifecycle-runtime-ktx jar 2.3.0-alpha06
androidx.legacy » legacy-support-v4 jar 1.0.0
androidx.recyclerview » recyclerview jar 1.1.0
io.reactivex.rxjava2 : rxkotlin jar 2.4.0
io.reactivex.rxjava2 : rxandroid jar 2.1.1
io.reactivex.rxjava2 : rxjava jar 2.2.19

Project Modules

There are no modules declared in this project.

https://github.com/ciriti/StockMarket/workflows/Test/badge.svg https://github.com/ciriti/StockMarket/workflows/GitHub%20Tag%20and%20Release/badge.svg https://github.com/ciriti/StockMarket/workflows/App%20Release/badge.svg

Bintray Bintray

StockMarket

Get it on Google Play

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)

Versions

Version
1.4.0