Prediction Market Resolution Engine
Uses CRE

Before you begin

This tutorial uses the Market Registry API to find the markets Chainlink resolves and follow their progress. By the end, you will have listed the markets for one competition and read the status of each event.

The Market Registry API is read-only. It returns the catalog: events, their markets, each market's resolution criteria, and each event's status. Outcomes reach your platform separately, as agreed with Chainlink; see Outcome delivery.

The tutorial path

StepYou doYou end with
1. List marketsFind a competition in coverage and fetch its upcoming eventsEach market's slug, question, and resolution criteria
2. Track event statusPoll the same date window and read each event's statusA view of which events are open, resolving, or done

Both steps use the same example: Major League Baseball games, grouping mlb.

Prerequisites

  • A Market Registry API key. Request one from the Chainlink team. The key belongs to your organization and must have Prediction Markets access enabled.
  • curl and jq in a terminal.

Set your API key

Set the base URL and your key. Run every command in this tutorial in the same terminal.

Terminal
export MARKETS_API_URL='https://markets.api.chain.link/user/v1'
export MARKETS_API_KEY='YOUR_API_KEY'

For this tutorial, keep the key in your terminal session only. Do not ship it in a trader-facing app.

Confirm the key works:

Terminal
curl --silent --show-error --output /dev/null --write-out '%{http_code}\n' \
  --header "Authorization: ApiKey ${MARKETS_API_KEY}" \
  "${MARKETS_API_URL}/taxonomies"

The command prints 200. A 401 or 403 means the key is missing, invalid, or not enabled for Prediction Markets; contact the Chainlink team.

Next step

1. List markets

Get the latest Chainlink content straight to your inbox.