A prediction market bot queries the consensus API on a schedule, identifies signals worth acting on, and sends alerts or triggers logic. Here's the full pattern.
A basic prediction market bot has four components:
Visit meridianedge.iothe pricing page. Enter your email and your key appears instantly. The starter tier gives you 100 calls/day — enough to poll all sports every 15 minutes.
import requests, time, json
API_KEY = "me_live_your_key_here"
HEADERS = {"X-API-Key": API_KEY}
BASE = "https://meridianedge.io/api/v1"
def fetch_consensus(sport="NBA", limit=20):
r = requests.get(f"{BASE}/consensus",
headers=HEADERS,
params={"sport": sport, "limit": limit})
r.raise_for_status()
return r.json().get("events", [])def find_divergence(events, threshold=0.04):
"""Return events where markets disagree by more than threshold."""
return [
e for e in events
if e.get("divergence_pct", 0) >= threshold
]import smtplib
from email.mime.text import MIMEText
def alert(event):
title = event["title"]
prob = event["consensus_prob"]
div = event["divergence_pct"]
print(f"SIGNAL: {title} | prob={prob:.0%} | div={div:.1%}")
# Add Slack/email/webhook call hereimport schedule
def job():
events = fetch_consensus("NBA")
signals = find_divergence(events)
for e in signals:
alert(e)
schedule.every(5).minutes.do(job)
while True:
schedule.run_pending()
time.sleep(30)Plans start at $29/mo. 1,000 calls/day. Key in 10 seconds.
View Plans →Need more? Starter ($29/mo) — 1,000 calls/day + divergence signals