curl --request POST \
--url https://production.hifibridge.com/v2/reporting/metrics/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "GROSS_VOLUME",
"params": {
"createdAfter": "2025-11-01",
"createdBefore": "2025-11-07",
"calculationInterval": "day",
"transactionTypes": [
"onramp",
"offramp"
]
}
}
'{
"status": "success",
"data": [
{
"periodStart": "2025-11-06",
"grossVolume": 0
},
{
"periodStart": "2025-11-05",
"grossVolume": 0
},
{
"periodStart": "2025-11-04",
"grossVolume": 0
},
{
"periodStart": "2025-11-03",
"grossVolume": 0
},
{
"periodStart": "2025-11-02",
"grossVolume": 0
},
{
"periodStart": "2025-11-01",
"grossVolume": 0
}
],
"metadata": {
"template": "GROSS_VOLUME",
"recordCount": 6,
"projectedRowCount": null,
"filledCount": 6,
"calculationInterval": "day",
"dateRange": {
"start": "2025-11-01",
"end": "2025-11-07"
},
"filters": {
"createdAfter": {
"applied": "subset",
"specified": true,
"values": "2025-11-01"
},
"createdBefore": {
"applied": "subset",
"specified": true,
"values": "2025-11-07"
},
"calculationInterval": {
"applied": "subset",
"specified": true,
"values": "day"
},
"transactionTypes": {
"applied": "subset",
"specified": true,
"count": 2,
"values": [
"onramp",
"offramp"
]
},
"userIds": {
"applied": "all",
"specified": false,
"count": 1000,
"note": "1000 total (list omitted for brevity)"
}
},
"breakdowns": null
}
}Executes a metric calculation on the fly without saving it to the database. Useful for testing parameters or ad-hoc analysis.
curl --request POST \
--url https://production.hifibridge.com/v2/reporting/metrics/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "GROSS_VOLUME",
"params": {
"createdAfter": "2025-11-01",
"createdBefore": "2025-11-07",
"calculationInterval": "day",
"transactionTypes": [
"onramp",
"offramp"
]
}
}
'{
"status": "success",
"data": [
{
"periodStart": "2025-11-06",
"grossVolume": 0
},
{
"periodStart": "2025-11-05",
"grossVolume": 0
},
{
"periodStart": "2025-11-04",
"grossVolume": 0
},
{
"periodStart": "2025-11-03",
"grossVolume": 0
},
{
"periodStart": "2025-11-02",
"grossVolume": 0
},
{
"periodStart": "2025-11-01",
"grossVolume": 0
}
],
"metadata": {
"template": "GROSS_VOLUME",
"recordCount": 6,
"projectedRowCount": null,
"filledCount": 6,
"calculationInterval": "day",
"dateRange": {
"start": "2025-11-01",
"end": "2025-11-07"
},
"filters": {
"createdAfter": {
"applied": "subset",
"specified": true,
"values": "2025-11-01"
},
"createdBefore": {
"applied": "subset",
"specified": true,
"values": "2025-11-07"
},
"calculationInterval": {
"applied": "subset",
"specified": true,
"values": "day"
},
"transactionTypes": {
"applied": "subset",
"specified": true,
"count": 2,
"values": [
"onramp",
"offramp"
]
},
"userIds": {
"applied": "all",
"specified": false,
"count": 1000,
"note": "1000 total (list omitted for brevity)"
}
},
"breakdowns": null
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request to preview a metric calculation without saving
Metric template name
GROSS_VOLUME, TRANSACTION_COUNT, NEW_USERS Metric parameters. Structure varies by template, but common fields include:
Additional properties may be present based on the metric template. Each template may define template-specific parameters.
Show child attributes
Metric calculation results
Response from metric calculation endpoints. The structure of data array items
varies based on the breakdowns parameter in the request.
Base structure (no breakdowns):
periodStart, plus metric-specific fields (e.g., grossVolume, transactionCount)With breakdowns:
transactionType, transactionStatus, userId)Example without breakdowns:
{
"status": "success",
"data": [
{ "periodStart": "2025-01-01T00:00:00Z", "grossVolume": 1000.50 },
{ "periodStart": "2025-01-02T00:00:00Z", "grossVolume": 2000.75 }
],
"metadata": { ... }
}Example with breakdowns: ["transactionType"]:
{
"status": "success",
"data": [
{ "periodStart": "2025-01-01T00:00:00Z", "transactionType": "onramp", "grossVolume": 500.25 },
{ "periodStart": "2025-01-01T00:00:00Z", "transactionType": "offramp", "grossVolume": 500.25 }
],
"metadata": { ... }
}Response status
success Array of metric calculation results. Each object structure depends on:
Show child attributes
Metadata about the metric calculation
Show child attributes