TokensAPI

News

A filterable feed of market news and @tokens posts, global or per token.

Uses https://api.tokens.xyz/v1 with an x-api-key header and the assets:read scope; see Authentication.

GET /v1/news/feed

Market news from CoinGecko merged with posts from @tokens on X.

  • Global mode: pass no token params. The feed is global news, recent @tokens posts, or both, depending on source.
  • Token mode: pass coin_id, mint or matching terms. The feed is news about that coin plus @tokens posts that match the terms.

Query params

ParamTypeDefaultNotes
limitinteger 1 to 5010Larger values are clamped.
sourceall, news, tweetsall
tweet_reserveinteger 0 to limit3Slots reserved for matching @tokens posts when source=all. Ignored for single-source feeds.
coin_idCoinGecko coin idFor example bitcoin.
mintSolana mintResolved to a CoinGecko coin id server-side, so it works for mints that are not registered assets. Ignored for coin resolution when coin_id is set.
symbol, namestringTerms used to match @tokens posts.
asset_idstringAn additional matching term.
termscomma-separated stringsAdditional matching terms.
termstring, repeatableSame as terms, one per parameter.

Response

interface NewsFeedResponse {
  items: Array<{
    title: string;
    url: string;
    image: string;
    author: string;
    posted_at: string;                 // ISO 8601
    type: 'news';
    source_name: string;
    related_coin_ids: string[];
    feed_source: 'coingecko' | 'x';
  }>;
  meta: {
    mode: 'global' | 'token';
    source: 'all' | 'news' | 'tweets';
    coin_id: string | null;
    coin_id_source: 'param' | 'mint' | null;
    mint: string | null;
    terms: string[];
    limit: number;
    tweet_reserve: number;
    counts: { items: number; coingecko_candidates: number; x_candidates: number };
  };
}

Notes

  • mint must be a base58 Solana mint; any other shape returns 400. A well-formed mint that CoinGecko does not list falls back to the global feed with meta.coin_id: null rather than failing. The mint-to-coin mapping syncs weekly, so a brand-new listing can take up to a week to resolve.
  • meta.coin_id_source says where the coin id came from: param, mint, or null when there is none.
  • Unknown or stale coin_id values produce no CoinGecko items; with source=all matching X items may still be returned.
  • Provider content is best-effort. Upstream failures return an empty or partial feed with 200.
  • Not cached.

Examples

curl -sS "$API_BASE_URL/v1/news/feed?source=all&limit=25&tweet_reserve=3" \
  -H "x-api-key: $API_KEY"
curl -sS "$API_BASE_URL/v1/news/feed?coin_id=bitcoin&symbol=BTC&name=Bitcoin&source=news&limit=50" \
  -H "x-api-key: $API_KEY"
curl -sS "$API_BASE_URL/v1/news/feed?mint=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&limit=50" \
  -H "x-api-key: $API_KEY"