Skip to content

Stats endpoints

Aggregate swap volume reporting. The public /v1/stats/volume endpoint serves rolling totals (USD volume, swap count) from the internal landed-swap store.

These endpoints power the Venum DefiLlama dimension-adapter listing and any third-party analytics that wants to show our aggregator volume.


GET /v1/stats/volume

Return total USD swap volume and swap count for a time window.

Request

http
GET /v1/stats/volume?from=<unix>&to=<unix>

Query parameters

FieldTypeRequiredDefaultDescription
fromnumberNo0Window start, UNIX seconds (inclusive)
tonumberNonowWindow end, UNIX seconds (exclusive)

Example

bash
# Last 24h
NOW=$(date -u +%s)
DAY_AGO=$((NOW - 86400))
curl "https://api.venum.dev/v1/stats/volume?from=$DAY_AGO&to=$NOW"

Response

json
{
  "from": 1733500800,
  "to": 1733587200,
  "volumeUsd": 124530.42,
  "swapCount": 87
}

volumeUsd is the sum of the larger of input/output USD value for each swap in the window — defensive against any one side being temporarily unpriced. swapCount counts the number of recorded landed swaps in the window.

Errors

StatusDescription
400Invalid from / to (non-numeric or from > to)
429Rate limit exceeded
500Failed to query the swap_landed table

Auth

Optional auth. The endpoint is intended to be queryable by external indexers (e.g. DefiLlama) without an API key.

Rate Limit

Tier limits (per minute):

TierLimit
anonymous30
free60
starter300
pro1000
internal

Cached for 60 s server-side.