Add prediction market consensus commands to your Discord server โ slash commands for live NBA, NHL, MLB consensus and divergence alerts.
Connect your Discord bot to Meridian Edge to access real-time prediction market consensus from 25+ regulated sources. Add slash commands that let your community query live prediction market probabilities.
pip install discord.py requestsimport discord
from discord.ext import commands
import requests
intents = discord.Intents.default()
bot = commands.Bot(command_prefix="!", intents=intents)
API_KEY = "me_live_YOUR_KEY"
HEADERS = {"X-API-Key": API_KEY}
@bot.slash_command(name="consensus", description="Get prediction market consensus")
async def consensus(ctx, sport: str = "NBA"):
await ctx.defer()
r = requests.get(
"https://meridianedge.io/api/v1/consensus",
headers=HEADERS,
params={"sport": sport.upper(), "limit": 5}
)
events = r.json().get("events", [])
if not events:
await ctx.respond(f"No active {sport} events found.")
return
embed = discord.Embed(
title=f"๐ {sport.upper()} Prediction Market Consensus",
color=0xD4662C
)
for e in events[:5]:
prob = round(e["consensus_prob"] * 100)
embed.add_field(name=e["title"], value=f"{prob}%", inline=False)
embed.set_footer(text="meridianedge.io | Not investment advice")
await ctx.respond(embed=embed)
bot.run("YOUR_DISCORD_BOT_TOKEN")Get your Meridian Edge API key and deploy this Discord bot to start sharing prediction market consensus with your community.
View Plans → API Reference