Updated examples, dependencies and some cleanup.
This commit is contained in:
parent
59751a574c
commit
b547a4d07d
5 changed files with 23 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id("org.jetbrains.kotlin.jvm") version "1.5.10"
|
||||
id("com.github.ben-manes.versions") version "0.38.0"
|
||||
id("com.github.ben-manes.versions") version "0.39.0"
|
||||
application
|
||||
}
|
||||
|
||||
|
|
|
@ -14,16 +14,16 @@ public class CryptoPriceSample {
|
|||
final CryptoPrice price = CryptoPrice.spotPrice("BTC");
|
||||
System.out.println("The current Bitcoin price is " + price.toCurrency());
|
||||
|
||||
// Get current Bitcoin spot price in Euros.
|
||||
final CryptoPrice euroPrice = CryptoPrice.spotPrice("BTC", "EUR");
|
||||
System.out.println("The current Bitcoin price is " + euroPrice.toCurrency());
|
||||
|
||||
System.out.println();
|
||||
|
||||
// Get current Ethereum spot price in Pound sterling.
|
||||
final CryptoPrice gbpPrice = CryptoPrice.spotPrice("ETH", "GBP");
|
||||
System.out.println("The current Ethereum price is " + gbpPrice.toCurrency());
|
||||
|
||||
// Get current Litecoin spot price in Euros.
|
||||
final CryptoPrice euroPrice = CryptoPrice.spotPrice("LTC", "EUR");
|
||||
System.out.println("The current Litecoin price is " + euroPrice.toCurrency());
|
||||
|
||||
System.out.println();
|
||||
|
||||
// Get current Bitcoin buy price using API.
|
||||
|
|
|
@ -9,16 +9,16 @@ fun main(@Suppress("UNUSED_PARAMETER") args: Array<String>) {
|
|||
val price = spotPrice("BTC")
|
||||
println("The current Bitcoin price is ${price.toCurrency()}")
|
||||
|
||||
// Get current Bitcoin spot price in Euro.
|
||||
val euroPrice = spotPrice("BTC", "EUR")
|
||||
println("The current Bitcoin price is ${euroPrice.toCurrency()}")
|
||||
|
||||
println()
|
||||
|
||||
|
||||
// Get current Ethereum spot price in Pound sterling.
|
||||
val gbpPrice = spotPrice("ETH", "GBP")
|
||||
println("The current Ehtereum price is ${gbpPrice.toCurrency()}")
|
||||
|
||||
// Get current Litecoin spot price in Euro.
|
||||
val euroPrice = spotPrice("LTC", "EUR")
|
||||
println("The current Litecoin price is ${euroPrice.toCurrency()}")
|
||||
|
||||
println()
|
||||
|
||||
// Get current Bitcoin buy price using API.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue