Get pool rates
curl --request GET \
--url https://api.dkit.xyz/v1/poolratesconst options = {method: 'GET'};
fetch('https://api.dkit.xyz/v1/poolrates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dkit.xyz/v1/poolrates"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dkit.xyz/v1/poolrates"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dkit.xyz/v1/poolrates")
.asString();val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.dkit.xyz/v1/poolrates")
.get()
.build()
val response = client.newCall(request).execute()import Foundation
let url = URL(string: "https://api.dkit.xyz/v1/poolrates")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self)){
"rates": [
{
"asset": "ETH.ETH",
"priceInCacao": "12.34567890",
"priceInUsd": "3250.00",
"poolDepth": "50000000000000",
"volume24h": "10000000000000"
},
{
"asset": "BTC.BTC",
"priceInCacao": "165.43210987",
"priceInUsd": "43500.00",
"poolDepth": "100000000000000",
"volume24h": "25000000000000"
},
{
"asset": "DASH.DASH",
"priceInCacao": "0.32145678",
"priceInUsd": "84.60",
"poolDepth": "500000000000",
"volume24h": "50000000000"
},
{
"asset": "KUJI.KUJI",
"priceInCacao": "0.01234567",
"priceInUsd": "3.25",
"poolDepth": "250000000000",
"volume24h": "25000000000"
}
],
"cacaoPriceUsd": "0.263",
"timestamp": 1704067200
}Data Endpoints
Get pool rates
Returns pool rates in stables (median USDT/USDC price)
GET
/
v1
/
poolrates
Get pool rates
curl --request GET \
--url https://api.dkit.xyz/v1/poolratesconst options = {method: 'GET'};
fetch('https://api.dkit.xyz/v1/poolrates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dkit.xyz/v1/poolrates"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dkit.xyz/v1/poolrates"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dkit.xyz/v1/poolrates")
.asString();val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.dkit.xyz/v1/poolrates")
.get()
.build()
val response = client.newCall(request).execute()import Foundation
let url = URL(string: "https://api.dkit.xyz/v1/poolrates")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self)){
"rates": [
{
"asset": "ETH.ETH",
"priceInCacao": "12.34567890",
"priceInUsd": "3250.00",
"poolDepth": "50000000000000",
"volume24h": "10000000000000"
},
{
"asset": "BTC.BTC",
"priceInCacao": "165.43210987",
"priceInUsd": "43500.00",
"poolDepth": "100000000000000",
"volume24h": "25000000000000"
},
{
"asset": "DASH.DASH",
"priceInCacao": "0.32145678",
"priceInUsd": "84.60",
"poolDepth": "500000000000",
"volume24h": "50000000000"
},
{
"asset": "KUJI.KUJI",
"priceInCacao": "0.01234567",
"priceInUsd": "3.25",
"poolDepth": "250000000000",
"volume24h": "25000000000"
}
],
"cacaoPriceUsd": "0.263",
"timestamp": 1704067200
}⌘I