Darknode Stats
The RenVM subgraphs provides a way to query Ren's on-chain activity in a more efficient manner than making direct contract calls. It provides a GraphQL interface that can be used to lookup information about darknodes, assets and mints/burns.
Networks​
A RenVM subgraph is available on the following networks:
- mainnet
- testnet
Ethereum
API: https://api.thegraph.com/subgraphs/name/renproject/renvm
Binance Smart Chain
API: https://bsc-graph.renproject.io/subgraphs/name/renproject/renvm
Polygon
API: https://api.thegraph.com/subgraphs/name/renproject/renvm-polygon
Fantom
API: https://api.thegraph.com/subgraphs/name/renproject/renvm-fantom
API: https://api.thegraph.com/subgraphs/name/renproject/renvm
Binance Smart Chain
API: https://bsc-graph.renproject.io/subgraphs/name/renproject/renvm
Polygon
API: https://api.thegraph.com/subgraphs/name/renproject/renvm-polygon
Fantom
API: https://api.thegraph.com/subgraphs/name/renproject/renvm-fantom
Ethereum (Kovan)
API: https://api.thegraph.com/subgraphs/name/renproject/renvm-testnet
API: https://api.thegraph.com/subgraphs/name/renproject/renvm-testnet
Querying​
In order to query the RenVM subgraphs, you will need a GraphQL library. Some options are:
- The playground below
- An SDK such as Apollo - see others at https://graphql.org/code/.
- A desktop client such as Insomnia or Postman
The subgraphs expose a single POST endpoint that allows you to specify what data to query. A query looks like this:
{
# Get the darknode with the highest BTC balance.
darknodes(first: 1, orderBy: balanceBTC, orderDirection: desc) {
id
operator
registeredAt
balances(where: { symbol: "renBTC" }) {
symbol
amountInUsd
}
}
}
Posting this to the Ethereum Mainnet API url returns:
{
"data": {
"darknodes": [
{
"balances": [
{
"amountInUsd": "7264.59",
"symbol": "renBTC"
}
],
"id": "0x9fec6514e6a83fa21f5da810ff45dc04dda40670",
"operator": "0xd8a0bc22290c42f35dfa010f4233b81a3ae3dd2c",
"registeredAt": "1590525958"
}
]
}
}
Try it now​
Submit queries to the Mainnet Ethereum subgraph. The query will be reset when you leave the page.
Click the Docs button in the top-right to explore the schema.