Skip to main content

RenVM Stats

How To Reference

The RenVM Tracker is a server that syncs RenVM blocks and tracks volume, locked amounts and historic asset prices. It provides a GraphQL endpoint to query RenVM stats for a provided timestamp.

Usage

The interface is a GraphQL endpoint running at https://stats.renproject.io (mainnet) and https://stats-testnet.renproject.io (testnet).

There is one type of queryable entities, Snapshots, which contain RenVM's statistics for a specific timestamp. Snapshots are created when new RenVM transactions are confirmed, batching together transactions in the same 5 minute timeslot.

Snapshots can be queried by providing a Unix timestamp in seconds. The request will return the most recent Snapshot before or at that timestamp. If the timestamp is from before the first Snapshot, an error will be thrown.

The volume in a Snapshot is the total since the network came online, so to get the volume of a specific period (e.g. 1 month), you should get the snapshots from the start and the end of the period and subtract the volume and locked amounts.

You can request multiple snapshots in a single request by using labels (see the label snapshot1 below).

The fees field is only available for snapshots from August 2021 onwards.

{
snapshot1: Snapshot(timestamp: "1627300267") {
timestamp
locked {
asset
chain
amount
amountInUsd
}
volume {
asset
chain
amount
amountInUsd
}
# Only available for Snapshots from August 2021 onwards.
fees {
asset
amount
amountInUsd
}
prices {
asset
decimals
priceInUsd
}
}
}

In order to query the RenVM tracker, you will need a GraphQL library. Some options are:

  1. The playground below
  2. An SDK such as Apollo - see others at https://graphql.org/code/.
  3. A desktop client such as Insomnia or Postman

Try it now