Learn how to use the Metrics API with detailed examples. This guide covers common patterns, step-by-step workflows, and code samples for tracking transaction volume, activity patterns, and user growth.
Use this file to discover all available pages before exploring further.
Prerequisite: Before diving into examples, make sure you’ve read the
Metrics documentation to understand core concepts like
metric templates, saved metrics, and breakdowns.
List available templates to see what you can measure:
curl -X GET "https://sandbox.hifibridge.com/v2/reporting/templates" \ -H "Authorization: Bearer YOUR_API_KEY"
Response:
{ "status": "success", "data": [ { "template": "GROSS_VOLUME", "displayName": "Gross Volume", "description": "Total combined USD-equivalent value of completed Onramp and Offramp transactions", "breakdownOptions": ["transactionType", "userId"] }, { "template": "TRANSACTION_COUNT", "displayName": "Transaction Count", "description": "Aggregated count of transactions grouped by status and type over time", "breakdownOptions": ["transactionType", "transactionStatus", "userId"] }, { "template": "NEW_USERS", "displayName": "New Users", "description": "Count of new unique end-users onboarded within the time period", "breakdownOptions": null } ]}
Preview results by providing a template with parameters. Saving is optional—preview lets you query metrics without persisting anything.
Available filters depend on the template. Get filter options:
curl -X GET "https://sandbox.hifibridge.com/v2/reporting/params/userIds/options" \ -H "Authorization: Bearer YOUR_API_KEY"
Split metrics by dimensions for comparison:
transactionType — Separate rows for each direction (onramp, offramp, transfer)
transactionStatus — Separate rows for each status (COMPLETED, FAILED, PENDING, etc.)
userId — Separate rows for each user
Without breakdowns, you get one row per time period. With breakdowns, you get multiple rows per period—one for each unique combination of breakdown values.
{ "breakdowns": ["transactionType"]}
Check each template’s breakdownOptions field. NEW_USERS doesn’t support breakdowns.