Token Rankings
Get a ranked list of tokens based on swap activity and velocity of adoption across a user's network - updating in real-time as onchain activity happens. Optionally provide a farcaster FID for rankings tailored to a farcaster user's social graph.
tokenRanking
Returns a paginated list of tokens. Supports pagination and optional tailoring by providing a farcaster ID.
- Token trading metrics (buy count, buyer count)
- Real-time price data integration
- Farcaster user personalization capabilities
- Paginated results with cursor-based navigation
- Cross-chain token rankings
Example Use Case: Top Trending Tokens
Get the most active tokens based on onchain activity, emphasized for a farcaster user.
Try it nowExample Variables
{
  "first": 10,
  "after": null,
  "fid": 954583
}
Example Query
query TokenRanking($first: Int, $after: String, $fid: Int) {
  tokenRanking(first: $first, after: $after, fid: $fid) {
    pageInfo {
      hasPreviousPage
      hasNextPage
      startCursor
      endCursor
    }
    edges {
      cursor
      node {
        id
        chainId
        tokenAddress
        token {
          address
          name
          symbol
          priceData {
            price
          }
        }
        buyCount
        buyerCount
        buyerCount24h
      }
    }
  }
}
Example Response
{
  "data": {
    "tokenRanking": {
      "pageInfo": {
        "hasPreviousPage": false,
        "hasNextPage": true,
        "startCursor": null,
        "endCursor": "Tmpoak9EWmlNR1JqT0RJeFpHVTNOekUzTTJWbU56azVmREV3"
      },
      "edges": [
        {
          "cursor": "NjhjODZiMGRjODIxZGU3NzE3M2VmNzk5fDEw",
          "node": {
            "id": "RmFyY2FzdGVyVG9rZW5GZWVkSXRlbS0xOjB4YzUwNjczZWRiM2E3Yjk0ZThjYWQ4YTdkNGUwY2Q2ODg2NGUzM2VkZg==",
            "chainId": 1,
            "tokenAddress": "0xc50673edb3a7b94e8cad8a7d4e0cd68864e33edf",
            "token": {
              "address": "0xc50673edb3a7b94e8cad8a7d4e0cd68864e33edf",
              "name": "PunkStrategy",
              "symbol": "PNKSTR",
              "priceData": {
                "price": 0.01144183403494625
              }
            },
            "buyCount": 428,
            "buyerCount": 270,
            "buyerCount24h": 270
          }
        },
        {
          "cursor": "NjhjODZiMGRjODIxZGU3NzE3M2VmNzk5fDEw",
          "node": {
            "id": "RmFyY2FzdGVyVG9rZW5GZWVkSXRlbS04NDUzOjB4MDlmYzZlNWFkMWExZTA3NGQwMTdlYzlhNmQ2NzdmMzFmOTdlZmIwNw==",
            "chainId": 8453,
            "tokenAddress": "0x09fc6e5ad1a1e074d017ec9a6d677f31f97efb07",
            "token": {
              "address": "0x09fc6e5ad1a1e074d017ec9a6d677f31f97efb07",
              "name": "ROCKY",
              "symbol": "ROCKY",
              "priceData": {
                "price": 0.000002953452986113082
              }
            },
            "buyCount": 139,
            "buyerCount": 75,
            "buyerCount24h": 75
          }
        },
        {
          "cursor": "NjhjODZiMGRjODIxZGU3NzE3M2VmNzk5fDEw",
          "node": {
            "id": "RmFyY2FzdGVyVG9rZW5GZWVkSXRlbS04NDUzOjB4Yzc1NjJkMDUzNmQzYmY1YTkyODY1YWMyMjA2MmEyODkzZTQ1Y2IwNw==",
            "chainId": 8453,
            "tokenAddress": "0xc7562d0536d3bf5a92865ac22062a2893e45cb07",
            "token": {
              "address": "0xc7562d0536d3bf5a92865ac22062a2893e45cb07",
              "name": "Siyana",
              "symbol": "SYYN",
              "priceData": {
                "price": 0.0000016300402490506471
              }
            },
            "buyCount": 53,
            "buyerCount": 39,
            "buyerCount24h": 39
          }
        },
        {
          "cursor": "NjhjODZiMGRjODIxZGU3NzE3M2VmNzk5fDEw",
          "node": {
            "id": "RmFyY2FzdGVyVG9rZW5GZWVkSXRlbS04NDUzOjB4YmVkZTE3YzhiMDUzNTc5MWQxMzFmMGQ2YjYwOTRiOTljZjI3ZWIwNw==",
            "chainId": 8453,
            "tokenAddress": "0xbede17c8b0535791d131f0d6b6094b99cf27eb07",
            "token": {
              "address": "0xbede17c8b0535791d131f0d6b6094b99cf27eb07",
              "name": "likes",
              "symbol": "likes",
              "priceData": {
                "price": 0.000021954556294676207
              }
            },
            "buyCount": 447,
            "buyerCount": 303,
            "buyerCount24h": 303
          }
        }
      ]
    }
  }
}
Arguments
| Argument | Description | Type | Required | 
|---|---|---|---|
| first | Number of ranked tokens to fetch (default: 6, max: 20) | Int | No | 
| after | Cursor for pagination | String | No | 
| fid | Customize results by Farcaster ID | Int | No | 
Fields
| Field | Description | Type | 
|---|---|---|
| pageInfo | Pagination information | PageInfo! | 
| edges | Array of ranked token results | [FarcasterTokenFeedItemEdge!]! | 
FarcasterTokenFeedItemEdge Fields
| Field | Description | Type | 
|---|---|---|
| cursor | Pagination cursor for this item | String! | 
| node | The ranked token data | FarcasterTokenFeedItem! | 
FarcasterTokenFeedItem Fields
| Field | Description | Type | 
|---|---|---|
| id | Unique identifier | ID! | 
| chainId | Chain ID where the token exists | Int! | 
| tokenAddress | Token contract address | Address! | 
| token | Detailed token information | FungibleToken | 
| buyCount | Total number of buy transactions | Int | 
| buyerCount | Total number of unique buyers | Int | 
| buyerCount24h | Number of unique buyers in last 24h | Int | 
PageInfo Fields
| Field | Description | Type | 
|---|---|---|
| hasPreviousPage | Whether there are previous results | Boolean! | 
| hasNextPage | Whether there are more results | Boolean! | 
| startCursor | Cursor of the first item in results | String | 
| endCursor | Cursor of the last item in results | String |