Query real-time prediction market consensus data in Python. Install with pip, call in three lines.
See Plans →Summary: Python SDK for prediction market consensus data. pip install meridianedge. Query probabilities, divergence, and settlements in three lines of code.
pip install meridianedge
The SDK requires Python 3.8+. No external dependencies beyond requests.
from meridianedge import MeridianEdge
client = MeridianEdge(api_key="your-api-key")
# Get consensus probabilities for NBA events
nba = client.consensus(vertical="sports", sport="NBA")
for event in nba["data"]:
print(f'{event["question"]}: {event["probability"]:.0%}')
| Method | Returns |
|---|---|
client.consensus() | Aggregated probabilities for active events |
client.opportunities() | High-divergence events across platforms |
client.markets() | All active markets with metadata |
client.settlements_recent() | Recently resolved events with outcomes |
client.sports("NBA") | Today's data for a specific sport |
client.status() | API health check (no auth required) |
The SDK works as a data source in any Python agent framework. Use it as a LangChain tool, a CrewAI data source, or a LlamaIndex query engine. For Claude and Cursor integration, see the MCP server guide.
The SDK raises MeridianError for API errors with status code, message, and detail fields. Automatic retries handle transient network errors and rate limit responses (429).
Run pip install meridianedge. The SDK requires Python 3.8+ and handles authentication, retries, and rate limiting automatically.
Yes. The meridianedge Python SDK can be used as a tool or data source in LangChain, CrewAI, LlamaIndex, and any Python agent framework. For Claude-native integration, use the MCP server.
No. All data accessed through the SDK is for informational purposes only and does not constitute investment, financial, or trading advice. Prediction market participation involves risk of loss.
Starter plan includes API access, the live dashboard, divergence alerts, and email digests.
See Plans →