Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
Guides Savings Statements and interest

Statements and interest

Read a customer's savings balance, how interest is added each night, and a daily statement as JSON or a CSV file.

4 min read

This page shows how to read a customer's savings, when interest is added, and how to get a statement of what happened each day.

Status. Available in sandbox. Not yet available with a live key.

A money example. Ada saved 110 on 27 October and earned 0.25 the same day. Her statement row for 2026-10-27 reads: opening 0, saved 110, withdrawn 0, interest 0.25, closing 110.25.

Read the savings

Use the savings account id.

get savings request
curl --request GET \
--url https://api.gravv.xyz/v1/savings/d9eae506-77b4-4e8b-8ab3-caaf96054d79 \
--header 'Api-Key: <API_KEY>'
get savings response
{
"data": {
"id": "d9eae506-77b4-4e8b-8ab3-caaf96054d79",
"kind": "account",
"account_id": "d9eae506-77b4-4e8b-8ab3-caaf96054d79",
"wallet_id": "d4ed232e-ebd1-43b3-b6d7-b6739cadd13f",
"currency": "USDC",
"available_balance": "70.000000",
"saved_balance": "110.250000",
"pending_balance": "0.000000",
"earned_total": "0.250000",
"apy": "3.50",
"wallet_address": "0x8f3b2a91c4d05e6f7a8b9c0d1e2f3a4b5c6d7e8f",
"blockchain_network": "avalanche",
"as_of": "2026-10-27T09:20:00Z"
},
"error": null
}
FieldMeaning
available_balanceMoney on the account, not saved yet
saved_balanceMoney in savings, interest included. It earns interest, and it is the most you can withdraw
pending_balanceMoney still moving. Negative while a withdrawal is on its way, and 0.000000 when nothing is moving
earned_totalAll the interest earned so far
apyToday's yearly rate in percent. Empty when the rate cannot be read

Amounts have 6 decimal places. Show them to the customer rounded to 2.

The savings wallet id also works as the id, with kind wallet, but its available_balance is the wallet's own and can differ from the account's. Use the account id.

How interest is added

•
In live, Gravv adds interest once a night, at about 01:30 UTC. It is never more than 0.1% of the saved balance in one night.
•
Each night's interest is one savings_interest transaction and one savings.interest.credited webhook, with source nightly. Deduplicate on event_id. The same night never books twice.
•
At a rate of 3.65% a year, 1,000 saved earns about 0.10 a night.
•
Sandbox has no nightly run. Add interest yourself with POST /v1/savings/simulate/interest. The webhook then has source simulated.
savings.interest.credited
{
"tenant_id": "dfa96ede-fc13-43cf-8328-8b910d1cd1d2",
"transaction_id": "b75f078b-6c03-4a6d-b8e4-ecc1634b6727",
"event_category": "savings",
"event_type": "savings.interest.credited",
"event_group_id": "5b0e6c2a-9d3f-5a71-8e4b-2c6d8f0a1b3e",
"timestamp": "2026-10-27T09:19:44.102Z",
"event_data": {
"account_id": "d9eae506-77b4-4e8b-8ab3-caaf96054d79",
"amount": "0.25",
"blockchain_network": "avalanche",
"currency": "USDC",
"customer_id": "b140f51d-2598-410a-a583-e1cb7a871443",
"saved_balance_after": "110.250000",
"saved_balance_before": "110.000000",
"source": "simulated",
"status": "COMPLETED",
"transaction_id": "b75f078b-6c03-4a6d-b8e4-ecc1634b6727",
"wallet_address": "0x8f3b2a91c4d05e6f7a8b9c0d1e2f3a4b5c6d7e8f",
"wallet_id": "d4ed232e-ebd1-43b3-b6d7-b6739cadd13f"
},
"event_id": "c3a9e1f0-7b2d-4c5e-9f8a-1d2e3f4a5b6c",
"idempotency_key": "savings_interest_sim:d4ed232e-ebd1-43b3-b6d7-b6739cadd13f:try-1"
}

Get a statement

A statement has one row per UTC day. from and to are YYYY-MM-DD. Leave them out for the last 30 days.

get statement request
curl --request GET \
--url 'https://api.gravv.xyz/v1/savings/d9eae506-77b4-4e8b-8ab3-caaf96054d79/statement?from=2026-10-26&to=2026-10-27' \
--header 'Api-Key: <API_KEY>'
get statement response
{
"data": {
"id": "d9eae506-77b4-4e8b-8ab3-caaf96054d79",
"kind": "account",
"currency": "USDC",
"from": "2026-10-26",
"to": "2026-10-27",
"opening_balance": "0.000000",
"closing_balance": "110.250000",
"rows": [
{
"date": "2026-10-26",
"opening_balance": "0.000000",
"saved": "0.000000",
"withdrawn": "0.000000",
"interest": "0.000000",
"closing_balance": "0.000000"
},
{
"date": "2026-10-27",
"opening_balance": "0.000000",
"saved": "110.000000",
"withdrawn": "0.000000",
"interest": "0.250000",
"closing_balance": "110.250000"
}
]
},
"error": null
}

Each row adds up: closing_balance = opening_balance + saved - withdrawn + interest. Only completed moves count, so a withdrawal that is still waiting is not on the statement yet.

To give the customer a file, add format=csv. The response is a CSV download with the columns date, opening_balance, saved, withdrawn, interest, closing_balance and currency.

What can go wrong

ResponseWhyFix
404 savings account not foundThe id is not a savings account or savings wallet of yours, or it is a live id with a sandbox keyCheck the id and the key
400 the account is not a savings account or the wallet is not a savings walletThe id is an ordinary account or walletUse the savings account id
400 from must be a date as YYYY-MM-DD or to must be a date as YYYY-MM-DDAnother date formatSend 2026-10-27
400 to cannot be after todayto is in the future, in UTCSend today or earlier
400 from cannot be after toThe dates are swappedSwap them
400 a statement covers at most 92 daysThe range is too longAsk for 92 days or fewer at a time
400 too many savings movements for one statement; ask for a shorter rangeThe range holds more moves than one statement can listAsk for a shorter range
400 format must be json or csvAnother formatSend json or csv
501Savings is not open to live keys yetUse a sandbox key

Reference

Was this page helpful? Yes No
Next