Skip to main content
This guide runs against staging (api-staging.kash.bot, Solana devnet). Going live is the same flow against api.kash.bot with a kash_live_ key.

1. Create a Kash web app account

Sign up at staging.kash.bot. The account you create owns your API keys and the smart account your trades run from.

2. Create an API key

In the Kash web app, open Settings → API Keys and create a key:
  1. Name it (for example local dev).
  2. Choose its scopes. For this guide: markets:read, markets:quote, trades:read and trades:write. See scopes.
  3. Optionally set an IP allowlist.
  4. Optionally set a webhook URL to receive trade events (step 7).
The key is shown once:

3. List markets

The API serves 2026-08-19 by default. The examples send X-Kash-Api-Version: 2026-08-19 to pin it, so a future default change cannot alter your integration. See API versions.
Pick a market whose tradeable is true. 403 INSUFFICIENT_SCOPE means the key lacks markets:read; 429 means you hit your rate limit (see Retry-After).

4. Get a quote

The quote amount is in atomic USDC (10000000 is 10 USDC). The response gives quote.tokensOut (outcome tokens, 18 decimals), quote.effectivePrice and quote.impliedProbability, plus market.tradeable.

5. Place a trade

Your smart account needs USDC for a buy.
The trade amount is a decimal USDC string ("10" is 10 USDC), unlike the atomic amount in the quote. The answer is 201 Created:
The status moves pending → validating → executing → completed, or ends in failed or rejected.

6. Watch it complete

When it completes, txHash holds the Solana transaction signature and tokensOut the tokens received. Rather than polling, use a webhook.

7. Receive a webhook

If the key has a webhook URL, a trade.completed event was POSTed to it:
With these headers:
Always verify the signature before acting on an event. See Verifying signatures.

8. Use the SDK

The TypeScript SDK handles headers, versions, retries, idempotency and webhook verification:
Full reference: TypeScript SDK.

What next?

Build a trading bot

An end-to-end bot with the SDK.

Webhooks

A verified, deduplicated receiver.

Idempotency

Retry trades without duplicates.