Get UTXOs by addresses
curl --request POST \
--url https://api.kas.fyi/v1/rpc/getUtxosByAddresses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"addresses": [
"kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz",
"kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a"
]
}
'import requests
url = "https://api.kas.fyi/v1/rpc/getUtxosByAddresses"
payload = { "addresses": ["kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz", "kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
addresses: [
'kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz',
'kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a'
]
})
};
fetch('https://api.kas.fyi/v1/rpc/getUtxosByAddresses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kas.fyi/v1/rpc/getUtxosByAddresses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'addresses' => [
'kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz',
'kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kas.fyi/v1/rpc/getUtxosByAddresses"
payload := strings.NewReader("{\n \"addresses\": [\n \"kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz\",\n \"kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kas.fyi/v1/rpc/getUtxosByAddresses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"addresses\": [\n \"kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz\",\n \"kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kas.fyi/v1/rpc/getUtxosByAddresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addresses\": [\n \"kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz\",\n \"kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"entries": [
{
"outpoint": {
"transactionId": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
"index": 0
},
"amount": "1000000000",
"scriptPublicKey": {
"version": 0,
"script": "204414bb10040d733b8156874a25af45c1fb938811f01d122e371adc3d4cc19724ac"
},
"blockDaaScore": "1234567",
"isCoinbase": false,
"address": "kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz"
}
]
}Address & Balance
Get UTXOs by addresses
Retrieves UTXOs associated with specific addresses.
POST
/
v1
/
rpc
/
getUtxosByAddresses
Get UTXOs by addresses
curl --request POST \
--url https://api.kas.fyi/v1/rpc/getUtxosByAddresses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"addresses": [
"kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz",
"kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a"
]
}
'import requests
url = "https://api.kas.fyi/v1/rpc/getUtxosByAddresses"
payload = { "addresses": ["kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz", "kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
addresses: [
'kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz',
'kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a'
]
})
};
fetch('https://api.kas.fyi/v1/rpc/getUtxosByAddresses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kas.fyi/v1/rpc/getUtxosByAddresses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'addresses' => [
'kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz',
'kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kas.fyi/v1/rpc/getUtxosByAddresses"
payload := strings.NewReader("{\n \"addresses\": [\n \"kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz\",\n \"kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kas.fyi/v1/rpc/getUtxosByAddresses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"addresses\": [\n \"kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz\",\n \"kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kas.fyi/v1/rpc/getUtxosByAddresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addresses\": [\n \"kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz\",\n \"kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"entries": [
{
"outpoint": {
"transactionId": "34e9538fd3225652553930657c3d767d5ccab0fcd545038a69c202e45929dcd6",
"index": 0
},
"amount": "1000000000",
"scriptPublicKey": {
"version": 0,
"script": "204414bb10040d733b8156874a25af45c1fb938811f01d122e371adc3d4cc19724ac"
},
"blockDaaScore": "1234567",
"isCoinbase": false,
"address": "kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz"
}
]
}Cost
This endpoint costs 0.5 RU (Request Units) per call.Authorizations
API key required for authentication. Get your API key at https://developer.kas.fyi
Body
application/json
Array of Kaspa addresses to get UTXOs for
Example:
[
"kaspa:qpzpfwcsqsxhxwup26r55fd0ghqlhyugz8cp6y3wxuddc02vcxtjg75pspnwz",
"kaspa:qpz2vgvlxhmyhmt22h538pjzmvvd52nuut80y5zulgpvyerlskvvwm7n4uk5a"
]
Response
200 - application/json
UTXOs retrieved successfully
Array of UTXO entries
Show child attributes
Show child attributes
⌘I