Get ledger summary
curl --request GET \
--url https://api.scrip.dev/v1/reports/ledger-summary \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/reports/ledger-summary"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/reports/ledger-summary', 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.scrip.dev/v1/reports/ledger-summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/reports/ledger-summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.scrip.dev/v1/reports/ledger-summary")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/reports/ledger-summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"asset_id": "550e8400-e29b-41d4-a716-446655440000",
"asset_name": "Loyalty Points",
"asset_symbol": "POINTS",
"closing_balance": "562500.00",
"current_balance": "625000.00",
"opening_balance": "500000.00",
"other_adjustments_net": "-905.00",
"participant_count": 15420,
"period_expired": "2500.00",
"period_forfeited": "2000.00",
"period_issued": "150000.00",
"period_redeemed": "85000.00",
"scale": 2,
"total_expired": "5000.00",
"total_forfeited": "20000.00",
"total_issued": "1500000.00",
"total_redeemed": "850000.00"
}
],
"pagination": {
"has_more": true,
"next_cursor": "YWJjMTIz"
}
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Reporting
Get ledger summary
Returns aggregated balances and flows per asset, optionally scoped to a program or asset and a time window.
GET
/
v1
/
reports
/
ledger-summary
Get ledger summary
curl --request GET \
--url https://api.scrip.dev/v1/reports/ledger-summary \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/reports/ledger-summary"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/reports/ledger-summary', 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.scrip.dev/v1/reports/ledger-summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/reports/ledger-summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.scrip.dev/v1/reports/ledger-summary")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/reports/ledger-summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"asset_id": "550e8400-e29b-41d4-a716-446655440000",
"asset_name": "Loyalty Points",
"asset_symbol": "POINTS",
"closing_balance": "562500.00",
"current_balance": "625000.00",
"opening_balance": "500000.00",
"other_adjustments_net": "-905.00",
"participant_count": 15420,
"period_expired": "2500.00",
"period_forfeited": "2000.00",
"period_issued": "150000.00",
"period_redeemed": "85000.00",
"scale": 2,
"total_expired": "5000.00",
"total_forfeited": "20000.00",
"total_issued": "1500000.00",
"total_redeemed": "850000.00"
}
],
"pagination": {
"has_more": true,
"next_cursor": "YWJjMTIz"
}
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Returns aggregated balances and flows for each asset:
total_issued, total_redeemed, total_expired, total_forfeited, current_balance, participant_count, and the asset’s scale. All values are computed in real time from the ledger.
Scope with program_id, asset_id, or both; omit both for org-wide totals. Add from and to for a per-asset period rollforward. Period redemption figures are gross; all-time total_redeemed is net of reversals.
For audit-grade period reporting with no residual bucket, use the liability rollforward. For usage patterns, see the Reporting guide.
Authorizations
ApiKeyAuthBearerAuth
API key passed in the X-API-Key header.
Query Parameters
Filter by program ID. May be combined with asset_id.
Filter to a single asset. May be combined with program_id.
Period start (inclusive, RFC3339). Must be provided with to.
Period end (inclusive, RFC3339). Must be provided with from.