PYTHON · DASHBOARD

Meridian Edge + Streamlit

Build a live prediction market dashboard with Streamlit — NBA, NHL, MLB consensus with auto-refresh, divergence highlighting, and sport filters.

Connect Streamlit to Meridian Edge to access real-time prediction market consensus from 25+ regulated sources. Build an interactive research dashboard in under 50 lines of Python.

Requirements

Installpip install streamlit requests

Integration Code

Streamlit Dashboardpython
import streamlit as st
import requests
import pandas as pd
import time

API_KEY = "me_live_YOUR_KEY"
HEADERS = {"X-API-Key": API_KEY}

st.set_page_config(page_title="Prediction Market Consensus", layout="wide")
st.title("Prediction Market Consensus")

sport = st.selectbox("Sport", ["NBA", "NHL", "MLB", "MLS"])
auto_refresh = st.checkbox("Auto-refresh (30s)", value=True)

@st.cache_data(ttl=30)
def fetch_consensus(sport):
    r = requests.get(
        "https://meridianedge.io/api/v1/consensus",
        headers=HEADERS,
        params={"sport": sport, "limit": 20}
    )
    return r.json().get("events", [])

events = fetch_consensus(sport)
df = pd.DataFrame(events)

if not df.empty:
    df["consensus_%"] = (df["consensus_prob"] * 100).round(1)
    df["divergence_%"] = (df.get("divergence_pct", 0) * 100).round(1)
    st.dataframe(
        df[["title", "consensus_%", "divergence_%", "market_count"]],
        use_container_width=True
    )

if auto_refresh:
    time.sleep(30)
    st.rerun()

Try it — API key in 10 seconds

Get your API key and deploy this Streamlit app in minutes — local or on Streamlit Cloud.

View Plans → API Reference

Frequently Asked Questions

How do I build a prediction market dashboard with Streamlit?
Use requests to call the Meridian Edge /api/v1/consensus endpoint and load the events into a pandas DataFrame. Display with st.dataframe and use st.cache_data(ttl=30) for efficient auto-refresh.
What does Streamlit + Meridian Edge cost to deploy?
Yes. Streamlit Cloud has a starter tier. Meridian Edge starter tier: 100 calls/day. Get a key at meridianedge.io/#pricing.