Skip to main content
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": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Invalid request parameters"
}
{
"code": "unauthorized",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"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

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Query Parameters

program_id
string<uuid>

Filter by program ID. May be combined with asset_id.

asset_id
string<uuid>

Filter to a single asset. May be combined with program_id.

from
string<date-time>

Period start (inclusive, RFC3339). Must be provided with to.

to
string<date-time>

Period end (inclusive, RFC3339). Must be provided with from.

Response

Ledger summaries

Ledger summary results

data
object[]

Per-asset ledger summaries

pagination
object

Pagination metadata for list responses