Skip to main content
Get prediction market embeds on your website in under 5 minutes.

Step 1: Choose a Thread

First, fetch a list of available threads from our API:
cURL
You’ll get a response like this:
Response
Copy the id field from the thread you want to embed.

Step 2: Add the Iframe

Add this HTML to your website, replacing {threadId} with the ID from Step 1:
HTML
Replace your-site-name in the source parameter with your actual website name. The source label shows up in embed analytics so you can see where your traffic comes from.

Step 3: Style the Container (Optional)

Wrap your iframe in a container for better responsive design:
HTML

Step 4: Add Event Listeners (Optional)

Track user interactions with the embed:
JavaScript

Complete Example

Here’s a complete, production-ready example:
HTML
Different embed types work best at specific dimensions:
Always use width="100%" for responsive design. Only the height needs to be fixed.

Troubleshooting

Iframe not loading?

  1. Check the thread ID - Make sure you’re using a valid thread ID from the API
  2. Verify the URL - The format should be exact: https://app.kash.bot/threads/{id}/iframe
  3. Check CORS policies - Some Content Security Policies may block iframes
  4. Test in incognito - Ad blockers sometimes interfere with embed loading

Embed looks broken on mobile?

Reduce the iframe height attribute for mobile devices using CSS media queries:
CSS

Interested in earning revenue share?

Organizations and partners earn a share of trading fees on trades in markets they create — embeds are a great way to drive that activity. See Kash for businesses or contact partnerships@kash.bot. The ?source= parameter is an analytics label for your embed traffic; it does not by itself set up revenue sharing.

Next Steps

API Endpoints

Explore all available API endpoints

Iframe Guide

Learn more about iframe embedding options

Examples

View React and vanilla JS examples