daqianz88 / client-jvm

A client SDK for Polygon.io's API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Polygon JVM Client SDK written in Kotlin

A client SDK for Polygon.io's API usable by any JVM language (including in Android SDK version 21+)

Supports Polygon's REST and WebSocket APIs

To use the SDK in a Gradle project:

repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}

dependencies {
    implementation 'com.github.polygon-io:client-jvm:vX.Y.Z' 
}

(See GitHub releases for the current release version)

Features

Everything you'd expect from a client SDK plus...

  • Configurable HTTP client via HttpClientProvider
  • Asynchronous APIs built on top of Kotlin co-routines
  • Idiomatic interoperability with Java
    • Synchronous and callback based APIs
    • Generated builder classes for API parameter data classes

Sample code

See the sample module in this repo; There's a short Kotlin sample and Java sample

You can run the samples by cloning the repo and running the following commands from the repo's root directory:

Kotlin: ./gradlew kotlinSample

Java: ./gradlew javaSample

NOTE: If you run the samples makes sure to set the POLYGON_API_KEY environment variable for the sample code to use

About

A client SDK for Polygon.io's API


Languages

Language:Kotlin 100.0%