Bearer token from the Snippet mobile app. Format: Bearer YOUR_API_KEY
.
List of metric objects to submit in a single request (max 100).
Show Metric object fields
Must be {protocolId}___{Label}
. Keep {Label}
short for widget display.
Numeric value of the metric.
Protocol slug previously registered.
Free-form unit label (e.g., USD
, %
, BTC
).
Optional. If omitted, the server snaps to the top of the hour; if provided,
must not be more than 5 minutes in the future.
curl -X POST "https://<your-api-host>/api/metrics" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"metrics": [
{
"id": "awesome-dex___TVL",
"value": 12345678.9,
"protocolId": "awesome-dex",
"unit": "USD",
"timestamp": "2025-08-05T17:00:00Z"
},
{
"id": "awesome-dex___USERS_MOM",
"value": 5.2,
"protocolId": "awesome-dex",
"unit": "%"
}
]
}'
{
"success": true,
"processed": 2,
"errors": [],
"warnings": []
}
Max 100 metrics per request. Timestamps must be valid ISO 8601 and not more
than 5 minutes in the future.