Market Data Integration
Welcome! This guide walks you through everything you need to start pulling tournaments, sport events, and live betting markets from ProphetX.
If you're an affiliate partner integrating ProphetX odds into your site, app, or pricing engine — you're in the right place. The API is read-only, JSON over HTTPS, and you can be making your first call within a few minutes.
Table of contents
- What you'll be working with
- Environments
- Authentication
- Endpoints
- Response data reference
- Errors
- A full walkthrough
- Quick reference card
1. What you'll be working with
Five endpoints, all returning JSON wrapped in a {"data": …} envelope:
| What you want | Endpoint | Method |
|---|---|---|
| Sign in (key-pair flow only) | /auth/login | POST |
| Browse tournaments | /affiliate/get_tournaments | GET |
| Browse sport events | /affiliate/get_sport_events | GET |
| Get markets for one event | /{version}/affiliate/get_markets | GET |
| Get markets for many events | /{version}/affiliate/get_multiple_markets | GET |
The typical flow is tournaments → events → markets: pick a tournament, list its events, then pull live markets and prices for the events you care about.
2. Environments
We run two environments. Start in sandbox while you're integrating, then flip to production when you're ready to go live.
| Environment | Base URL | Use it for |
|---|---|---|
| Sandbox | https://api-ss-sandbox.betprophet.co/partner | Development and testing. Same API surface, isolated data. |
| Production | https://cash.api.prophetx.co/partner | Live odds and real data. |
Every endpoint path below is relative to the base URL.
3. Authentication
You'll receive one of two credential types from your ProphetX account. Pick the section that matches yours.
Option A — Affiliate API key (simplest)
You'll get a single API key. Send it as the Authorization header on every request. No Bearer prefix — just the raw key.
GET /affiliate/get_tournaments HTTP/1.1
Host: api-ss-sandbox.betprophet.co
Authorization: your-affiliate-api-key
Accept: application/jsonThat's it. Skip to §4 Endpoints.
Option B — Access key + secret key
You'll get a pair of keys. Exchange them once for an access token, then use that token as your Authorization header.
Step 1 — get a token:
POST /auth/login HTTP/1.1
Host: api-ss-sandbox.betprophet.co
Content-Type: application/json
Accept: application/json
{
"access_key": "your-access-key",
"secret_key": "your-secret-key"
}curl -X POST "https://api-ss-sandbox.betprophet.co/partner/auth/login" \
-H "Content-Type: application/json" \
-d '{"access_key":"your-access-key","secret_key":"your-secret-key"}'Response:
{
"data": {
"access_token": "eyJhbGc..."
}
}Step 2 — use the token as the Authorization header on subsequent calls, the same way you'd use the API key in Option A. (No Bearer prefix.)
Tip: Tokens are not refreshed automatically by the API. If you start getting
401s, just call/auth/loginagain.
4. Endpoints
4.1 List tournaments
GET /affiliate/get_tournaments
Returns all tournaments available on the platform.
Query parameters
| Param | Type | Required | What it does |
|---|---|---|---|
has_active_events | bool | no | When true, only return tournaments that currently have active sport events. Skip it (or false) to see everything. |
Example
curl -H "Authorization: $API_KEY" \
"https://api-ss-sandbox.betprophet.co/partner/affiliate/get_tournaments?has_active_events=true"Response
{
"data": {
"tournaments": [
{
"id": 123,
"name": "NFL — Regular Season",
"sport": "football",
"has_active_events": true
}
]
}
}4.2 List sport events
GET /affiliate/get_sport_events
Returns sport events. Filter by tournament or by a specific list of event IDs — or pass no filter to get everything.
Query parameters
| Param | Type | Required | What it does |
|---|---|---|---|
tournament_id | int | no | Only events belonging to this tournament. |
event_ids | int[] | no | Only the specific events you ask for. Repeat the parameter, e.g. event_ids=101&event_ids=102. |
Example
curl -H "Authorization: $API_KEY" \
"https://api-ss-sandbox.betprophet.co/partner/affiliate/get_sport_events?tournament_id=123"Response
{
"data": {
"sport_events": [
{
"event_id": 101,
"tournament_id": 123,
"name": "Patriots vs. Jets",
"start_time": "2026-06-01T17:00:00Z",
"status": "scheduled",
"home_team": "Patriots",
"away_team": "Jets"
}
]
}
}start_time is ISO 8601 in UTC.
4.3 Get markets for an event
GET /{version}/affiliate/get_markets
Returns all betting markets for a single event — moneylines, spreads, totals, props, etc. — along with the available selections and current odds.
API versions
The path is version-prefixed. Use v3 unless you have a reason not to.
| Version | Path | Status |
|---|---|---|
v1 | /affiliate/get_markets | Deprecated — please migrate. |
v2 | /v2/affiliate/get_markets | Stable. |
v3 | /v3/affiliate/get_markets | Latest — recommended. |
Query parameters
| Param | Type | Required | What it does |
|---|---|---|---|
event_id | int | yes | The event to fetch markets for. |
market_types | string | no | Comma-separated allowlist, e.g. moneyline,spread,total. Only markets of these types are returned. |
min_liquidity | float | no | Only return markets at or above this liquidity threshold. Useful for filtering out thinly-priced lines. |
Example
curl -H "Authorization: $API_KEY" \
"https://api-ss-sandbox.betprophet.co/partner/v3/affiliate/get_markets?event_id=101&market_types=moneyline,spread&min_liquidity=100"Response (v3)
{
"data": [
{
"market_id": 555,
"event_id": 101,
"market_type": "moneyline",
"liquidity": 4250.0,
"selections": [
[
{ "id": 1, "name": "Patriots", "odds": 1.95, "line": null, "liquidity": 2100.0 }
],
[
{ "id": 2, "name": "Jets", "odds": 1.95, "line": null, "liquidity": 2150.0 }
]
]
}
]
}Note on
selections: In v3, each entry insideselectionsis itself a list (selections grouped by side/team). In v2,selectionsis a flat array of objects. Be ready for both if you support multiple versions.
odds are decimal odds. line is the point spread or total (null on moneyline markets).
4.4 Get markets for multiple events
GET /{version}/affiliate/get_multiple_markets
Same data as get_markets, but batched across many events in a single call. Great for refreshing prices on a list of upcoming games.
API versions — same scheme as get_markets:
| Version | Path |
|---|---|
v1 | /affiliate/get_multiple_markets |
v2 | /v2/affiliate/get_multiple_markets |
v3 | /v3/affiliate/get_multiple_markets |
Query parameters
| Param | Type | Required | What it does |
|---|---|---|---|
event_ids | int[] | yes | Events to fetch markets for. Repeat the parameter for each ID. |
Example
curl -H "Authorization: $API_KEY" \
"https://api-ss-sandbox.betprophet.co/partner/v3/affiliate/get_multiple_markets?event_ids=101&event_ids=102&event_ids=103"Response — typical shape
{
"data": {
"101": [ { /* market */ }, { /* market */ } ],
"102": [ { /* market */ } ],
"103": []
}
}Each market object has the same fields as in §4.3.
Heads up: A small number of responses may come back as a flat list of markets rather than a keyed object. If you're parsing defensively, check the type and, in the flat-list case, group by each market's
event_idfield.
5. Response data reference
A complete field-by-field reference for everything you'll receive.
Tournament
| Field | Type | Description |
|---|---|---|
id | int | Tournament ID. Use this to filter events. |
name | string | Display name, e.g. "NFL — Regular Season". |
sport | string | null | Sport code, e.g. "football", "basketball". |
has_active_events | bool | null | Whether the tournament has currently active events. |
Sport event
| Field | Type | Description |
|---|---|---|
event_id | int | Event ID. Use this with the markets endpoints. |
tournament_id | int | null | Parent tournament. |
name | string | null | Display name. |
start_time | string | null | ISO 8601 UTC start time. |
status | string | null | Lifecycle status, e.g. "scheduled", "live", "finished". |
home_team | string | null | Home team. |
away_team | string | null | Away team. |
Market
| Field | Type | Description |
|---|---|---|
market_id | int | null | Market ID. |
event_id | int | null | Parent event. |
market_type | string | null | e.g. "moneyline", "spread", "total". |
liquidity | float | null | Total available liquidity on the market. |
selections | array | Available outcomes. See note in §4.3 about v2 vs v3 shape. |
Selection
| Field | Type | Description |
|---|---|---|
id | int | null | Selection ID. |
name | string | null | Display label, e.g. "Patriots", "Over". |
line | float | null | Point spread or total. null for moneyline. |
odds | float | null | Decimal odds. |
liquidity | float | null | Liquidity available on this specific selection. |
6. Errors
The API uses standard HTTP status codes. Error bodies are JSON when available.
| Status | What it means | What to do |
|---|---|---|
200 | Success. | — |
400 | Bad request — usually a malformed or missing parameter. | Check your query string. |
401 | Unauthorized — bad key, missing header, or (for Option B) expired token. | Verify your Authorization header. For token-based auth, re-run /auth/login. |
404 | The resource (e.g. an event_id) doesn't exist. | Double-check the ID. |
429 | Rate-limited. | Back off and retry with exponential delay. |
5xx | Server-side issue. | Retry with backoff. If it persists, reach out to your ProphetX contact. |
7. A full walkthrough
The typical "fetch live prices for a slate of games" flow, in three calls:
┌───────────────────────┐ 1. List active tournaments
│ get_tournaments │ → pick the ones you care about
└──────────┬────────────┘
│
▼
┌───────────────────────┐ 2. List events in those tournaments
│ get_sport_events │ → collect event_ids
└──────────┬────────────┘
│
▼
┌───────────────────────┐ 3. Batch-fetch live markets & prices
│ get_multiple_markets │ → render odds in your product
└───────────────────────┘
Step 1 — active tournaments:
curl -H "Authorization: $API_KEY" \
"https://api-ss-sandbox.betprophet.co/partner/affiliate/get_tournaments?has_active_events=true"Step 2 — events for the tournament(s) you picked:
curl -H "Authorization: $API_KEY" \
"https://api-ss-sandbox.betprophet.co/partner/affiliate/get_sport_events?tournament_id=123"Step 3 — markets for a batch of events:
curl -H "Authorization: $API_KEY" \
"https://api-ss-sandbox.betprophet.co/partner/v3/affiliate/get_multiple_markets?event_ids=101&event_ids=102&event_ids=103"For high-frequency price refreshes, re-run step 3 on whatever cadence your product needs — and keep an eye on rate limits.
8. Quick reference card
Base URL (sandbox) : https://api-ss-sandbox.betprophet.co/partner
Base URL (production) : https://cash.api.prophetx.co/partner
Auth header : Authorization: <api-key or token> (no "Bearer " prefix)
POST /auth/login { access_key, secret_key } → { data: { access_token } }
GET /affiliate/get_tournaments [?has_active_events]
GET /affiliate/get_sport_events [?tournament_id] [?event_ids]
GET /{v1|v2|v3}/affiliate/get_markets ?event_id [&market_types] [&min_liquidity]
GET /{v1|v2|v3}/affiliate/get_multiple_markets ?event_ids
Need access, a higher rate limit, or a feature that isn't covered here? Get in touch with your ProphetX contact — we're happy to help you ship.
