Client API wrapper for PredictIt
Project description
PredictIt API Client
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
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)
Built Distribution
Close
Hashes for predictit_client-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dda14aec3610b3006875065affc12b125da72e7d515537f7ccdc2737791e7b1 |
|
MD5 | e10ed57f6b367bd688237a0c1a870fc4 |
|
BLAKE2b-256 | 68e9e07ca0adcfeefffc3e54d91e3cb08619a34882cccb41104ae9d2ea5c7bbc |