Sports API reference
Live events, match odds, bookmaker, fancy, sportsbook markets, and scorecards as JSON. Client keys with scopes and terms.
Authentication
Send your issued client key on every /v1 request.
Header (preferred)
X-API-Key: ob_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Or bearer
Authorization: Bearer ob_…
Response format
Every successful call wraps the payload in data. Failures return error.
{
"success": true,
"data": { }
}
{
"success": false,
"error": "message"
}
Endpoints
All paths are relative to https://porqpine.cloud. Scopes are enforced per key.
| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /v1/health | any | Key health, client name, expiry |
| GET | /v1/sports | sports | Sports with live event counts |
| GET | /v1/live | events | In-play events (?sportId=) |
| GET | /v1/events | events | Live + popular (?live=1&sportId=) |
| GET | /v1/odds | odds | Full markets for an event (MO, BM, fancy, sportsbook) |
| GET | /v1/markets | odds | Market list for an event (no selections) |
| GET | /v1/scorecard | results | Scorecard for one event |
| GET | /v1/results | results | Available live scorecards |
| GET | /v1/races | events | Horse 7 / greyhound 4339 |
| POST | /v1/settlements | results | Register bet with your betId → receive settlementId |
| GET | /v1/settlements/:settlementId | results | Verify settlement status |
| GET | /v1/settlements?betId= | results | Lookup by your bet id |
| WS | /v1/ws | odds | Live odds socket (subscribe by eventId) |
Common sportIds
1 Football 2 Tennis 4 Cricket 7 Horse Racing 4339 Greyhound
Market types
GET /v1/odds?eventId= returns every market available for that event. Use type to filter client-side. Not every event has bookmaker or fancy — only what the feed publishes.
| type | Meaning |
|---|---|
| MATCH_ODDS | Match odds / winner |
| BOOKMAKER | Bookmaker / mini bookmaker |
| FANCY | Fancy / session lines (innings runs). Selections include backLine / layLine |
| SPORTSBOOK | Over totals, odd/even, player, ball-by-ball specials |
| TOSS | Toss markets |
| TIED_MATCH | Tied match |
| SESSION | Named session markets |
| OVER_UNDER | Over/under style markets |
| WINNER | Tournament / outright winner |
| OTHER | Unclassified |
meta on the odds response counts each type for quick UI badges.
Odds example
One call returns match odds, bookmaker, fancy, and sportsbook markets when present.
curl -H "X-API-Key: YOUR_KEY" \ "https://porqpine.cloud/v1/odds?eventId=EVENT_ID"
{
"success": true,
"data": {
"event": {
"eventId": "36179534",
"name": "Australia W v Bangladesh W",
"sport": "Cricket",
"sportId": "4",
"isLive": true
},
"markets": [
{
"marketId": "1.263684490",
"name": "Match Odds",
"type": "MATCH_ODDS",
"status": "OPEN",
"selections": [
{ "selectionId": "1", "name": "Australia W", "backPrice": 1.45, "layPrice": 1.48 }
]
},
{
"marketId": "1.43898882RD_SB",
"name": "Bookmaker 0 Commission",
"type": "BOOKMAKER",
"status": "OPEN",
"selections": [
{ "selectionId": "47410881", "name": "Australia W", "backPrice": 1.9, "layPrice": 2.05 }
]
},
{
"marketId": "1.263684490-43899084RD.FY",
"name": "1st Over AUSW ADV.",
"type": "FANCY",
"status": "OPEN",
"selections": [
{
"selectionId": "1",
"name": "1st Over AUSW ADV.",
"backPrice": 100,
"backLine": 5,
"layPrice": 100,
"layLine": 4
}
]
}
],
"meta": {
"total": 41,
"matchOdds": 1,
"bookmaker": 1,
"fancy": 37,
"sportsbook": 0,
"toss": 1,
"tiedMatch": 1,
"other": 0
}
}
}
Markets only
curl -H "X-API-Key: YOUR_KEY" \ "https://porqpine.cloud/v1/markets?eventId=EVENT_ID"
Selections for one market
curl -H "X-API-Key: YOUR_KEY" \ "https://porqpine.cloud/v1/odds?marketId=MARKET_ID"
Live events / results
curl -H "X-API-Key: YOUR_KEY" "https://porqpine.cloud/v1/live?sportId=4" curl -H "X-API-Key: YOUR_KEY" https://porqpine.cloud/v1/results curl -H "X-API-Key: YOUR_KEY" "https://porqpine.cloud/v1/scorecard?eventId=EVENT_ID"
Settlements
Send your unique betId. We return a unique settlementId. Poll that id to verify bet status after settlement.
1. Register a bet
curl -X POST -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{
"betId": "client-bet-1001",
"eventId": "36179534",
"marketId": "1.263684490",
"marketType": "MATCH_ODDS",
"selectionId": "1",
"selectionName": "Australia W",
"side": "back",
"odds": 1.45,
"stake": 100
}' \
https://porqpine.cloud/v1/settlements
{
"success": true,
"data": {
"settlementId": "st_a1b2c3d4e5f6…",
"betId": "client-bet-1001",
"status": "open",
"eventId": "36179534",
"odds": 1.45,
"stake": 100,
"createdAt": "2026-10-14T00:00:00.000Z",
"reused": false
}
}
Same betId from the same client is idempotent — returns the existing settlement with reused: true.
2. Verify status
curl -H "X-API-Key: YOUR_KEY" \ https://porqpine.cloud/v1/settlements/st_a1b2c3d4e5f6… # or by your bet id curl -H "X-API-Key: YOUR_KEY" \ "https://porqpine.cloud/v1/settlements?betId=client-bet-1001"
Statuses: open, won, lost, void, cancelled, settled, pending. When settled, settledAt is set.
WebSocket
Live odds over socket. Prefer this instead of tight REST polling for subscribed events.
wss://porqpine.cloud/v1/ws?apiKey=YOUR_KEY
Or connect then auth:
{ "type": "auth", "apiKey": "ob_…" }
{ "type": "subscribe", "eventId": "36179534" }
{ "type": "unsubscribe", "eventId": "36179534" }
{ "type": "ping" }
Server pushes snapshots about every 5s for each subscribed event:
{
"type": "odds",
"eventId": "36179534",
"time": "2026-10-14T00:00:00.000Z",
"data": { "event": { }, "markets": [ ], "meta": { } }
}
Requires odds scope. Max 20 event subscriptions per connection.
Object shapes
Event
{
"eventId": "75585488",
"sport": "Football",
"sportId": "1",
"name": "Team A vs Team B",
"competition": "League",
"startTime": "2026-10-13T19:00:00Z",
"status": "live",
"isLive": true,
"hasScorecard": true,
"hasOdds": true,
"marketId": "1.75585488.1._BR",
"source": "A"
}
Market
{
"marketId": "…",
"eventId": "…",
"name": "Bookmaker 0 Commission",
"type": "BOOKMAKER",
"btype": "ODDS",
"status": "OPEN",
"matched": null,
"betDelaySec": 5,
"isBettable": true,
"source": "A",
"selections": [ ]
}
Selection
{
"selectionId": "18",
"marketId": "…",
"name": "Home",
"backPrice": 1.85,
"backSize": null,
"backLine": null,
"layPrice": null,
"laySize": null,
"layLine": null,
"source": "A"
}
For fancy markets, read backLine / layLine (runs line) together with price.
Errors
| HTTP | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 403 | Key revoked, expired, client suspended, IP not allowed, or missing scope |
| 400 | Bad parameters |
| 404 | Event or resource not found |
| 502 | Upstream sports feed temporarily unavailable |
Polling
Prefer wss://…/v1/ws for live odds. If polling REST, use 5–15 seconds for odds and 15–30 seconds for sports/events. Poll settlements after the event finishes.
Need a key? Contact Porqpine. Back to home