Find the listings settlements paid for
curl --request GET \
--url https://testnet.rail402.dev/discovery/settlementsimport requests
url = "https://testnet.rail402.dev/discovery/settlements"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.rail402.dev/discovery/settlements', 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://testnet.rail402.dev/discovery/settlements",
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://testnet.rail402.dev/discovery/settlements"
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://testnet.rail402.dev/discovery/settlements")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.rail402.dev/discovery/settlements")
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{
"items": [
{
"transaction": "<string>",
"listing": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "http",
"resource": "<string>",
"payTo": "<string>",
"scheme": "<string>",
"amount": "<string>",
"asset": "<string>",
"network": "<string>",
"lastUpdated": "2023-11-07T05:31:56Z",
"method": "<string>",
"toolName": "<string>",
"description": "<string>",
"serviceName": "<string>"
},
"observedAt": "2023-11-07T05:31:56Z"
}
],
"asOf": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "discovery_invalid_parameter",
"reason": "Unsupported parameter: foo.",
"retryable": false
}
}{
"error": {
"code": "<string>",
"reason": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "discovery_overloaded",
"reason": "Discovery is at capacity; retry after the Retry-After interval.",
"retryable": true
}
}Discovery
Find the listings settlements paid for
For each settlement transaction that paid the owner of a listing published on network, the
listing it paid for, in the order asked. Unknown transactions, and those of a listing that is not
published there or whose usage is private, are absent. A network that publishes usage counts only
(<NET>_BAZAAR_USAGE_DETAIL=counts, pubnet’s default) links none. A transaction is the hash of the
transaction that settled the payment on chain: the fee bump’s hash for a sponsored settlement.
GET
/
discovery
/
settlements
Find the listings settlements paid for
curl --request GET \
--url https://testnet.rail402.dev/discovery/settlementsimport requests
url = "https://testnet.rail402.dev/discovery/settlements"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.rail402.dev/discovery/settlements', 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://testnet.rail402.dev/discovery/settlements",
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://testnet.rail402.dev/discovery/settlements"
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://testnet.rail402.dev/discovery/settlements")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.rail402.dev/discovery/settlements")
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{
"items": [
{
"transaction": "<string>",
"listing": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "http",
"resource": "<string>",
"payTo": "<string>",
"scheme": "<string>",
"amount": "<string>",
"asset": "<string>",
"network": "<string>",
"lastUpdated": "2023-11-07T05:31:56Z",
"method": "<string>",
"toolName": "<string>",
"description": "<string>",
"serviceName": "<string>"
},
"observedAt": "2023-11-07T05:31:56Z"
}
],
"asOf": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "discovery_invalid_parameter",
"reason": "Unsupported parameter: foo.",
"retryable": false
}
}{
"error": {
"code": "<string>",
"reason": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "discovery_overloaded",
"reason": "Discovery is at capacity; retry after the Retry-After interval.",
"retryable": true
}
}Query Parameters
The network whose listings and settlements are read.
Available options:
stellar:testnet, stellar:pubnet 1 to 100 comma-separated transaction hashes, each 64 lowercase hex characters.
Pattern:
^[0-9a-f]{64}(,[0-9a-f]{64}){0,99}$