Skip to main content

Client API wrapper for PredictIt

Project description

PredictIt API Client

python-unittest Actions Status License: MIT

PredictIt API Client for Python. Python 3+ required.

Installation

pip install predictit-client

Usage

from predictit_client import Client

Get all markets

market_id = 2721
client = Client()
markets = client.get_all_markets() # -> List[Market]

Get single market

market_id = 2721
client = Client()
market = client.get_market_with_id(market_id) # -> Optional[Market]

Market Fields

market_id: int  
name: str  
short_name: str  
image_url: str  
url: str  
contracts: List[Contract]  
time_stamp: str  
status: str

Contract Fields

contract_id: int  
date_end: str  
image_url: str  
name: str   
short_name: str  
status: str  
last_trade_price: float  
best_buy_yes_cost: float  
best_buy_no_cost: float  
best_sell_yes_cost: float  
best_sell_no_cost: float  
display_order: int  

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

predictit-client-0.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

predictit_client-0.2-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page