Claimable Balances
Retrieve Related Operations
This endpoint represents successful operations referencing a given claimable balance and can be used in streaming mode. Streaming mode allows you to listen for new operations referencing this claimable balance as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known operation unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream operations created since your request time.
GET
/
claimable_balances
/
{claimable_balance_id}
/
operations
Retrieve Related Operations
curl --request GET \
--url https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operationsimport requests
url = "https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations', 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://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations"
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://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations")
.asString();require 'uri'
require 'net/http'
url = URI("https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"_links": {
"self": {
"href": "https://horizon-testnet.stellar.org/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations?cursor=&limit=3&order=asc"
},
"next": {
"href": "https://horizon-testnet.stellar.org/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations?cursor=140648659841806337&limit=3&order=asc"
},
"prev": {
"href": "https://horizon-testnet.stellar.org/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations?cursor=140648659841806337&limit=3&order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://horizon-testnet.stellar.org/operations/140648659841806337"
},
"transaction": {
"href": "https://horizon-testnet.stellar.org/transactions/fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8"
},
"effects": {
"href": "https://horizon-testnet.stellar.org/operations/140648659841806337/effects"
},
"succeeds": {
"href": "https://horizon-testnet.stellar.org/effects?order=desc&cursor=140648659841806337"
},
"precedes": {
"href": "https://horizon-testnet.stellar.org/effects?order=asc&cursor=140648659841806337"
}
},
"id": "140648659841806337",
"paging_token": "140648659841806337",
"transaction_successful": true,
"source_account": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"type": "create_claimable_balance",
"type_i": 14,
"created_at": "2020-11-23T16:02:38Z",
"transaction_hash": "fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8",
"sponsor": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"asset": "BODHI:GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"amount": "0.1000000",
"claimants": [
{
"destination": "GBEUDKANIFPTFHPWJ5T3R6RIO36RQBFGHYPAQ6STH7KMNDHAT36LHOLD",
"predicate": {
"unconditional": true
}
}
]
}
]
}
}Supports StreamingThis endpoint supports streaming. To read more about this, visit the streaming section.
Query Parameters
Response
200 - application/json
Success
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Retrieve Related Operations
curl --request GET \
--url https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operationsimport requests
url = "https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations', 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://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations"
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://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations")
.asString();require 'uri'
require 'net/http'
url = URI("https://horizon-testnet.stellar.org/claimable_balances/{claimable_balance_id}/operations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"_links": {
"self": {
"href": "https://horizon-testnet.stellar.org/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations?cursor=&limit=3&order=asc"
},
"next": {
"href": "https://horizon-testnet.stellar.org/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations?cursor=140648659841806337&limit=3&order=asc"
},
"prev": {
"href": "https://horizon-testnet.stellar.org/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations?cursor=140648659841806337&limit=3&order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://horizon-testnet.stellar.org/operations/140648659841806337"
},
"transaction": {
"href": "https://horizon-testnet.stellar.org/transactions/fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8"
},
"effects": {
"href": "https://horizon-testnet.stellar.org/operations/140648659841806337/effects"
},
"succeeds": {
"href": "https://horizon-testnet.stellar.org/effects?order=desc&cursor=140648659841806337"
},
"precedes": {
"href": "https://horizon-testnet.stellar.org/effects?order=asc&cursor=140648659841806337"
}
},
"id": "140648659841806337",
"paging_token": "140648659841806337",
"transaction_successful": true,
"source_account": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"type": "create_claimable_balance",
"type_i": 14,
"created_at": "2020-11-23T16:02:38Z",
"transaction_hash": "fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8",
"sponsor": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"asset": "BODHI:GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"amount": "0.1000000",
"claimants": [
{
"destination": "GBEUDKANIFPTFHPWJ5T3R6RIO36RQBFGHYPAQ6STH7KMNDHAT36LHOLD",
"predicate": {
"unconditional": true
}
}
]
}
]
}
}