Load live prediction market consensus into Jupyter for research, backtesting, and visualization. Works with pandas, matplotlib, and plotly.
Connect Jupyter to Meridian Edge to access real-time prediction market consensus from 25+ regulated sources. Ideal for research, calibration analysis, and building prediction models.
pip install requests pandas matplotlibimport requests
import pandas as pd
import matplotlib.pyplot as plt
API_KEY = "me_live_YOUR_KEY"
HEADERS = {"X-API-Key": API_KEY}
BASE = "https://meridianedge.io/api/v1"
# Fetch NBA consensus
r = requests.get(f"{BASE}/consensus",
headers=HEADERS, params={"sport": "NBA", "limit": 20})
df = pd.DataFrame(r.json()["events"])
# Display divergence summary
print(df[["title","consensus_prob","divergence_pct","market_count"]].head(10))
# Plot probability distribution
fig, ax = plt.subplots(figsize=(10, 4))
ax.barh(df["title"].str[:40], df["consensus_prob"],
color=["#22c55e" if p > 0.65 else "#f59e0b" if p > 0.45 else "#ef4444"
for p in df["consensus_prob"]])
ax.set_xlabel("Consensus Probability")
ax.set_title(f"NBA Prediction Market Consensus ({pd.Timestamp.now().strftime('%Y-%m-%d')})")
plt.tight_layout()
plt.show()
# Divergence analysis
print("\nHigh-divergence events:")
print(df[df["divergence_pct"] > 0.04][["title","consensus_prob","divergence_pct"]])Get your API key and run this notebook to start analyzing live prediction market data right away.
View Plans → API Reference