Token Statistics Queries
This section documents the GraphQL queries available in the Token Statistics API.
tokenStat​
Returns statistical data for a specific token.
Query​
query TokenStat($token: TokenName) {
tokenStat(token: $token) {
id
createdAt
updatedAt
token
monthlyBuyBackHistory {
month
year
revenue
multiplier
}
buyBackTiers {
month
tier
info
description
active
}
userGrowth {
month
year
users
}
socials {
name
type
username
prevNumberOfSubscribers
currentNumberOfSubscribers
}
multipliers {
month
multiplier
description
active
}
tokenSupply {
title
description
burnt
liquidity
circulatingSupply
}
}
}
Arguments​
Name | Type | Description | Required | Default |
---|---|---|---|---|
token | TokenName | Specifies which token's statistics to retrieve | No | BLOCK |
Response​
Returns a TokenStatModel
containing comprehensive token statistics:
{
"data": {
"tokenStat": {
"id": "64edf83cb6e046466c287bb1",
"createdAt": "2023-08-29T12:45:00.681Z",
"updatedAt": "2023-08-31T09:13:28.776Z",
"token": "BLOCK",
"monthlyBuyBackHistory": [
{
"month": "AUG",
"year": 2023,
"revenue": 15000,
"multiplier": 1.5
}
],
"buyBackTiers": [
{
"month": "AUG",
"tier": 1,
"info": "Reached Tier 1",
"description": "Standard buy-back level achieved",
"active": true
}
],
"userGrowth": [
{
"month": "AUG",
"year": 2023,
"users": 5000
}
],
"socials": [
{
"name": "Block Bet Official",
"type": "TELEGRAM",
"username": "blockbetofficial",
"prevNumberOfSubscribers": 8000,
"currentNumberOfSubscribers": 10000
}
],
"multipliers": [
{
"month": "AUG",
"multiplier": 1.5,
"description": "Standard multiplier rate",
"active": true
}
],
"tokenSupply": {
"title": "BLOCK Token Supply",
"description": "Current statistics for BLOCK token supply",
"burnt": 250000,
"liquidity": 500000,
"circulatingSupply": 10000000
}
}
}
}
Error Handling​
If the token statistics cannot be found or if an invalid token name is provided, the query will return null
for the tokenStat
field.
Usage Example​
import { gql } from '@apollo/client';
const GET_TOKEN_STATS = gql`
query GetTokenStats($token: TokenName) {
tokenStat(token: $token) {
token
tokenSupply {
burnt
liquidity
circulatingSupply
}
buyBackTiers {
month
tier
active
}
}
}
`;
// Example usage
const { data, loading, error } = useQuery(GET_TOKEN_STATS, {
variables: { token: 'BLOCK' },
});