Quickstart
About two minutes from sign-up to your first match.
1. Sign up
Go to layer-eight.vercel.app and click Get API access. Sign in with GitHub, Google, Discord, a wallet, or email.
2. Create a key
Onboarding asks you to accept the terms and what you're building, then creates your first key. It starts with lyr_.
Copy it right away — it's shown once. Layer only stores a hash of it. You can create, name, revoke and rotate keys any time on your dashboard.
Put it in your shell once, so the commands below run as-is:
export LAYER_KEY="lyr_your_key"
3. List live matches
curl -H "authorization: Bearer $LAYER_KEY" \
"https://layer-eight.vercel.app/v0/matches?limit=3"
You get back pairs of markets — one on Kalshi, one on Polymarket — that pay out the same way:
{
"count": 3,
"matches": [
{
"kalshi": {
"market_id": "KXEFLL1BTTS-26SEP26BRABAR-BTTS",
"event": "Bradford vs Barnsley: BTTS — BRA vs BAR (Sep 26)",
"question": "Both Teams To Score"
},
"polymarket": {
"market_id": "0xfb79…",
"question": "Bradford City AFC vs. Barnsley FC: Both Teams to Score",
"yes_token_id": "…"
},
"event_date": "2026-09-26",
"confidence": 0.85,
"basis": "equivalent_with_caveats",
"caveats": ["postponement_differs", "source_differs"]
}
]
}
Your matches will differ — markets open and close every day. What the fields mean:
confidence— how sure Layer is that the two markets are the same bet, from 0 to 1.basis—identicalif the rules match exactly, orequivalent_with_caveatsif they pay out the same except in an edge case.caveats— which edge cases differ.postponement_differs: the venues handle a postponed or cancelled event differently.source_differs: they settle using different data sources. The full list is in the Overview.
4. Look up one market
Take any market_id from your step 3 response — from either venue — and ask for its twin:
MARKET_ID="paste_a_kalshi_market_id"
curl -H "authorization: Bearer $LAYER_KEY" \
"https://layer-eight.vercel.app/v0/match?venue=kalshi&market_id=$MARKET_ID"
With jq installed, you can grab one straight from the list instead:
MARKET_ID=$(curl -s -H "authorization: Bearer $LAYER_KEY" \
"https://layer-eight.vercel.app/v0/matches?limit=1" | jq -r '.matches[0].kalshi.market_id')
It works both ways: pass venue=polymarket with a Polymarket id and you get the Kalshi market back.
Limits
- 60 requests per minute per key. Over that you get
429 rate_limitedwith aretry-afterheader. - Keys can be sent as
authorization: Bearer <key>orx-api-key: <key>.
Next
- API reference — all fields, errors and "no match" reasons.