Documentation · Quickstart

Quickstart

Authenticate, make your first REST call, and start consuming news events, with curl, Python, and TypeScript examples.


1. Set your key

Every request needs your API key. The recommended method is to send it as a bearer token on the Authorization header. Stash it in an env var so you do not paste it into your shell history.

bashbash
# Generate your vera_ key in the dashboard, then paste it here
export VERA_KEY="vera_aBcDeFgH..."
Don't have a key yet?Sign up for a free API key — no card — then sign in to the dashboard and click + New key. The full key is shown once; copy and store it securely. See Authentication for details.

2. Make your first call

Pull recent news events from the feed:

bashbash
curl https://ai-hub.cryptobriefing.com/pm/v2/news \
     -H "Authorization: Bearer $VERA_KEY" \
     -G --data-urlencode "limit=5"

The same thing in code

Python

vera_quickstart.pypython
import os
import httpx

VERA_KEY = os.environ["VERA_KEY"]

client = httpx.Client(
    base_url="https://ai-hub.cryptobriefing.com",
    headers={"Authorization": f"Bearer {VERA_KEY}"},
    timeout=15.0,
)

resp = client.get("/pm/v2/news", params={"limit": 5})
resp.raise_for_status()

for item in resp.json()["items"]:
    evt = item["news_event"]
    print(evt["headline"], evt["aggregate_event_relevance"]["bucket"])
    for rm in item["related_markets"]:
        for sm in rm["sub_markets"]:
            eff = sm["news_effect"]
            print(f"  {sm['sub_market_title']}: {eff['affected_outcome']} {eff['effect']}")

TypeScript

vera-quickstart.tsts
const VERA_KEY = process.env.VERA_KEY!;
const BASE = "https://ai-hub.cryptobriefing.com";

const resp = await fetch(`${BASE}/pm/v2/news?limit=5`, {
  headers: { Authorization: `Bearer ${VERA_KEY}` },
});
if (!resp.ok) throw new Error(`Vera returned ${resp.status}`);

const { items } = await resp.json();
for (const item of items) {
  console.log(item.news_event.headline);
  for (const rm of item.related_markets) {
    for (const sm of rm.sub_markets) {
      console.log(sm.sub_market_title, sm.news_effect.affected_outcome);
    }
  }
}

Next steps

  • Read the full Schema reference: what every field means and what it explicitly does not mean.
  • Browse the REST endpoints for detailed parameter and response documentation.
  • Wire the WebSocket for live news event push.
  • Skim the Rate limits so your client backs off correctly.
  • Bookmark the Errors page. It makes debugging 4xx responses much faster.