Skip to main content
You don’t need an API key. You can make every request on this page from a terminal or a browser.

Step 1: Find a market

List live markets and pick one:
cURL
Response (trimmed)
Copy the market’s id.

Step 2: Add the iframe

HTML
Replace {marketId} with the ID from step 1. Any site can frame the embed pages. They send Content-Security-Policy: frame-ancestors *. See Thread iframe for the thread widget.

Step 3: Listen for embed events (optional)

The thread embed posts messages to the parent page. Each message is { type, data, origin, timestamp }, and type always starts with kash-:
JavaScript

Step 4: Build your own UI (optional)

If you’d rather render markets yourself, read them from the JSON endpoints and add a “Predict on X” button with a deep link:
JavaScript

Troubleshooting

  • The embed shows “not found”. Check the ID. Market and thread embeds need a UUID.
  • A thread embed shows no markets. The thread has no live markets. Check with GET /api/threads/{id}/markets.
  • The deep-link endpoint returns 400. The market is no longer accepting predictions, because it isn’t ACTIVE or it has expired.
Creators receive a creator fee on trades in markets they create, wherever the trade happens; it depends on trading activity and is not guaranteed. See Creating Opportunities.

Next steps

API overview

Endpoints, rate limits and errors

Markets endpoint

Filtering, search and pagination

Examples

React, HTML and plain JavaScript