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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file predictit-client-0.2.tar.gz.

File metadata

  • Download URL: predictit-client-0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for predictit-client-0.2.tar.gz
Algorithm Hash digest
SHA256 f68fbc688a5053876514c2a39d39060db515b3b2ac9d28e0adc1699fe6b6f38c
MD5 94ba89b98022ecc45cb0a84152d4f4fe
BLAKE2b-256 a7c679212dd0d14509ba8781a4e1f3adf475305eba97cd8c32f3baa3030b18e7

See more details on using hashes here.

File details

Details for the file predictit_client-0.2-py3-none-any.whl.

File metadata

  • Download URL: predictit_client-0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for predictit_client-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8dda14aec3610b3006875065affc12b125da72e7d515537f7ccdc2737791e7b1
MD5 e10ed57f6b367bd688237a0c1a870fc4
BLAKE2b-256 68e9e07ca0adcfeefffc3e54d91e3cb08619a34882cccb41104ae9d2ea5c7bbc

See more details on using hashes here.

Supported by

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