---
name: realtimeapi
description: Real-time crypto, stock and market data from RealtimeAPI.ai. Use when the user asks for live or recent market data (crypto prices, funding rates, open interest, liquidations, market regimes, on-chain flows, stock quotes, fundamentals, filings, indices, FX, commodities, market news). Find endpoints with discover, check prices with get_quote, call them with a free key or per-call USDC (x402).
---

# RealtimeAPI.ai

231 real-time data endpoints from 2 feeds behind one API (https://api.realtimeapi.ai). Every response is real data from the provider, served from the edge cache when it is fresh enough.

## Tools (MCP server)

Server: https://mcp.realtimeapi.ai/mcp (streamable HTTP). Send the key as the X-API-Key header on the connection, or pass api_key to call_feed.

- `discover(q)`: describe the data you need in plain language; returns at most 5 matching endpoints with price and example URL. Start here instead of guessing paths.
- `list_feeds()`: every feed with its endpoint count and price range.
- `get_quote(url)`: the price of a call before paying for it.
- `call_feed(...)`: call an endpoint with the key or an x402 payment; returns the data plus freshness.
- `create_free_key(email)`: a free key, 1,000 calls a month across every feed. Ask the user for their real email; signing in with it later re-issues the secret once.

## Without MCP (plain HTTP)

- Search: `GET https://api.realtimeapi.ai/discover?q=...`
- Call: `GET https://api.realtimeapi.ai/v1/{feed}/{path}` with `X-API-Key: $RTAPI_KEY`. Without a key the gateway answers 402 with an x402 price quote; any x402 client pays it in USDC on Base and retries.
- Free key: `POST https://api.realtimeapi.ai/keys/free` with `{"email": "..."}`.
- Per-feed OpenAPI with prices: `https://api.realtimeapi.ai/feeds/{feed}/openapi.json`. Full catalog: https://realtimeapi.ai/llms-full.txt

## Feeds

- `cryptodata`: CryptoDataAPI by CryptoDataAPI. Real-time crypto market intelligence: prices, derivatives, on-chain, regimes. 185 endpoints, $0.008 to $0.03 per call. https://api.realtimeapi.ai/v1/cryptodata
- `stockmarket`: StockMarketAPI by StockMarketAPI. Stocks for agents: fundamentals, prices, filings, indices, news and FX. 46 endpoints, $0.01 to $0.10 per call. https://api.realtimeapi.ai/v1/stockmarket

## Good habits

- Read the key from the RTAPI_KEY environment variable. Never ask the user to paste a key into the chat, and never print a full key.
- Only 2xx responses are charged; a 402 is a price quote, not an error.
- `X-RTAPI-Data-Age` is the age of the gateway's cached copy in seconds (0 when live); the data's own timestamp is in the body. `X-RTAPI-Cache: HIT` means it came from the edge cache; `X-RTAPI-Remaining` is the key's calls left (approximate when `X-RTAPI-Quota-Source: memo`).
- Prefer one broad call (summaries, snapshots, bulk endpoints) over many narrow ones.
- Out of free calls? The user can buy a time pass for one feed (1 hour, 7 days or 30 days), a plan for every feed, or prepay USDC credits: https://realtimeapi.ai/pricing
