CoinMarketCap Crypto News

CMC Crypto News Tool (cmc_crypto_news_tool)

Fetches the latest general cryptocurrency news articles by scraping CoinMarketCap's news headlines. Keeps you updated with recent happenings in the crypto space.


class CMCCryptoNewsInput(BaseModel):
    limit: int = 8 # Number of articles (default 8, max 8)

Key Functionality:

  • Scrapes the latest crypto news headlines and summaries from coinmarketcap.com/headlines/news/.

  • For each article, it attempts to extract the heading, a brief body/summary, associated crypto tickers, and how long ago it was posted.

  • The number of articles returned is controlled by limit, effectively capped at 8.


Sample Usage Queries (How an AI might use it):

  • "What's the latest crypto news from CoinMarketCap?"

  • "Fetch the top 5 recent crypto news articles."

  • "Get today's crypto headlines via CMC."

  • "Show me the newest updates in the cryptocurrency world."

  • "Can you retrieve some crypto news for me?"

  • "What are the current news stories on CoinMarketCap?"

  • "Give me a summary of recent crypto events."

  • "Fetch 3 crypto news items."


Quick Code Glance:

class CMCCryptoNewsTool(BaseTool):
    name: ClassVar[str] = "cmc_crypto_news_tool"
    description: ClassVar[str] = "Get the latest crypto news from CoinMarketCap."
    args_schema: ClassVar[Type[BaseModel]] = CMCCryptoNewsInput

Important:

  • This tool operates asynchronously (_arun) only.

  • Relies on web scraping CoinMarketCap, which means its functionality can be affected by changes to the website's structure.

  • The limit for news articles defaults to 8 and is also capped at a maximum of 8.

Last updated