Thursday, February 6, 2020

Predict-It Python API

The PredictIt website provides a variety of non-standard betting markets (politics, world events, etc.). Utilizing PredictIt's public REST API, I have uploaded an initial version of python code that retrieves various Market and Contract data.

To try this code, check out my public "Misc-python" GitHub repository:
https://github.com/mdhatmaker/Misc-python

The PredictIt python code is in the "/Apis/predict-it" folder within this repository.

If you'd like to see the REST API description that I used to create this code, check out the following link:
https://predictit.freshdesk.com/support/solutions/articles/12000001878-does-predictit-make-market-data-available-via-an-api-

I have started looking at more advanced sample code that implements additional functionality (such as actual trading of contracts). As I make progress, I'll post updates here.




3 comments:

  1. The project demonstrates a practical use of Python for interacting with a public REST API, retrieving market and contract data programmatically. Organizing the API code into a dedicated project folder also makes the example useful for understanding how external services can be accessed and integrated into Python applications. A FastAPI Course can provide additional practice with building and working with modern API-based applications.

    ReplyDelete
  2. It is also interesting that the project begins with retrieving data and then considers more advanced functionality for working with contracts. This progression shows how an API integration can evolve from basic data retrieval toward richer application capabilities while keeping the API interaction structured. Developers looking to strengthen their understanding of API concepts can explore a RESTful API Course.

    ReplyDelete
  3. It is also interesting that the project begins with retrieving data and then considers more advanced functionality for working with contracts. This progression shows how an API integration can evolve from basic data retrieval toward richer application capabilities while keeping the API interaction structured. Developers looking to strengthen their understanding of API concepts can explore a Python Projects For Final Year

    ReplyDelete