Overview#
Kalshi and Polymarket US often list the same real-world bet — the same game, the same player's line — but word it differently and give it different ids. Layer tells you which Kalshi market and which Polymarket US market are the same bet, so your code can treat them as one. It also pairs Kalshi with polymarket.com, with Hyperliquid (games, season winners, crypto prices, IPOs), and with Novig for sports game lines.
How Layer fits together#
You work with one SDK, and two kinds of call go through it:
- Hosted by Layer: which markets are the same bet.
client.matches()andclient.match()ask Layer's API, which you can also call directly. - On your machine: everything that touches a venue. Prices, order books, paper trades and live orders go straight between your code and each venue, with your own keys. Layer never sees your venue keys, prices or orders.
What you can do today#
Hosted by Layer
- List every live match —
GET /v0/matchesreturns pairs of markets, one from each venue, that pay out the same way. - Look up one market —
GET /v0/matchtakes a Kalshi, Polymarket, Hyperliquid or Novig market id and returns its twin on the other venue, or, once a market has settled, how both venues settled it.POST /v0/matchdoes the same for up to 50 markets in one call. - See how sure Layer is — every match carries a confidence and the rule differences between the venues (for example, different data sources).
- Check Layer's track record —
GET /v0/settlementslists how every match settled on both venues, with totals, and can be filtered to one kind of market. - Get told when matches change — webhooks send
match.live,match.pulledandmatch.settledto your server. - See how much you can trade —
GET /v0/quotetakes a matched Kalshi market, reads both live order books and returns the most contracts that still clear your minimum edge after fees (Kalshi with Polymarket US or polymarket.com). - Check a trade's profit and size —
POST /v0/profitandPOST /v0/sizework out both venues' fees, net profit, the size that still clears your minimum edge, and return per day, from prices and books you send, for Kalshi with either Polymarket. The same math runs on your machine in the SDK (uselayer.calc).
In your code, with the Python SDK
- Read live prices and order books from Kalshi and Polymarket US, with your own keys.
- Price both sides of a match after fees —
quote()reads both live books. - Paper trade and backtest against real order books with simulated money.
- Trade on Kalshi and Polymarket US — live orders, fills, positions and balances, with your own key on each venue, inside guardrails you set.
In a terminal — the uselayer command line runs lookups and profit checks without code.
For AI agents — every page here is also Markdown at its URL plus .md (this one: /docs/index.md). /llms.txt lists them all, and /llms-full.txt is all of them in one file.
What Layer does not do yet#
- Trading through the API. The API never places a real order. Orders go from the SDK on your machine to the venue, with your own key.
- Every market. Only markets that exist on both venues and have passed Layer's checks are matched.
Key ideas#
| Term | Meaning |
|---|---|
| Market | One yes/no contract on one venue, e.g. Kalshi's "Cut 25bps" or one side of a Polymarket game. |
| Event | A group of markets about one thing, e.g. "Fed decision in October". |
| Match | A Kalshi market and a Polymarket, Polymarket US, Hyperliquid or Novig market that pay out in the same situations. |
| Basis | identical, or equivalent_with_caveats when the rules differ on an edge case. |
| Caveats | Which rule differs: source_differs, timing_differs, rounding_differs, carveout_differs, definition_differs. |
| Caveat notes | How it differs, quoting what each venue's rules say. The SDK writes them on your machine; the API sends the codes. |
| Tier | Who approved the match: human_verified (a person) or auto_verified (Layer's graders). |
Settlement policies#
A match means both markets pay out the same way on the result. When the event doesn't happen normally, each venue follows its own policy, and payouts can differ:
- Cancelled, postponed or abandoned events. Kalshi usually settles at a fair price if a game doesn't start within its window; Polymarket may wait for the makeup game, resolve 50-50, or resolve No.
- Players who don't play. Player props pay differently when the player is inactive or never takes the field. Polymarket usually resolves the market Under (so its "over" line pays nothing), while Kalshi usually settles it at a fair price from before the game. If you hold a player's line on both venues and the player sits out, the two positions don't cancel out.
These policies apply to nearly every match, so Layer doesn't list them on each one. If you hold positions on both venues, a cancelled or postponed event can leave them paying differently. Read each venue's rules before trading.
Next#
- Quickstart — get a key and make your first request.
- API reference — every endpoint and field.
- How matching works — how Layer decides two markets are the same bet.
- Python SDK — prices, paper trading and orders on your machine. Command line — the terminal.