Yes, PredictIt makes live market data publicly available via an API (Application Program Interface). The latest trade price and the best offers to buy and sell shares are available for any active market via the API. Data is updated every sixty seconds.

 

If you wish to receive data for all markets in a category (ex. U.S. Elections), the format for the API URL is:

https://www.predictit.org/api/marketdata/category/[id]

where [id] refers to the category ID for the Category.

Example:

U.S. Elections

https://www.predictit.org/api/marketdata/category/6


 

If you wish to receive data for all markets in a sub-category (ex. U.S. Elections/Electoral College), the format for the API URL is:

https://www.predictit.org/api/marketdata/group/[id]

 where [id] refers to the group ID for the sub-category.

Example:

U.S. Elections / Electoral College

https://www.predictit.org/api/marketdata/group/75

 

You can find the ID numbers for categories and sub-categories (groups) in their respective URLs.

The format for the API URL for any single market or contract is:

https://www.predictit.org/api/marketdata/ticker/[tickersymbol]

where [tickersymbol] refers to the ticker symbol for either an individual contract or a market as a whole.

Here are two examples:

Market: Who will win the 2016 U.S. presidential election?

https://www.predictit.org/api/marketdata/ticker/USPREZ16

 

Contract: Will Hillary Clinton win the 2016 U.S. presidential election?

 

https://www.predictit.org/api/marketdata/ticker/CLINTON.USPREZ16


Finally, the format for the API URL to return data for all active markets is:

 

To change the return type for any of the above, add one of the following to the request header.

Accept: application/xml

Accept: application/json