Odds337Execution API
    Odds337Docs
    Odds337BackGet API key
    Odds337Execution API
    Getting started
    • Introduction
    • Authentication
    • Quickstart
    • Tokens & pricing
    • Limits
    • Errors
    • Odds formats
    Reference
    • GET/sports
    • GET/books
    • GET/teams
    • GET/players
    • Logos & headshots
    • GET/events
    • GET/odds
    • POST /odds
    • GET/scores
    • GET/history
    • GET/clv
    • POST /clv
    • GET/usage
    • GET/_health
    • WebSocket
    • Specs & SDKs
    Racing
    • GET/racing/meetings
    • GET/racing/race
    • GET/racing/history
    • GET/racing/inplay
    • GET/racing/futures
    • GET/racing/futures/{futures_id}
    • race_id and status
    Concepts
    • event_id
    • selection_key
    • team_id & player_id
    • Open & close prices
    • 337 model price
    • Event links
    • Statuses
    Getting started
    • Introduction
    • Authentication
    • Quickstart
    • Tokens & pricing
    • Limits
    • Errors
    • Odds formats
    Reference
    • GET/sports
    • GET/books
    • GET/teams
    • GET/players
    • Logos & headshots
    • GET/events
    • GET/odds
    • POST /odds
    • GET/scores
    • GET/history
    • GET/clv
    • POST /clv
    • GET/usage
    • GET/_health
    • WebSocket
    • Specs & SDKs
    Racing
    • GET/racing/meetings
    • GET/racing/race
    • GET/racing/history
    • GET/racing/inplay
    • GET/racing/futures
    • GET/racing/futures/{futures_id}
    • race_id and status
    Concepts
    • event_id
    • selection_key
    • team_id & player_id
    • Open & close prices
    • 337 model price
    • Event links
    • Statuses

    API reference

    Get odds, batch

    The same prices for up to 20 events in one call, charged per event and counted once against the rate limit.

    POST/odds/v1/odds
    Cost
    1 token per event (5 extended, +1 depth)
    Authentication
    X-API-Key, your own key (not the demo key)

    Parameters

    A JSON body (Content-Type: application/json). Everything but event_ids works as on GET /odds and applies to every event in the call.

    • event_idsarrayrequired
      1 to 20 event_ids from /events, sent back verbatim. A repeated id is dropped (the first one counts), and more than 20 distinct ids is a 400.
    • tierstringoptional
      main or extended, as on GET /odds. extended needs a paid plan (not Free).Default: main
    • marketscomma list or arrayoptional
      Market keys, e.g. "head_to_head,total_goals" or ["head_to_head"].Default: all in the tier
    • bookscomma list or arrayoptional
      Book keys from /books, e.g. "betfair,sportsbet" or ["betfair"].Default: all
    • formatstringoptional
      decimal, american or fractional. See Odds formats.Default: decimal
    • depthbooleanoptional
      Any paid plan (not Free), +1 token per event. Adds exchange depth as on GET /odds. Must be true or false.Default: false
    Body
    {
      "event_ids": [
        "soccer/gb/epl/arsenal_fc_v_leeds_united_fc/2026-10-10",
        "soccer/gb/epl/arsenal_v_leeds/2026-10-10"
      ],
      "tier": "main",
      "markets": ["head_to_head"],
      "books": "sportsbet,tab",
      "format": "decimal",
      "depth": false
    }

    Request

    The demo key cannot call this endpoint: it answers 403 demo_not_allowed. Set ODDS_API_KEY to your own key first.

    # Take the next 5 EPL matches, then price all of them in one call
    curl -s "https://api.b337.ai/odds/v1/events?league=epl&limit=5" -H "X-API-Key: $ODDS_API_KEY" \
      | jq '{event_ids: [.data[].event_id], markets: "head_to_head", books: "sportsbet,tab"}' \
      | curl -s -X POST "https://api.b337.ai/odds/v1/odds" \
          -H "X-API-Key: $ODDS_API_KEY" -H "Content-Type: application/json" \
          -d @- --compressed --max-time 30
    import os
    import requests
    
    BASE = "https://api.b337.ai/odds/v1"
    HEADERS = {"X-API-Key": os.environ["ODDS_API_KEY"]}
    
    events = requests.get(f"{BASE}/events", params={"league": "epl", "limit": 5},
                          headers=HEADERS, timeout=10).json()
    
    resp = requests.post(f"{BASE}/odds", headers=HEADERS, timeout=30, json={
        "event_ids": [e["event_id"] for e in events["data"]],
        "markets": "head_to_head",
        "books": ["sportsbet", "tab"],
    })
    resp.raise_for_status()
    body = resp.json()
    print("cost:", resp.headers["X-Tokens-Cost"], "missing:", body["missing"])
    for card in body["data"]:
        print(card["event"]["name"], len(card["markets"]), "markets")
    // Node 18+, saved as an .mjs file
    const BASE = "https://api.b337.ai/odds/v1";
    const headers = { "X-API-Key": process.env.ODDS_API_KEY };
    
    const events = await (await fetch(`${BASE}/events?league=epl&limit=5`, { headers })).json();
    
    const res = await fetch(`${BASE}/odds`, {
      method: "POST",
      headers: { ...headers, "Content-Type": "application/json" },
      body: JSON.stringify({
        event_ids: events.data.map((e) => e.event_id),
        markets: "head_to_head",
        books: ["sportsbet", "tab"],
      }),
      signal: AbortSignal.timeout(30000),
    });
    console.log(res.headers.get("X-Tokens-Cost"), "tokens");
    const { data, missing } = await res.json();
    for (const card of data) console.log(card.event.name, card.markets.length, "markets");
    console.log("never listed:", missing);

    Response

    200 OK
    {
      "schema_version": 1,
      "data": [
        {"schema_version": 1,
         "event": {"event_id": "soccer/gb/epl/arsenal_fc_v_leeds_united_fc/2026-10-10",
                   "sport": "soccer", "league": "epl", "country": "gb",
                   "name": "Arsenal FC v Leeds United FC", "start_time": "2026-10-10T11:30:00Z",
                   "status": "prematch", "books": ["betfair", "sportsbet", "tab"], "...": "..."},
         "tier": "main",
         "odds_format": "decimal",
         "books": {
           "sportsbet": {"updated_at": "2026-10-05T03:05:20Z", "age_seconds": 82.6, "stale": false},
           "tab":       {"updated_at": "2026-10-05T03:06:15Z", "age_seconds": 27.6, "stale": false}},
         "markets": [
           {"market": "head_to_head", "name": "Match Result", "selections": [
             {"selection_key": "774c72a86710", "name": "Arsenal FC", "label": "Arsenal FC",
              "prices": {"sportsbet": {"odds": 1.37, "updated_at": "2026-10-05T03:05:20Z"},
                         "tab":       {"odds": 1.38, "updated_at": "2026-10-05T03:06:15Z"}}},
             "...2 more..."]}],
         "generated_at": "2026-10-05T03:06:42Z"}
      ],
      "missing": ["soccer/gb/epl/arsenal_v_leeds/2026-10-10"],
      "count": 1
    }

    That is the answer to the body above. The first id is a listed event, so its card is in data; the second was built by hand and never listed, so it is in missing. Both were charged: 2 tokens.

    Fields

    • data: one body per event found, in the order you sent the ids. Each is exactly what GET /odds returns for that event with the same tier, markets, books, format and depth: the live card, or a finished event's closing card, with score on every paid plan.
    • missing: the ids you sent that were never listed (a GET would answer 404 unknown_event). count is the number of bodies in data.
    • Cost: the GET price (1 on tier=main, 5 on tier=extended, +1 with depth=true) times the number of distinct ids, charged up front. An id in missing is still charged, as on POST /clv. X-Tokens-Cost says what the call cost.
    • Rate limit: the call is one request against your 60 a minute, however many events it carries.
    • Time limit: a batch still building after 25 seconds stops with 503 unavailable (see Errors below). Keep your client timeout above 25 seconds: the samples use --max-time 30, timeout=30 and AbortSignal.timeout(30000).
    • Plans: the same as GET. tier=extended and depth=true need a paid plan and are refused before anything is charged. If any one event is outside your plan (a finished event needs a paid plan), the whole call answers 403 plan_required and the tokens are given back.
    • Following many events live? The WebSocket pushes every change as it happens for 100 tokens per connection-minute, cheaper than polling from about 9 events.

    Errors

    StatusCodeWhen
    400bad_requestThe body is not a JSON object; event_ids is missing, not a list, empty, more than 20 distinct ids, or holds an id that does not look like an event_id; a bad tier, format, markets or books; depth is not true or false
    403demo_not_allowedThe demo key: use your own key
    403plan_requiredtier=extended or depth=true outside your plan, or an event your plan cannot read; nothing is charged
    503unavailableThe batch could not finish within 25 seconds; nothing is charged. Send fewer event_ids (extended cards are the slow ones) instead of resending the same call

    401, 402 and 429 work as on every endpoint: see Errors.

    PreviousGET /oddsNextGET /scores

    On this page

    • Parameters
    • Request
    • Response
    • Fields
    • Errors