Added API reference.
This commit is contained in:
parent
0dff725627
commit
1dda05fe20
2 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,7 @@ public class CryptoPriceSample {
|
||||||
System.out.println("The current Bitcoin price is " + euroPrice.getAmount() + " in Euros");
|
System.out.println("The current Bitcoin price is " + euroPrice.getAmount() + " in Euros");
|
||||||
|
|
||||||
// Get current Bitcoin buy price using API.
|
// Get current Bitcoin buy price using API.
|
||||||
|
// See: https://developers.coinbase.com/api/v2#get-buy-price
|
||||||
final CryptoPrice buyPrice =
|
final CryptoPrice buyPrice =
|
||||||
CryptoPrice.toPrice(
|
CryptoPrice.toPrice(
|
||||||
CryptoPrice.apiCall(
|
CryptoPrice.apiCall(
|
||||||
|
|
|
@ -14,6 +14,7 @@ fun main(@Suppress("UNUSED_PARAMETER") args: Array<String>) {
|
||||||
println("The current Bitcoin price is ${euroPrice.amount} in Euros")
|
println("The current Bitcoin price is ${euroPrice.amount} in Euros")
|
||||||
|
|
||||||
// Get current Bitcoin buy price using API.
|
// Get current Bitcoin buy price using API.
|
||||||
|
// See: https://developers.coinbase.com/api/v2#get-buy-price
|
||||||
var buyPrice = apiCall(listOf("prices", "BTC-USD", "buy"), emptyMap()).toPrice()
|
var buyPrice = apiCall(listOf("prices", "BTC-USD", "buy"), emptyMap()).toPrice()
|
||||||
println("The current BTC buy price is ${buyPrice.amount} in ${buyPrice.currency}")
|
println("The current BTC buy price is ${buyPrice.amount} in ${buyPrice.currency}")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue