A package for interacting with PredictIt markets
Project description
predictit_markets
Simple Python code that helps to retrieve predictit market data.
data
Given a number, returns a Pandas dataframe of the market data. It attempts to grab the last 90 days, but can be changed to 24h,7d, or 30d as well. Constructor defaults to '90d', but can take the other dates as an argument.
df = data(6598)
print(df.head())
market_name
print(market_name(6598))
Returns the name of the market as a string.
Which party will win Washington in the 2020 presidential election?
That's all there is to it. Predictit's API is in XML format, which I thought was a pain, and they have download buttons for every market. I found this and it helped me understand the urls that are used to download the market CSV's so I recreated it for Python. I didn't see anything else like this posted, and I figured it may help someone else down the line. Was considering putting this as a package, but it doesn't seem like it would be worth it.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for predictit_markets-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00fbeb069a866f8c61ddce90d3dbe4b14fe690576c9c4d62ce06556fdb4dfea2 |
|
MD5 | dc85a1aa8f50b2a0a6c5017d6652a449 |
|
BLAKE2b-256 | acf96a1ad60ecfb5170b8714e39988f3f580df83c043744fe77c9bc7d2a3f9cc |