Skip to content

Improving Response Speed

Note

We’re in the process of adding additional request params which are designed to allow you to more efficiently fetch only the data you need. We also plan on releasing a GraphQL API in the future. Check back here for updates.

We’re committed to finding balance between making as much data available to you as possible while also ensuring that you can fetch that data quickly and efficiently. This guide is designed to help you understand how to optimize your requests to reduce response times/latency.

Use the oddIDs parameter

  • The most common cause of high response times is fetching a large number of odds at once. This can be especially problematic when fetching odds for a large number of Events.
  • To reduce this, you can use the oddIDs parameter to fetch only the odds you need.
  • The oddIDs parameter can be included in the /events
  • It accepts a comma-separated list of oddID values (See the Markets guide for a list of supported oddID values)
  • You can also set the parameter includeOpposingOddIDs to true to also include the opposing side of all oddIDs provided
  • You can also replace the playerID portion of any oddID with PLAYER_ID to fetch that oddID across all players
  • Example
    • Consider the oddID batting_strikeouts-CODY_BELLINGER_1_MLB-game-ou-under which represents the under odds for Cody Bellinger’s strikeouts in a game
    • If you wanted to fetch all player strikeouts odds for this game you would set the following params
      • oddIDs=batting_strikeouts-PLAYER_ID-game-ou-under
      • includeOpposingOddIDs=true
    • That would give you both over and under odds for all player strikeouts odds markets for all Events/Odds returned