Pinnacle API Documentation
repository·master·Indexed 41 days ago
https://github.com/pinnacleapi/pinnacleapi-documentationA RESTful service providing betting data and execution capabilities for professional bettors and commercial partners. Includes specifications for Customer API v1, Lines API v2, and Bets API v4, covering odds, fixtures, and bet placement with features like delta calls, automatic deduplication, and sport-specific market structures.
What's inside Pinnacle API
- The Pinnacle API is a protected resource provided exclusively to players, partners, and affiliates. By using the API, you agree to the Fair Use Policy. Pinnacle reserves the right to block access without prior notice if usage is deemed inconsistent with this policy. Terms may be modified at any time, and continued use of the API constitutes acceptance of those changes.
How Soccer Extra Time markets are structured
masterHistorically, Soccer Extra Time markets (e.g., "France (To Advance)", "England (ET ONLY)") were distinct events. They are now provided as Periods of the parent live event.
Important Data Note: Goals and Red Cards occurring during Extra Time are only returned in Period 3.
Period Mapping for Soccer Extra Time:
- Period 3: Extra Time
- Period 6: Penalty Shootout
- Period 7: 1st Ten Shootout Pen
- Period 8: To Qualify
- Period 39: To Win Final
Market Availability by Period:
- Period 3: Spread, Moneyline, Total, and Team Totals.
- Periods 6, 8, 39: Moneyline only.
- Period 7: Total only.
// Example of an event with multiple periods (from Get Odds response) "periods": [ { "lineId": 1912670188, "number": 8, // To Qualify "moneyline": { "home": -322.0, "away": 212.0 } }, { "lineId": 1912670213, "number": 3, // Extra Time "spreads": [...], "moneyline": { "home": 130.0, "away": 497.0, "draw": -109.0 }, "totals": [...] } ]Group associated events using parentId
masterUse the
parentIdfield from the [Get Fixtures] endpoint to group related events (such as pre-game and live versions of the same match, or different market types like corners) to a single 'parent' event.Key Rules:
- Parent events are pre-game events (
liveStatus=0orliveStatus=2) and do not have aparentIdset. - Live events (
liveStatus=1) will always have aparentIdset. - Multiple events can be associated with one parent (e.g., if they have different
resultingUnitor offer alternative odds). - The
parentIdproperty is intended to replace therotNumproperty, which is being decommissioned.
{ "sportId": 29, "league": [ { "id": 2331, "events": [ { "id": 837721686, "liveStatus": 1, "parentId": 834342247 }, { "id": 834342247, "liveStatus": 2, "parentId": null } ] } ] }- Parent events are pre-game events (
Avoid commercial usage violations
masterCommercial usage of the API is strictly prohibited unless you have an explicit written agreement from Pinnacle. Unauthorized commercial use will result in the permanent suspension of your API access.
Specifically, you must not:
- Use the API for commercial purposes without a written agreement.
- Sell, rent, lease, sublicense, redistribute, or syndicate the API to any third party without prior written approval.
Map home/away teams to team1/team2
masterIn
/oddsand/fixturesoperations, teams are referred to ashomeandaway. However, when placing a bet, you must specify theteam(e.g.,team1orteam2).The mapping between
home/awayandteam1/team2is provided in the/leaguesresponse via thehomeTeamTypeproperty.Use Delta and Snapshot calls for Odds and Fixtures
masterThe
/fixtures,/fixtures/special,/odds, and/odds/specialendpoints support two modes of operation:- Snapshot Calls: Returns the current state of the data. Do not provide a
sinceparameter for snapshot calls. - Delta Calls: Returns only the changes that have occurred since a specific point in time.
Best Practices:
- Workflow: Always issue a snapshot call first, then proceed with delta calls to receive updates efficiently with smaller payloads.
- The
sinceparameter: For delta calls, thesinceparameter must not be0or1. It must always be the value of thelastproperty returned in your previous response.
- Snapshot Calls: Returns the current state of the data. Do not provide a
Use parentId to group associated events
masterThe
parentIdproperty in the/fixturesresponse is used to group associated events to a single "parent" pre-game event. This replaces the need for using rotation numbers to link related events (such as a main match and its associated corner or booking markets).Example of grouping via
parentIdin a/fixturesresponse:{ "sportId": 29, "last": 148671597, "league": [ { "id": 2331, "name": "Norway - 1st Division", "events": [ { "id": 837721686, "starts": "2018-04-10T17:00:00Z", "home": "Viking Fk", "away": "Mjondalen", "rotNum": "6751", "liveStatus": 1, "status": "O", "parlayRestriction": 2, "parentId": 834342247, "altTeaser": false }, { "id": 834342247, "starts": "2018-04-10T17:00:00Z", "home": "Viking Fk", "away": "Mjondalen", "rotNum": "6751", "liveStatus": 2, "status": "I", "parlayRestriction": 2, "parentId": 834342247, "altTeaser": false } ] }, { "id": 6816, "name": "Norway - 1st Division Corners", "events": [ { "id": 837721684, "starts": "2018-04-10T17:00:00Z", "home": "Viking Fk (Corners)", "away": "Mjondalen (Corners)", "rotNum": "6751", "liveStatus": 1, "status": "O", "parlayRestriction": 1, "parentId": 834342247, "altTeaser": false }, { "id": 837721615, n "starts": "2018-04-10T17:00:00Z", "home": "Viking Fk (Corners)", "away": "Mjondalen (Corners)", "rotNum": "6751", "liveStatus": 2, "status": "I", "parlayRestriction": 1, "parentId": 834342247, "altTeaser": false } ] } ] }{ "sportId": 29, "last": 148671597, "league": [ { "id": 2331, "name": "Norway - 1st Division", "events": [ { "id": 837721686, "starts": "2018-04-10T17:00:00Z", "home": "Viking Fk", "away": "Mjondalen", "rotNum": "6751", "liveStatus": 1, "status": "O", "parlayRestriction": 2, "parentId": 834342247, "altTeaser": false }, { "id": 834342247, "starts": "2018-04-10T17:00:00Z", "home": "Viking Fk", "away": "Mjondalen", "rotNum": "6751", "liveStatus": 2, "status": "I", "parlayRestriction": 2, "parentId": 834342247, "altTeaser": false } ] }, { "id": 6816, "name": "Norway - 1st Division Corners", "events": [ { "id": 837721684, "starts": "2018-04-10T17:00:00Z", "home": "Viking Fk (Corners)", "away": "Mjondalen (Corners)", "rotNum": "6751", "liveStatus": 1, "status": "O", "parlayRestriction": 1, "parentId": 834342247, "altTeaser": false }, { "id": 837721615, "starts": "2018-04-10T17:00:00Z", "home": "Viking Fk (Corners)", "away": "Mjondalen (Corners)", "rotNum": "6751", "liveStatus": 2, "status": "I", "parlayRestriction": 1, "parentId": 834342247, "altTeaser": false } ] } ] }Check event betting availability via status property
masterTo determine if an event is open for betting, check thestatusproperty on the period in the/oddsand/odds/parlay/response. This property specifies whether the period is online or offline for betting, allowing clients to avoid frequent calls to the/fixturesendpoint to check event status.Determine if a market is open for betting
masterA standard market is open for betting if all the following conditions are met:
- The period
statusis1. - The market is priced.
- The period
cutoffis in the future.
Special Markets are open if:
- The special event
statusis either"O"or"I"(see [Get Special Fixtures]). - The market is priced (see [Get Special Odds]).
- The special event
cutoffis in the future.
- The period
New Tennis Event Structure (Post-September 2022)
masterAs of the September 12, 2022 update, Tennis events have moved away from embedding handicap information and period descriptions directly into the team names. Instead, the API uses explicit
resultingUnitvalues and separate event objects to represent different markets.Key changes:
- Explicit
resultingUnit: Markets now explicitly state whether they useSets,Games, orRegularunits. - Spread Markets: Set Handicap markets no longer use Moneylines with handicap points in the name; they are now offered as spread markets.
- Period Handling: For Live tennis, instead of using
Period 0with descriptions in the team names, the API uses thenumberfield within theperiodsarray to distinguish between different resulting units.
To find the specific descriptions for Tennis Periods, use the following endpoint:
/v1/periods?sportId=33{ "id": 1562180480, "starts": "2022-10-31T20:30:00Z", "home": "Sebastian Korda", "away": "Alex De Minaur", "resultingUnit": "Sets", "version": 440033645 }, { "id": 1562180497, "starts": "2022-10-31T20:30:00Z", "home": "Sebastian Korda (Games)", "away": "Alex De Minaur (Games)", "parentId": 1562180480, "resultingUnit": "Games", "version": 440033657 }- Explicit
Understand API Deduplication for Bets
masterTo prevent duplicate bets caused by network timeouts or retries, the API implements automatic deduplication for all 'place bet' requests.
When you issue a request, you should provide a
uniqueRequestId. If a bet is accepted, the system stores thatuniqueRequestIdfor 30 minutes. If you attempt to place another bet with the sameuniqueRequestIdwithin that 30-minute window, the API will return an error instead of creating a duplicate bet.Adhere to API Usage Rules and Restrictions
masterTo maintain service stability, clients must follow these usage rules:
- Avoid Looping: Do not call
/oddsor/fixtureendpoints in a loop for individual sports, leagues, or fixtures. Instead, use theleagueIdsoreventIdsparameters to request multiple IDs in a single call. - Line Endpoint: The
/lineendpoint is intended solely for checking a price prior to placing a bet; do not call it in a loop. - Sports Endpoint: Requests to
/sportsmust be limited to once every 60 minutes. - IP Restrictions: Access is restricted to a maximum of 2 distinct IP addresses per client.
- Avoid Looping: Do not call