SET API · Analytics
Money in and out per period
GET/v1/analytics/volume
Money in and out per period: one row per period, direction (in or out), currency and group, with count and amount. Amounts are decimal strings summed per currency, never across currencies.
Query parameters
sincestring- A UTC date,
YYYY-MM-DD: the first day counted. With neithersincenoruntil, the window is the last 30 days ending tomorrow at 00:00 UTC. untilstring- A UTC date,
YYYY-MM-DD, exclusive. It must be aftersinceand at most 366 days later. interval"day" | "week" | "month"day(default),week(a week starts on Monday) ormonth. Anything else answers400 interval_invalid.groupBy"currency" | "type" | "rail" | "customer"currency(default),type,railorcustomer. Anything else answers400 group_by_invalid.
Notes
- Needs the
readscope. Any account type; no deployment switch. - A window longer than 366 days answers
400 window_too_long; a malformed date, or anuntilthat is not aftersince, answers400 window_invalid. grouprepeats the currency whengroupBy=currency.- With
groupBy=rail,groupis the source chain for a Cash-Out payment, the payout rail for a payout,cardfor a card payment, andnullfor deposits, Conversion payments, wallet withdrawals and refunds. - A sandbox Cash-Out payment has no source chain recorded, so under
groupBy=railitsgroupisnull. sandbox: truemarks an answer for a test key.- The example was made with a sandbox key on a platform account after three USD deposits, one EUR deposit, three Cash-Out payments and one Conversion payment.
- This example is a recorded run of SET's own code (wallet release
e9b03447) with a sandbox key; ids and times are that run's.
Errors
400 window_invalid400 window_too_long400 interval_invalid400 group_by_invalid