Skip to main content
The Public Embed API lets anyone show Kash prediction markets on their own website. It has three parts:
  • Iframe embeds. Drop-in widgets for a single market or a thread of markets.
  • Public read endpoints. JSON endpoints for threads and markets, which you can call from a browser on any origin.
  • X (Twitter) deep links. Ready-made twitter.com/intent/tweet URLs. When a user posts one, the Kash trading bot reads it and places their prediction. This only works for users who have connected their X account to the Kash web app. The trade is submitted from the user’s own self-custodial wallet.
Everything here is read-only and anonymous. To trade, users either post a deep-link tweet or open the market on app.kash.bot.

Iframe embeds

Market and thread widgets

X deep links

Tweet links that place predictions

Read endpoints

Threads and markets

No API key

No sign-up and no authentication

Base URL

Iframe embeds use these page URLs:

Endpoints

Threads

A thread is a curated collection of related markets.

Markets

Authentication and CORS

No API key is needed. Every GET endpoint above returns Access-Control-Allow-Origin: *, so you can call it with fetch from any web page. Because the origin is a wildcard, browsers do not send cookies, so make requests without credentials. POST /api/twitter-links is the one exception. It requires a CSRF token, so you can call it from a server but not from a browser on another origin. Its page explains how.

IDs

All IDs are UUIDs. An ID that is not a valid UUID returns 400 VALIDATION_ERROR, and a valid UUID that matches nothing returns 404 NOT_FOUND.

Units and chains

  • USDC amounts such as totalVolume and seedAmountAtomic are atomic units with 6 decimals, so 35000000 is 35 USDC. Some fields return these as numbers and others as strings. Each endpoint page says which.
  • Outcome-token amounts such as shareSupply, and AMM values, are WAD strings with 18 decimals.
  • Timestamps. endTime is milliseconds since the epoch. expiresAt, freezeAt and resolveTime are seconds since the epoch. Other timestamps are ISO 8601 or Postgres timestamp strings.
  • Chains. New markets run on Solana, with chainId 9000001 and base58 contractAddress values. Earlier markets ran on Base, with chainId 8453 and 0x addresses. Those older markets still appear in resolved results while Base is phased out.

Prices and implied probability

Show outcomes[].impliedChance (or currentImpliedChance for the first outcome) as each outcome’s market-implied probability. On /api/markets, /api/markets/:id and the state endpoints, each outcome’s probability is set to the same value as its impliedChance, and priceKnown is false when there is no price yet. The thread-markets list returns the AMM’s raw marginal probability instead, so read impliedChance there too.

Pagination

List endpoints take limit and offset and return:
offset goes up to 10,000. The maximum limit differs by endpoint.

Rate limits

Limits apply per IP address. Endpoints in the same group share one budget. Read the current values from the X-RateLimit-* headers. Some responses are served from a cache before the limit is checked, and those don’t count. Responses the CDN can’t cache carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (a Unix time in milliseconds). When you go over a limit, you get 429 with a Retry-After header:

Errors

Errors use one envelope:

Support

Technical support

Send technical questions from the info button in the Kash web app → Feedback

Community

Ask other builders in the Kash Discord