📅Get events

Returns all events and their respective markets and orderbooks

This endpoint will return every event which is currently open for betting at Purebet.

The response contains sports, sports contain leagues, leagues contain events, events contain markets, markets contain market sides

Each event contains the following attributes.

  • event: string, the name of the event

  • highlight: boolean, whether or not this event is highlighted on the Purebet website

  • homeTeam: string, the name of the home team in this event

  • awayTeam: string, the name of the away team in this event

  • startDate: number, seconds since January 1st 1970, UTC (unix format), of the starting time of this event

  • moneyline or full_time_result: object, information for the moneyline or full_time_result market of this event. Note: the attribute full_time_result only appears for soccer events, and is an object with 3 attributes: home, away, and draw. Each of these points to a market.

  • over_under: array of market objects, information for different totals lines of this event

  • handicap: array of market objects, information for different handicap lines of this event

Each market contains the following attributes.

  • id1: number, needed to place a bet on this market through the Purebet API

  • id2: number, also needed to place a bet on this market through the Purebet API

  • (line: number, the value of the over_under or home handicap line. Not shown in moneyline or full_time_result markets)

  • home or over or Back: object, contains information about the home or over or Back market side.

  • away or under or Lay: object, contains information about the away or under or Lay market side.

  • sport: string, the sport to which this event belongs, at the time of writing will be one of soccer, americanfootball, tennis, esports, basketball, hockey, cryptocurrency, politics

  • lastUpdated: unix timestamp, shows the last time the orderbook was updated. Old orderbooks do not necessarily mean they are out of date, just that no change has occurred in the odds. However, if you are having bet placement issues, you can force refresh.

Each market side contains the following attributes.

  • highestOdds: number, the highest odds on this market side

  • stakeAtHighestOdds: number, the amount in USDC that can be risked at these odds and matched

  • secondHighestOdds: number, the second highest odds on this market side

  • stakeAt2ndHighestOdds: number, the amount in USDC that can be risked at these odds and matched. Note that this number does not include stakeAtHighestOdds.

  • thirdHighestOdds: number, the third highest odds on this market side

  • stakeAt3rdHighestOdds: number, the amount in USDC that can be risked at these odds and matched. Note that this number does not include stakeAtHighestOdds nor stakeAt2ndHighestOdds.

Example response
"basketball": {
    "USA NBA": [
      {
        "highlight": false,
        "startDate": 1680741600,
        "over_under": [
          {
            "line": 243.5,
            "id1": 62,
            "id2": 215,
            "over": {
              "highestOdds": 2.0,
              "stakeAtHighestOdds": 400.0,
              "secondHighestOdds": 0,
              "stakeAt2ndHighestOdds": 0,
              "thirdHighestOdds": 0,
              "stakeAt3rdHighestOdds": 0
            },
            "under": {
              "highestOdds": 1.84,
              "stakeAtHighestOdds": 400.0,
              "secondHighestOdds": 0,
              "stakeAt2ndHighestOdds": 0,
              "thirdHighestOdds": 0,
              "stakeAt3rdHighestOdds": 0
            },
            "lastUpdated":1697054304232
          }
        ],
        "handicaps": [
          {
            "line": -5.5,
            "id1": 62,
            "id2": 216,
            "home": {
              "highestOdds": 1.84,
              "stakeAtHighestOdds": 400.0,
              "secondHighestOdds": 0,
              "stakeAt2ndHighestOdds": 0,
              "thirdHighestOdds": 0,
              "stakeAt3rdHighestOdds": 0
            },
            "away": {
              "highestOdds": 2.0,
              "stakeAtHighestOdds": 400.0,
              "secondHighestOdds": 0,
              "stakeAt2ndHighestOdds": 0,
              "thirdHighestOdds": 0,
              "stakeAt3rdHighestOdds": 0
            },
            "lastUpdated":1697054304232
          }
        ],
        "homeTeam": "Dallas Mavericks",
        "awayTeam": "Sacramento Kings",
        "moneyline": {
          "id1": 62,
          "id2": 214,
          "home": {
            "highestOdds": 1.46,
            "stakeAtHighestOdds": 46.96,
            "secondHighestOdds": 1.43,
            "stakeAt2ndHighestOdds": 220.45,
            "thirdHighestOdds": 1.42,
            "stakeAt3rdHighestOdds": 431.96
          },
          "away": {
            "highestOdds": 2.96,
            "stakeAtHighestOdds": 67.56,
            "secondHighestOdds": 2.94,
            "stakeAt2ndHighestOdds": 467.56,
            "thirdHighestOdds": 2.92,
            "stakeAt3rdHighestOdds": 34.93
          },
          "lastUpdated":1697054304730
        },
        "sport": "basketball",
        "event": "Dallas Mavericks vs. Sacramento Kings"
      }

For Lay market sides, all odds are in backer's odds, and all stakes are denoted in the risk of the lay bettor, not the stake placed by the back bettor.

Also note that full_time_result markets return 3 different id pairs, each for the home, draw, and away markets.

Filtering

The response can be filtered by adding optional parameters to the query URL.

By sport

Returning only events for a particular sport by using the sport parameter:

When this optional parameters is present, the API response returns leagues from that sport which contain events which contain markets. Note: only events within 24 hours are returned. For events further in the future, use filtering by league.

Example URL: https://api.purebet.io/pbapi?sport=soccer

We now support filtering by multiple sports. This is done using the sports filter and passing in a comma separated list of sport names. This should be used sparingly and with only a small number of sports. Requesting many sports will cause a timeout. It is intended to be used by frontend operators. Filtering by multiple leagues is preferred.

Example URL: https://api.purebet.io/pbapi?sports=baseball,basketball

By League

Returning only events for a particular league by using the league parameter:

When this optional parameters is present, the API response is a list of events from that league which contain markets.

Example URL: https://api.purebet.io/pbapi?league=GER1

We now support filtering by multiple leagues. This is done using the leagues filter and passing in a comma separated list of league abbreviations. This should be used sparingly and with only a small number of leagues. Requesting many leagues will cause a timeout. It is intended to be used by frontend operators.

Example URL: https://api.purebet.io/pbapi?leagues=ARG1,FRA1,MLB

By event or market

Returning only markets for a particular event or market ID by using the filterBy parameter:

  • filterBy: string, either "market" or "event", get a specific event or market. If filterBy is set to "event", then given any id1 and id2 combination of a market within that event, the API will return all markets of that event.

  • id1: number, id1 of the market

  • id2: number, id2 of the market

When these optional parameters are present, the API response is an Event or Market object, depending on filterBy.

Example URL: https://api.purebet.io/pbapi?filterBy=market&id1=46&id2=196

Last updated