Skip to content

alleyway/bybit-kotlin-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ByBit jvm API Client SDK (written in Kotlin)

NOTE: this library is in early development stages. There is NO WARRANTY.

File an issue if you'd to add more functionality!

Maintainers wanted! Pull requests greatly appreciated/wanted!

To use the SDK in a Gradle project:

dependencies {
    implementation 'io.github.alleyway:bybit-kotlin-api:0.6.0' 
}

To use the SDK in a Maven project:

<dependency>
    <groupId>io.github.alleyway</groupId>
    <artifactId>bybit-kotlin-api</artifactId>
    <version>0.6.0</version>
</dependency>

Look in the sample project for examples in Java or Kotlin.

Example code

Here's a little example to get you started...

val bybitClient = ByBitRestClient(bybitKey, bybitSecret, true, httpClientProvider = okHttpClientProvider)
println("Blocking for wallet balance...")
val walletBalanceResponse = bybitClient.accountClient.getWalletBalanceBlocking(WalletBalanceParams(AccountType.SPOT, listOf("BTC")))
println("Got wallet balance synchronously: $walletBalanceResponse")

Developer's Notes

Deployment

Make sure you get the right artifacts in your ~/.m2/repository/

./mvnw clean install

Publish to Sonatype

Publish Command:

Set ENV variables for demo acct

./mvnw -P release clean deploy 

Release non-snapshot

  • update version in Version.kt, pom.xml and README.md file
  • commit non-snapshot version
  • create Release & tag of version in github
  • run Publish Command above - check local.properties for more info