>_TerminalFeed Devs
Frontend / Embedding
VANILLA JSFREE
Live BTC ticker in vanilla JS, no dependencies
Polls /api/btc-price every 30 seconds. Renders price plus 24h change. Drop into any HTML page that has an element with id="btc".
async function tick() {
  const r = await fetch('https://terminalfeed.io/api/btc-price');
  const d = await r.json();
  document.querySelector('#btc').textContent =
    '$' + d.data.price.toLocaleString() +
    ' (' + d.data.change24h.toFixed(2) + '%)';
}
tick();
setInterval(tick, 30000);
HTMLFREE
Embed the live BTC ticker as an iframe
One iframe, no JS, dark by default. Renders the official TerminalFeed BTC ticker on any HTML page.
<iframe src="https://terminalfeed.io/bitcoin-ticker"
        width="320" height="80"
        frameborder="0"></iframe>
REACTFREE
React hook for the world briefing
Fetches /api/briefing once and exposes the snapshot. Cleans up on unmount, handles error gracefully, no toast spam on transient failures.
function useBriefing() {
  const [data, setData] = useState(null);
  useEffect(() => {
    let alive = true;
    fetch('https://terminalfeed.io/api/briefing')
      .then(r => r.json())
      .then(j => { if (alive) setData(j.data); })
      .catch(() => {});
    return () => { alive = false; };
  }, []);
  return data;
}
Backend / Server-Side
PYTHONFREE
One-call world briefing in Python
Pulls the composed /api/briefing snapshot for an LLM context window. Output fits comfortably in a 4k-token system prompt.
import requests, json
r = requests.get('https://terminalfeed.io/api/briefing')
briefing = r.json()
# briefing['data'] has crypto, fear_greed, earthquakes, hn, astros
print(json.dumps(briefing, indent=2))
PYTHONFREE
Stream multiple endpoints concurrently with asyncio
Pulls BTC, F&G, earthquakes, and HN in parallel. Useful for dashboards or agent context preparation that needs sub-second composition time.
import asyncio, httpx

URLS = [
  'https://terminalfeed.io/api/btc-price',
  'https://terminalfeed.io/api/fear-greed',
  'https://terminalfeed.io/api/earthquake',
  'https://terminalfeed.io/api/hackernews',
]

async def fetch(client, url):
  r = await client.get(url, timeout=8)
  return r.json()

async def main():
  async with httpx.AsyncClient() as c:
    return await asyncio.gather(*(fetch(c, u) for u in URLS))

results = asyncio.run(main())
NODEFREE
Cron job that fetches and stores the briefing
Runs every 5 minutes via node-cron, persists snapshots for trend analysis. Replace the storage line with whatever your DB or KV is.
import cron from 'node-cron';

cron.schedule('*/5 * * * *', async () => {
  const r = await fetch('https://terminalfeed.io/api/briefing');
  const j = await r.json();
  await store('briefing:' + Date.now(), j);
});
MCP & Agent Integration
MCPFREE
Claude Desktop MCP config (free tier)
All 27 tools exposed to Claude. Free tier needs no auth.
{
  "mcpServers": {
    "terminalfeed": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://terminalfeed.io/api/mcp"]
    }
  }
}
MCPPREMIUM
Claude Desktop MCP config (premium tier)
Adds the Authorization header so Claude can call the 12 paid tools. Replace the token with your own from /api/payment/buy-credits.
{
  "mcpServers": {
    "terminalfeed": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote", "https://terminalfeed.io/api/mcp",
        "--header", "Authorization: Bearer tf_live_<your_token>"
      ]
    }
  }
}
CURLPREMIUM
Premium agent call with bearer token
After buying credits at /api/payment/buy-credits, hit a paid endpoint. /api/pro/agent-context returns a paste-ready system prompt of current world state.
curl https://terminalfeed.io/api/pro/agent-context \
  -H "Authorization: Bearer tf_live_<your_token>" | jq
PYTHONPREMIUM
Polling for world deltas (only events newer than your last check)
/api/pro/world-deltas takes a ?since= ISO timestamp and returns only events that happened after it. Cheap way for an agent to stay current without re-fetching the full briefing each loop.
import requests, time
from datetime import datetime, timezone

last = datetime.now(timezone.utc).isoformat()
while True:
  r = requests.get(
    'https://terminalfeed.io/api/pro/world-deltas',
    params={'since': last},
    headers={'Authorization': 'Bearer tf_live_<your_token>'},
  )
  events = r.json().get('events', [])
  for e in events:
    handle(e)
  last = datetime.now(timezone.utc).isoformat()
  time.sleep(60)
Payments & Auth
CURLFREE
Check the payment surface
Unauthenticated. Returns the receiving wallet address, chain ID (Base mainnet), accepted asset (USDC), and current credit price.
curl https://terminalfeed.io/api/payment/info | jq
CURLPREMIUM
Mint credits after sending USDC on Base
Send USDC to the address from /api/payment/info, then post the tx hash. Response includes a bearer token that authenticates every paid call from then on.
curl -X POST https://terminalfeed.io/api/payment/buy-credits \
  -H "Content-Type: application/json" \
  -d '{
    "tx_hash": "0xabc123...",
    "amount_usdc": "10.00"
  }'
CURLPREMIUM
Check your remaining balance
For agents that monitor their own spend and trigger top-ups before running out.
curl https://terminalfeed.io/api/payment/balance \
  -H "Authorization: Bearer tf_live_<your_token>" | jq