Overview
Bayse Embed lets you add live prediction market widgets to any webpage. Markets update in real
time via WebSocket β your readers always see the current YES/NO prices without refreshing.
There are two ways to use the embed. The script tag version works on any website with no
framework needed. The React component version is for developer sites and Next.js apps.
Both versions are read-only β your readers see live prices and can click through to trade on
Bayse. No API keys required to display markets.
Project Repository: github.com/Mudigram/bayse-embed
Installation
Add the embed script to your page once, then place as many market tags as you need.
1
Add the script tag to your page
<script src="https://cdn.bayse.markets/embed.js"></script>
2
Drop the market tag wherever you want the widget
<bayse-market slug="your-market-slug"></bayse-market>
3
Done β the widget renders and connects to live prices
automatically.
React
Install the package from npm:
npm install bayse-markets-embed
Then import and use the component:
import { BayseMarket } from 'bayse-markets-embed'
export default function MyPage() {
return (
<BayseMarket
slug="your-market-slug"
variant="full"
currency="USD"
/>
)
}
Props
All props apply to both the web component attributes and the React component props.
| Prop |
Type |
Default |
Description |
| slug |
string |
β |
Required. The market slug from the Bayse URL. |
| variant |
"full" | "compact" |
"full" |
Full card with all stats or compact inline version. |
| currency |
"USD" | "NGN" |
"USD" |
Display prices in USD or Nigerian Naira. |
| onTrade |
(slug: string) => void |
Opens Bayse |
React only. Override the trade button behaviour. |
Variants
There are two widget variants. Enter any market slug below to see a live preview of both.
Full
Shows the market question, YES/NO prices, probability bar, volume, liquidity, and a Trade on
Bayse button. Best for dedicated embed placements, sidebars, and article footers.
Compact
A minimal inline card with just the prices and probability bar. Best for link previews, inline
callouts, and tight layouts.