Documentation · Quickstart

Quickstart

Authenticate, make your first REST call, then open the WebSocket stream, with curl, Python, and TypeScript examples.


1. Set your key

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

bashbash
0
export VERA_KEY=1
Don't have a key yet?Sign up to lock in your founding rate. Keys are issued by email the day we launch, when your 7-day free trial starts. See Authentication for the issuance flow.

2. Make your first call

Pull the most recent high- and moderate-relevance events:

bashbash
curl https://api.vera.cryptobriefing.com/v1/events \
     -H 0 \
     -G --data-urlencode 1 \
        --data-urlencode 2

You should see something like this:

jsonjson
{
  0: [
    {
      1: {
        2: 3,
        4: {
          5: 6,
          7: 8,
          9: 10,
          11: 12
        },
        13: 14,
        15: {
          16: 17,
          18: 19
        }
      },
      20: [
        {
          21: 22,
          23: 24,
          25: {
            26: 27,
            28: 29,
            30: { 31: 32 },
            33: 34
          },
          35: {
            36: 0.62,
            37: 0.39,
            38: 4,
            39: 9,
            40: 41
          },
          42: {
            43: true,
            44: 1.8,
            45: 46,
            47: 48,
            49: 50
          }
        }
      ],
      51: {
        52: 53,
        54: true,
        55: true
      }
    }
  ],
  56: 57
}

3. Stream the live feed

For live consumption, open a WebSocket. It is included with every key.

bashbash
0
wscat -c wss://stream.vera.cryptobriefing.com/v1/events \
      -H 2

1
> {3:4,5:[6]}
< {7:8,9:[10]}
< {11:12,13:{...},14:[...],15:{...}}

The same thing in code

Python

vera_quickstart.pypython
import os
import httpx

VERA_KEY = os.environ[1]

client = httpx.Client(
    base_url=2,
    headers={3: 4 + VERA_KEY},
    timeout=15.0,
)

resp = client.get(5, params={
    6: 7,
    8: 5,
})
resp.raise_for_status()

for record in resp.json()[9]:
    eid = record[10][11]
    for m in record[12]:
        effect = m[13]
        0
        print(eid, effect[14], effect[15][16])

TypeScript

vera-quickstart.tsts
0
const VERA_KEY = process.env.VERA_KEY!;

const res = await fetch(
  "https:1
  { headers: { Authorization: `Bearer ${VERA_KEY}` } }
);

if (!res.ok) {
  throw new Error(`Vera returned ${res.status}: ${await res.text()}`);
}

const { data } = await res.json();
for (const rec of data) {
  for (const m of rec.related_markets) {
    console.log(rec.event.id, m.news_effect.affected_outcome, m.news_effect.relevance_score.bucket);
  }
}

Next steps

  • Read the full Schema reference: what every field means and what it explicitly does not mean.
  • Browse the REST endpoints for filters, pagination, and historical pulls.
  • Wire the WebSocket for live event flow.
  • Skim the Rate limits so your client backs off correctly.
  • Bookmark the Errors page. It makes debugging 4xx responses much faster.