Interface TrendingPoolsResponse

Response interface for trending pools Extends PoolsResponse with additional metadata about trending status

This interface uses the same structure as PoolsResponse but specifically for trending pools. The pools returned will be ordered by their trending score based on volume and transaction metrics.

const trending = await client.getTrendingPools('cfx', '24h');
const trendingPools = trending.data.map(pool => ({
name: pool.attributes.name,
volume24h: pool.attributes.volume_usd.h24,
transactions24h: pool.attributes.transactions.h24
}));
interface TrendingPoolsResponse {
    data: Pool[];
    links: {
        first: string;
        last: string;
        next: null | string;
        prev: null | string;
    };
    meta: { total_pages: number; total_records: number };
}

Properties

Properties

data: Pool[]

Array of trending pool data

links: { first: string; last: string; next: null | string; prev: null | string }

Pagination links

Type declaration

  • first: string

    URL for the first page

  • last: string

    URL for the last page

  • next: null | string

    URL for the next page, null if on last page

  • prev: null | string

    URL for the previous page, null if on first page

meta: { total_pages: number; total_records: number }

Pagination metadata

Type declaration

  • total_pages: number

    Total number of pages available

  • total_records: number

    Total number of records across all pages