Skip to main content
POST
/
v1
/
protocols
/
stats
Get protocol statistics for a given time range
curl --request POST \
  --url https://api.range.org/v1/protocols/stats \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "beginTimestamp": "2024-04-09T00:00:00Z",
  "endTimestamp": "2024-04-10T00:00:00Z",
  "protocol": "interchain_payments"
}'
{
  "totalTransactions": 1234,
  "totalUsd": 1000.5,
  "denomSums": [
    {
      "denom": "uatom",
      "total": 1000.5,
      "totalUsd": 1000.5
    }
  ],
  "timeRange": {
    "start": "2024-04-09T00:00:00Z",
    "end": "2024-04-10T00:00:00Z"
  },
  "protocol": "interchain_payments"
}

Authorizations

X-API-KEY
string
header
required

Authorization method required to allow user to access the api endpoints.

Body

application/json
beginTimestamp
string
required

Start timestamp for the query range

Example:

"2024-04-09T00:00:00Z"

endTimestamp
string
required

End timestamp for the query range

Example:

"2024-04-10T00:00:00Z"

protocol
string
required

Protocol name to filter by

Example:

"interchain_payments"

Response

Returns protocol statistics including transaction counts and denomination sums

totalTransactions
number
required

Total number of transactions

Example:

1234

totalUsd
number
required

Total amount for all denominations in USD

Example:

1000.5

denomSums
object[]
required

Sum of amounts for each denomination

timeRange
object
required

Time range of the query

protocol
string
required

Protocol name

Example:

"interchain_payments"