{"openapi":"3.1.0","info":{"title":"Slay Predict API","version":"1.21.0","summary":"Accounts, Slay IDs, wallets, Points, social graph and deposits for Slay Predict.","description":"Slay Predict lets people trade prediction markets on Hyperliquid and Polymarket with a Slay ID.\n\nThis API covers everything around the trade: signing in, the user's Slay ID and wallet, Points and the leaderboard, follows, and bringing money in from other networks. **Trading itself never goes through this API.** Orders are signed in the user's browser with keys only the user holds, and funds stay in the user's own wallets (Cash on Hyperliquid, pUSD on Polygon for Polymarket). Slay never has custody of a Predict user's money."},"servers":[{"url":"https://api.slay.money/api/predict","description":"Production"}],"tags":[{"name":"Sign-in","description":"Get a session: email or Slay ID with a one-time code, or Google / Telegram through Magic."},{"name":"Account","description":"The signed-in user: account, Slay ID, Points."},{"name":"Wallet","description":"Map the user's Magic wallet to their Slay ID, and Magic's identity bridge."},{"name":"Deposits","description":"Bring money in from other networks or by card, and see every deposit."},{"name":"Withdrawals","description":"Move Cash out to any network, signed by the user's own wallet."},{"name":"Markets","description":"Market data Hyperliquid no longer serves, such as settled markets."},{"name":"Market data","description":"Every live market on Hyperliquid HIP-4 and Polymarket in one list, with each market on both venues linked option by option; any side's order book and price history. Public, no session, CORS open. Served by the Predict site: base URL `https://www.slay.money/api`. Settled markets and who won: `GET /settled` on the Slay API."},{"name":"Polymarket","description":"Polymarket's markets in Slay's market shape: the catalog the app lists, search across every live event, a category's next page, one event by id, and the price to beat of a timed Up or Down market. Public, cached at the edge, no session. Served by the Predict site, so the base URL is `https://www.slay.money/api`. Trading happens in the user's browser from their own Polymarket wallet; nothing here places orders."},{"name":"Social","description":"Public profiles, the follow graph and the leaderboard."},{"name":"Identity provider","description":"OpenID Connect discovery for Magic (Slay as Magic's identity provider).","x-internal":true},{"name":"Platform","description":"Endpoints browsers and payment providers call on their own.","x-internal":true}],"x-guides":[{"id":"quickstart","title":"Quickstart","body":"Sign a user in with a code to their email, then read their account.\n\n1. `POST /auth/start` with `{ \"identifier\": \"ayush\" }` (a Slay ID or an email). The code goes to the email on the account; the response shows it masked.\n2. `POST /auth/verify` with the identifier and the 6-digit code. You get `{ \"token\" }`.\n3. Send `Authorization: Bearer <token>` on every call. `GET /me` returns the account, Slay ID, wallet and Points.\n4. A new user has no Slay ID yet (`profile: null`): `POST /profile` with the handle they pick.\n5. Open the user's Magic wallet in the browser, then `POST /wallets/magic` with a Magic DID token to map it to the Slay ID."},{"id":"authentication","title":"Authentication","body":"Every sign-in returns `{ token }`, a **Predict session token** (`sp_…`). Send it as `Authorization: Bearer <token>`. It lasts 30 days and renews itself while in use; `POST /auth/logout` ends it.\n\nA Predict session works **only on this API**. It can't call the Slay app's routes or touch the Slay (Canton) wallet, so a leaked Predict token can't reach anything beyond Predict.\n\n- **401** means the session is gone: sign in again.\n- **503** means a transient failure: **keep the token** and retry with backoff. Treating 503 as signed-out logs real users out.\n- **403 `ACCOUNT_BANNED`** means the account is suspended; every authenticated call answers the same way.\n\nStore the token like a password: never in URLs or logs, and only on origins you control.\n\nClients holding a session from before Predict sessions existed (a Slay session) exchange it once with `POST /auth/upgrade`; the old session is revoked."},{"id":"identity","title":"Identity model","body":"A Predict user **is** a Slay account. One account can hold:\n\n| Piece | Rule |\n|---|---|\n| Slay ID (`@handle`) | Shared with the Slay app. 2–32 of `a-z 0-9 . _ -`. An existing Slay user keeps theirs. Reserved words are refused. |\n| Trading wallet | The user's Magic EVM wallet. The first proven wallet becomes the trading wallet and is never overwritten. |\n| Wallet registry | One owner per address, ever. A wallet linked to one Slay ID can't be linked to another. |\n| Social logins | Google (keyed by Google's `sub`) and Telegram (keyed by wallet), each pointing at one account. |\n| Canton wallet | The Slay app's own wallet. Untouched by Predict; a Slay ID can have both. |\n\nSigning in with Google finds the account by the verified Google email, so an existing Slay user lands in their own account."},{"id":"money","title":"Deposits and withdrawals","body":"Cash is **USDC in the user's Hyperliquid spot balance**, on their own wallet. Slay never holds it.\n\n**Crypto in.** `GET /deposit-networks` lists the networks and coins. `GET /deposit-address/{network}` returns the user's deposit address for that network (one address for every EVM network; Solana when it's enabled), which belongs to this user only: whatever lands there is converted to USDC on Hyperliquid and credited to *their* wallet (each address is bound to the wallet it was made for). `GET /deposit-address/{network}/activity` follows what was sent to it; a coin that's waiting is picked up automatically.\n\n**Card, Apple Pay, Google Pay.** `GET /funding` says whether cards are offered where the visitor is and which provider is live (`provider`). With Crossmint, `POST /card/order` returns an embedded-checkout URL and `GET /card/orders/{id}` follows the order; the USDC lands in the user's Cash (rail `hyperliquid`, through their deposit address) or their wallet on Polygon (rail `polygon`). With Swapped, `POST /swapped/url` returns a signed widget URL that sends USDC to the user's Hyperliquid address or Polygon wallet.\n\n**History.** `GET /deposits` lists the last 20 converted deposits with their status (`waiting`, `pending`, `success`, `failure`, `refund`). A refund goes back to the wallet it came from.\n\n**Withdrawals** (when `GET /withdraw/enabled` says so):\n1. `POST /withdraw/quote` with `{ chainId, to, usd, token? }` returns `steps` (minimum $2; a Slay deposit address is refused as the destination). `token` can be `USDT`, or `PUSD` on Polygon to fund the user's Polymarket wallet.\n2. The user's wallet signs the `authorize` step (EIP-712); send the step's body and the signature to `POST /withdraw/authorize`, which checks it's the user's own wallet and passes it on.\n3. The wallet sends the `deposit` step's Hyperliquid `sendAsset` with the given nonce. Poll the step's `check` endpoint until `success`.\n\n`GET /withdrawals` lists the last 20; `GET` / `POST /withdraw/addresses` keep the user's saved destinations."},{"id":"profiles","title":"Building a profile","body":"A profile is the account (`GET /profiles/{handle}`: name, photo, followers) plus its trading, read **straight from Hyperliquid's public info API** for `wallet`:\n\n| Section | Hyperliquid request |\n|---|---|\n| Chart, volume | `portfolio` (day / week / month / allTime: `accountValueHistory`, `pnlHistory`, `vlm`) |\n| Open predictions | `spotClearinghouseState`: balances whose coin starts with `+` (`+123450` = outcome coin `#123450`) |\n| Orders | `frontendOpenOrders` (`origSz` minus `sz` = filled) |\n| Settled | `userFills` with `dir: \"Settlement\"`: `px` 1 = won, 0 = lost; `closedPnl` is the profit |\n| Activity | `userFills`, `historicalOrders`, `userNonFundingLedgerUpdates` (`send` in / out, `deposit`) |\n\nCoin `#N` is outcome `floor(N / 10)`, side `N % 10` (0 = Yes / the named option, 1 = No / against it). Hyperliquid drops a market from `outcomeMeta` once it settles; `GET /outcomes?ids=` still returns it, in the same shapes.\n\nYour own profile: `POST /profile/edit` changes the display name and Slay ID (check `GET /handles/{handle}` first); `POST /profile/photo` sets the photo."},{"id":"errors","title":"Errors","body":"Errors are JSON: `{ \"error\": \"<message for a person>\", \"code\"?: \"<machine code>\" }`. The message is safe to show to the user as is. The one exception is `503 MAINTENANCE`, which answers `{ \"message\", \"code\": \"MAINTENANCE\" }`.\n\n| Status | Meaning |\n|---|---|\n| 400 | The request is wrong (bad identifier, wrong code, invalid or reused proof). Fix and retry. |\n| 401 | Not signed in, or the session expired. |\n| 403 | Suspended account (`ACCOUNT_BANNED`), the invisible human check failed (`HUMAN_CHECK`), or card payments / withdrawals aren't open for this account. |\n| 404 | No such Slay ID or order. |\n| 409 | Conflict: Slay ID taken, wallet owned by another Slay ID, Slay ID or wallet not set up yet. |\n| 413 | Photo over 5 MB. |\n| 415 | Photo isn't JPEG, PNG or WebP. |\n| 429 | Rate limited. |\n| 500 | Signed in, but no session came back. Retry. |\n| 502 | An upstream (Relay, Crossmint) failed. |\n| 503 | Transient failure, or sign-ups paused (`code: \"MAINTENANCE\"`). Retry later; never sign the user out on 503. |"},{"id":"rate-limits","title":"Rate limits","body":"Limits are fixed windows shared across the whole API. Network limits apply per IPv4 address or per IPv6 /64.\n\n| Operation | Limit |\n|---|---|\n| `POST /auth/start` | 20 / 10 min per network; 5 / 10 min and 15 / day per inbox |\n| `POST /auth/verify` | 30 / 10 min per network; 10 / 10 min per inbox; a code dies after 3 wrong tries |\n| `POST /auth/social` | 30 / 10 min per network |\n| `POST /wallets/magic` | 10 / 10 min per user |\n| `GET /magic/token` | 30 / 10 min per user |\n| `GET /deposits` | 30 / 5 min per user |\n| `GET /me` | 120 / 10 min per user |\n| `POST /fills/sync` | 12 / min per user |\n| `POST /profile/edit` | 20 / 10 min per user |\n| `POST /profile/photo` | 10 / 10 min per user |\n| `GET /deposit-address/{network}` | 30 / 10 min per user |\n| `GET /deposit-address/{network}/activity` | 120 / 10 min per user |\n| `POST /card/order` | 10 / 10 min per user |\n| `POST /swapped/url` | 20 / 10 min per user |\n| `POST /withdraw/quote` | 60 / 10 min per user |\n| `POST /withdraw/authorize` | 20 / 10 min per user |\n| `POST /withdraw/addresses` | 30 / 10 min per user |\n| `GET /withdrawals` | 60 / 10 min per user |\n| `GET /people`, `GET /holders` | 120 / 10 min per network |\n| `GET /leaderboard`, `GET /profiles/…` | 300 / 10 min per network |\n| `GET /handles/{handle}` | 120 / 10 min per network |\n| `POST`/`DELETE /follow/{handle}` | 60 / 10 min per user |"},{"id":"security","title":"Security model","body":"- **No custody.** Funds live in the user's own Hyperliquid account; orders are signed in the browser. This API can't move money.\n- **Your data only.** Private routes (`/me`, `/deposits`) always act on the session's own user and wallet. No route takes a user id or wallet address from the caller.\n- **Public data** is limited to a Slay ID's handle, display name, photo, trading wallet address, bio, join date, follows, leaderboard volume/Points, and shares held in markets (`/holders`). Emails are never public: only the masked form from `/auth/start` and the caller's own email in `/me`.\n- **Wallet proofs** (Magic DID tokens) are checked locally (signatures, expiry, which account they're for), work once, and are confirmed with Magic that the wallet belongs to our Magic app and was opened by the same login (same Google email, or Telegram).\n- **Google ID tokens** are verified against Google's keys (issuer, audience, verified email) and work once.\n- **Points** count only Hyperliquid outcome-market fills of the user's own trading wallet, from the moment it was linked. A trade between two Slay IDs earns nobody Points.\n- **Sign-up gates.** When Slay pauses sign-ups, new accounts are refused on every path (`503 MAINTENANCE`).\n- **Bots.** Requesting a sign-in code needs an invisible Cloudflare Turnstile check solved on Slay Predict itself."}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A session token from `/auth/verify` or `/auth/social`."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message for a person, safe to show as is."},"message":{"type":"string","description":"Set instead of `error` on `503 MAINTENANCE`."},"code":{"type":"string","description":"Machine-readable reason when one exists.","enum":["ACCOUNT_BANNED","MAINTENANCE","HUMAN_CHECK"]}}},"Session":{"type":"object","required":["token"],"properties":{"token":{"type":"string","pattern":"^sp_[A-Za-z0-9_-]{43}$","description":"Predict session token: only this API accepts it. 30 days, renewed while in use."}}},"PublicProfile":{"type":"object","properties":{"handle":{"type":"string","example":"ayush"},"name":{"type":["string","null"],"description":"Display name (shared with the Slay app). Null when unset or when it looks like an email; show the handle instead.","example":"Ayush Pandey"},"image":{"type":["string","null"],"format":"uri","description":"Profile photo URL (shared with the Slay app), or null.","example":"https://api.slay.money/api/avatars/u/photo.jpg"},"wallet":{"type":["string","null"],"description":"Trading wallet (EVM address), or null before one is linked.","example":"0xebfc8c0fae1ae07ac46545835c62d9545a1ecf05"},"bio":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"followers":{"type":"integer","example":12},"following":{"type":"integer","example":4}}},"Points":{"type":"object","properties":{"all":{"type":"number","description":"All-time Points credited: own Points (×1.2 in any week traded on 4+ days) plus 10% of invited friends' Points.","example":142},"week":{"type":"number","description":"Points credited this week (weeks start Monday 00:00 UTC), same rules.","example":142},"rankWeek":{"type":["integer","null"],"description":"Rank this week, or null with no Points.","example":1}}},"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"}}},"slayHandle":{"type":["string","null"],"description":"The account's Slay ID, even before a Predict profile exists."},"profile":{"oneOf":[{"$ref":"#/components/schemas/PublicProfile"},{"type":"null"}],"description":"Null until the user has a Slay ID on Predict (`POST /profile`)."},"wallets":{"type":"array","items":{"type":"object","properties":{"chain":{"type":"string","example":"evm"},"address":{"type":"string"},"provider":{"type":"string","example":"magic"}}}},"builderFee":{"type":"integer","description":"Builder fee to put on this account's orders, in Hyperliquid's tenths of a basis point: 150 = 0.15%, 135 = 0.135% for invited friends.","example":150},"points":{"$ref":"#/components/schemas/Points"},"week":{"type":"object","properties":{"orders":{"type":"integer"},"days":{"type":"integer"},"volume":{"type":"number"},"start":{"type":"integer","description":"Week start, epoch ms."}}},"volume":{"type":"number","description":"Everything this account has traded on Slay (Hyperliquid and Polymarket), USD."},"referrals":{"type":"object","properties":{"friends":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"lastTradeAt":{"type":["string","null"]},"pointsToYou":{"type":"number"}}}},"active":{"type":"integer"},"cashEarned":{"type":"number","description":"Referral cash paid so far, USDC: 25% / 35% / 50% (0–4 / 5–14 / 15+ friends active in the last 30 days) of the builder fees invited friends pay, sent as they pay them (once $0.10 is owed, or after a day)."},"cashPending":{"type":"number","description":"Referral cash earned but not yet sent."},"pointsFromFriends":{"type":"number","description":"10% of invited friends' Points, included in your totals and rank."}}}}},"Money":{"type":"object","properties":{"symbol":{"type":"string","example":"ETH"},"chainId":{"type":"integer","description":"EVM chain id; 1337 is Hyperliquid.","example":42161},"amount":{"type":"string","description":"Decimal amount in the coin.","example":"0.001"},"usd":{"type":"number","example":2.33}}},"Tx":{"type":["object","null"],"properties":{"hash":{"type":"string"},"chainId":{"type":"integer"}}},"Deposit":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["waiting","pending","depositing","submitted","success","failure","refund"]},"createdAt":{"type":"string","format":"date-time"},"from":{"$ref":"#/components/schemas/Money"},"to":{"$ref":"#/components/schemas/Money"},"sent":{"$ref":"#/components/schemas/Tx","description":"The user's transaction on the source network."},"received":{"$ref":"#/components/schemas/Tx","description":"The transaction that credited Hyperliquid."}}},"LeaderboardRow":{"type":"object","properties":{"rank":{"type":"integer","example":1},"handle":{"type":"string","example":"ayush"},"volume":{"type":"number","description":"Traded notional, USD.","example":14.18},"referredVolume":{"type":"number","description":"Volume traded by people this Slay ID invited, USD."},"points":{"type":["number","null"],"description":"Points that have landed (each Monday 00:00 UTC drop). Null on the week board: this week's Points land next Monday; the week board is still ranked by them.","example":142}}},"PmOption":{"type":"object","description":"One side of a market.","properties":{"label":{"type":"string","example":"Greece"},"coin":{"type":"string","description":"The side to buy: `pm:<CLOB token id>`.","example":"pm:4922892561…"},"againstCoin":{"type":"string","description":"The opposite side of the same question (its No token)."},"outcome":{"type":"integer","description":"Polymarket's market (question) id."},"pm":{"type":"object","properties":{"market":{"type":"string","description":"Polymarket market id."},"tick":{"type":"number","description":"Price tick.","example":0.01},"minSize":{"type":"number","description":"Smallest order, shares.","example":5},"negRisk":{"type":"boolean","description":"Multi-outcome (neg risk) market."},"fee":{"type":["object","null"],"description":"Polymarket's taker fee: `rate × (1 − price)` of the notional when `exponent` is 1.","properties":{"rate":{"type":"number","example":0.05},"exponent":{"type":"number","example":1}}},"px":{"type":"number","description":"Last price, 0–1."},"px0":{"type":"number","description":"Price a day ago."},"vol":{"type":"number","description":"24h volume, USD."}}}}},"PmMarket":{"type":"object","description":"A Polymarket event as one Slay market.","required":["id","venue","kind","category","title","options"],"properties":{"id":{"type":"string","description":"`pm-<event id>`; opens at `https://www.slay.money/market/<id>`.","example":"pm-1307224"},"venue":{"type":"string","enum":["polymarket"]},"kind":{"type":"string","enum":["binary","matchup","multi","match3"],"description":"`match3` is a football result: home / draw / away, in that order."},"category":{"type":"string","example":"sports"},"title":{"type":"string","example":"Greece vs Serbia"},"subtitle":{"type":"string","example":"UEFA Nations League"},"tag":{"type":"string"},"icon":{"type":"string","format":"uri"},"sport":{"type":"string","example":"soccer"},"recur":{"type":"string","description":"A recurring crypto window: `5m`, `15m`, `1h`, `4h`, `daily`, `weekly`, `monthly`, `yearly`."},"startsAt":{"type":"integer","description":"Kick-off or window start, ms."},"endsAt":{"type":"integer","description":"Close, ms."},"ended":{"type":"boolean","description":"The game is over; trading is closed while it settles."},"exclusive":{"type":"boolean","description":"Multi-outcome only: false when the options are separate questions, not one winner."},"teams":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"logo":{"type":"string"},"color":{"type":"string"},"abbr":{"type":"string"}}}},"pm":{"type":"object","properties":{"event":{"type":"string"},"slug":{"type":"string"}}},"options":{"type":"array","items":{"$ref":"#/components/schemas/PmOption"}}}}}},"paths":{"/auth/start":{"post":{"tags":["Sign-in"],"operationId":"startSignIn","summary":"Send a sign-in code","description":"Sends a 6-digit code (valid 10 minutes) to the email on the account. `identifier` is an email or a Slay ID (`ayush`, `@ayush`). An email-shaped value is always treated as an email. A new email gets an account when the code is verified.","x-rate-limit":"20 / 10 min per network; 5 / 10 min and 15 / day per inbox","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"string"},"turnstile":{"type":"string","description":"Cloudflare Turnstile token from Slay Predict's invisible widget, action `auth-start`. Single-use, 5 minutes. Required whenever the check is on."}}},"example":{"identifier":"ayush","turnstile":"0.zRk7…"}}}},"responses":{"200":{"description":"Code sent.","content":{"application/json":{"schema":{"type":"object","properties":{"sentTo":{"type":"string","description":"The email, masked."},"via":{"type":"string","enum":["email","slayId"]}}},"example":{"sentTo":"a•••h@gmail.com","via":"slayId"}}}},"400":{"description":"Not a valid email or Slay ID, or an account that can't use email codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Enter a valid email or your Slay ID."}}}},"403":{"description":"The invisible human check failed or is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"We couldn't confirm you're a person. Refresh the page and try again.","code":"HUMAN_CHECK"}}}},"404":{"description":"No account has that Slay ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"No account has the Slay ID @ayushh. Check the spelling, or sign in with your email."}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many codes requested. Wait a few minutes and try again."}}}},"503":{"description":"Sign-ups are paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Slay is under maintenance and temporarily unavailable while we upgrade things.","code":"MAINTENANCE"}}}}}}},"/auth/upgrade":{"post":{"tags":["Sign-in"],"operationId":"upgradeSession","x-internal":true,"summary":"Exchange an old Slay session for a Predict session","description":"Send the old token as `Authorization: Bearer <token>`. Returns a Predict session and revokes the old Slay session. Only needed once per client that signed in before Predict sessions.","x-rate-limit":"20 / 10 min per network","responses":{"200":{"description":"The new Predict session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"},"example":{"token":"sp_Qk2…"}}}},"401":{"description":"The old token isn't a valid session (or is already a Predict token).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many attempts. Wait a few minutes and try again."}}}}}}},"/auth/logout":{"post":{"tags":["Sign-in"],"operationId":"logout","summary":"Sign out","description":"Ends the session in the `Authorization` header everywhere at once (a Predict session, or an old Slay session from before Predict sessions). Always answers 200, with or without a token.","security":[{"bearer":[]}],"responses":{"200":{"description":"Signed out.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"example":{"ok":true}}}}}}},"/auth/verify":{"post":{"tags":["Sign-in"],"operationId":"verifySignIn","summary":"Exchange the code for a session","x-rate-limit":"30 / 10 min per network; 10 / 10 min per inbox; 3 wrong tries kill a code","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identifier","otp"],"properties":{"identifier":{"type":"string"},"otp":{"type":"string","pattern":"^\\d{6}$"}}},"example":{"identifier":"ayush","otp":"482913"}}}},"responses":{"200":{"description":"Signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"},"example":{"token":"sp_Qk2…"}}}},"400":{"description":"Wrong or expired code, or a bad identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That code is wrong or expired. Check it, or send a new one."}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many attempts. Wait a few minutes and try again."}}}},"500":{"description":"Signed in, but no session came back. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Signed in, but no session came back. Try again."}}}}}}},"/auth/social":{"post":{"tags":["Sign-in"],"operationId":"socialSignIn","summary":"Sign in with Google or Telegram (through Magic)","description":"The browser first logs into Magic (Google: with the ID token from Google's button; Telegram: Magic's popup), then sends a Magic DID token made with `magic.user.generateIdToken({ attachment: \"slay-predict-login\" })`.\n\nThe server checks the proof's signatures and expiry, that it hasn't been used, the Google ID token (Google only), and with Magic that the wallet is ours and was opened by the same login. The account is found by this login, then by the verified Google email, else created.","x-rate-limit":"30 / 10 min per network","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["provider","didToken"],"properties":{"provider":{"type":"string","enum":["google","telegram"]},"didToken":{"type":"string","description":"Magic DID token, attachment `slay-predict-login`, at most 15 minutes old."},"googleIdToken":{"type":"string","description":"Required for Google: the ID token from Google's button."},"name":{"type":"string","description":"Display name hint (Telegram). Never trusted."}}},"example":{"provider":"google","didToken":"WyIweGQ3…","googleIdToken":"eyJhbGciOiJSUzI1NiIs…"}}}},"responses":{"200":{"description":"Signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"provider":{"type":"string"}}},"example":{"token":"sp_Qk2…","provider":"google"}}}},"400":{"description":"Invalid, expired, reused or mismatched proof.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That Google account doesn't match this wallet. Try again."}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many sign-in attempts. Wait a few minutes and try again."}}}},"503":{"description":"Sign-ups are paused (new accounts only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Slay is under maintenance and temporarily unavailable while we upgrade things.","code":"MAINTENANCE"}}}}}}},"/me":{"get":{"tags":["Account"],"operationId":"getMe","summary":"The signed-in account","security":[{"bearer":[]}],"x-rate-limit":"120 / 10 min per user","responses":{"200":{"description":"Account, Slay ID, wallets and Points.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}},"503":{"description":"Transient failure (database or network). Keep the session and retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Slay is busy right now. Try again in a moment."}}}}}}},"/profile":{"post":{"tags":["Account"],"operationId":"createProfile","summary":"Create my Slay ID on Predict","description":"An existing Slay user gets their Slay ID (the `handle` in the body is ignored). A new user picks one; it also becomes their Slay ID in the Slay app. `ref` is the Slay ID that invited them (each Slay ID can count 10 invites).","security":[{"bearer":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string"},"ref":{"type":"string"}}},"example":{"handle":"ayush","ref":"karan"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/PublicProfile"}}}}}},"400":{"description":"Not a valid Slay ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"A Slay ID is 2–32 characters: letters, numbers, . _ or -"}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"409":{"description":"Taken, reserved, or already have one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That Slay ID is taken"}}}}}}},"/fills/sync":{"post":{"tags":["Account"],"operationId":"syncFills","summary":"Count my latest trades now","description":"Call it after a trade fills. The server reads the user's new fills from Hyperliquid (never from the caller) and updates Points, rank and the leaderboards within seconds. Bursts collapse into one Hyperliquid call; calls share a server-wide budget, and anything skipped is picked up by the 5-minute sync. Opening the app (`GET /me`) also refreshes a wallet not synced in the last 2 minutes.","security":[{"bearer":[]}],"x-rate-limit":"12 / min per user","responses":{"200":{"description":"Whether a sync ran, how many new fills, and (when it ran) the fresh Points picture.","content":{"application/json":{"schema":{"type":"object","properties":{"synced":{"type":"boolean"},"fills":{"type":"integer"},"points":{"$ref":"#/components/schemas/Points"}}},"example":{"synced":true,"fills":2,"points":{"all":563,"week":120,"rankWeek":1}}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}}}}},"/profile/edit":{"post":{"tags":["Account"],"operationId":"editProfile","summary":"Edit my name or Slay ID","description":"Either field may be sent alone. `name` is the display name (up to 24 characters, no @). A new `handle` also renames the Slay ID in the Slay app.","security":[{"bearer":[]}],"x-rate-limit":"20 / 10 min per user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"}}},"example":{"name":"Ayush","handle":"ayush"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/PublicProfile"}}}}}},"400":{"description":"Bad name or Slay ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Pick a display name (no @)."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"409":{"description":"Slay ID taken, or no profile yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"@ayush is taken"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many changes. Wait a few minutes."}}}}}}},"/profile/photo":{"post":{"tags":["Account"],"operationId":"uploadProfilePhoto","summary":"Set my profile photo","description":"The raw image bytes as the body: JPEG, PNG or WebP, up to 5 MB (the type is read from the bytes). Replaces the photo in the Slay app too.","security":[{"bearer":[]}],"x-rate-limit":"10 / 10 min per user","requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Stored.","content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string"}}},"example":{"image":"https://api.slay.money/api/avatars/…"}}}},"400":{"description":"Empty body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That file is empty."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"413":{"description":"Over 5 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That photo is too big. Pick one under 5 MB."}}}},"415":{"description":"Not JPEG, PNG or WebP.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Use a JPEG, PNG or WebP image."}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many uploads. Wait a few minutes."}}}},"503":{"description":"Photos are unavailable right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Profile pictures aren't available right now."}}}}}}},"/outcomes":{"get":{"tags":["Markets"],"operationId":"outcomesById","summary":"Markets by outcome id, settled ones included","description":"Hyperliquid's outcomeMeta drops a market once it settles; this keeps them. `ids` is a comma list (up to 200). Same shapes as outcomeMeta's `outcomes` and `questions`.","parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string"},"example":"812,813"}],"responses":{"200":{"description":"Known outcomes and their questions.","content":{"application/json":{"schema":{"type":"object","properties":{"outcomes":{"type":"array","items":{"type":"object"}},"questions":{"type":"array","items":{"type":"object"}}}}}}}}}},"/settled":{"get":{"tags":["Markets"],"operationId":"settledMarkets","summary":"Settled markets and who won","description":"Hyperliquid HIP-4 markets that have settled, newest first, with how they settled (read from Hyperliquid's `settledOutcome` once a market leaves the live list, within about 10 minutes). `settleFraction` is side 0's payout (Yes, or a question's named outcome): `1` won, `0` lost, between = split; `winner` says the same in words. Markets that belong to a question (a game's result, a price range) carry it in `question`. Page back with `before` = the last `settledAt`.","x-rate-limit":"120 / 10 min per network","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":200,"maximum":500}},{"name":"before","in":"query","description":"Only markets settled before this time, ms (the previous page's `next`).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Settled markets.","content":{"application/json":{"schema":{"type":"object","properties":{"settled":{"type":"array","items":{"type":"object","properties":{"outcome":{"type":"integer","example":39827},"name":{"type":"string","example":"template:binaryPrice"},"description":{"type":"string","example":"perp:BTC|priceDescription:BTC-USDC perp mark|seconds:60|threshold:62810|time:20261118-1930"},"question":{"type":["object","null"],"properties":{"question":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"}}},"settleFraction":{"type":"number","example":1},"winner":{"type":"string","enum":["yes","no","split"]},"settledAt":{"type":"integer","description":"When it left the live list, ms."}}}},"next":{"type":["integer","null"],"description":"`before` for the next page, or null at the end."}}}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}}}}},"/wallets/magic":{"post":{"tags":["Wallet"],"operationId":"linkMagicWallet","summary":"Map the Magic wallet to my Slay ID","description":"Proves the browser holds the wallet: a DID token made with `generateIdToken({ attachment: \"slay-predict:<userId>\" })`. Works before the Slay ID exists (sign-up order: Slay code, Magic code, then Slay ID); the wallet becomes the trading wallet when the Slay ID is created. The wallet must be the one Magic made for this account's email. The first wallet becomes the trading wallet; Points count from that moment.","security":[{"bearer":[]}],"x-rate-limit":"10 / 10 min per user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["didToken"],"properties":{"didToken":{"type":"string"}}}}}},"responses":{"200":{"description":"Linked.","content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string"}}},"example":{"wallet":"0xebfc8c0fae1ae07ac46545835c62d9545a1ecf05"}}}},"400":{"description":"Invalid or mismatched proof.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That wallet proof is for a different account."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"409":{"description":"The wallet belongs to another Slay ID, or to a different email than this account's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This wallet is already linked to another Slay ID."}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many tries. Wait a few minutes and try again."}}}}}}},"/magic/token":{"get":{"tags":["Wallet"],"operationId":"getMagicToken","x-internal":true,"summary":"ID token for Magic (one-code sign-in)","description":"A 10-minute RS256 ID token (`sub` = Slay user id, `aud` = `slay-predict`) for `magic.openid.loginWithOIDC`.","security":[{"bearer":[]}],"x-rate-limit":"30 / 10 min per user","responses":{"200":{"description":"Token.","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"409":{"description":"No Slay ID yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Create your Slay ID first"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Try again in a few minutes."}}}}}}},"/deposits":{"get":{"tags":["Deposits"],"operationId":"listDeposits","summary":"My converted deposits","description":"The user's last 20 converted deposits, newest first, with both transactions so anyone can check them on an explorer. USDC sent through Hyperliquid's own Arbitrum bridge is in Hyperliquid's ledger (`userNonFundingLedgerUpdates`, type `deposit`).","security":[{"bearer":[]}],"x-rate-limit":"30 / 5 min per user","responses":{"200":{"description":"Deposits.","content":{"application/json":{"schema":{"type":"object","properties":{"deposits":{"type":"array","items":{"$ref":"#/components/schemas/Deposit"}}}},"example":{"deposits":[{"id":"0x1793…","status":"success","createdAt":"2026-10-28T23:18:29.966Z","from":{"symbol":"ETH","chainId":42161,"amount":"0.001","usd":2.33},"to":{"symbol":"USDC","chainId":1337,"amount":"2.331458","usd":2.33},"sent":{"hash":"0x9ff4e006…","chainId":42161},"received":{"hash":"0xd8252823…","chainId":1337}}]}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many checks. Wait a moment."}}}},"502":{"description":"Relay is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Couldn't load your deposits right now."}}}}}}},"/funding":{"get":{"tags":["Deposits"],"operationId":"fundingOptions","summary":"Ways in for this visitor","description":"Whether card / Apple Pay / Google Pay is offered where the visitor is, through which provider, whether it is live, and the card fee.","responses":{"200":{"description":"Options.","content":{"application/json":{"schema":{"type":"object","properties":{"card":{"type":"boolean"},"cardLive":{"type":"boolean"},"provider":{"type":"string","enum":["unifold","crossmint","swapped"],"description":"unifold: the app opens Unifold's window (its SDK) paying into the user's Cash; no order endpoint here."},"feeBps":{"type":"integer","description":"Card fee, basis points."},"country":{"type":["string","null"]}}},"example":{"card":true,"cardLive":true,"provider":"unifold","feeBps":175,"country":"IN"}}}}}}},"/deposit-networks":{"get":{"tags":["Deposits"],"operationId":"depositNetworks","summary":"Networks you can deposit from","description":"Every EVM network Relay takes deposits on (and Solana when it's enabled), with the exact coins each accepts. Anything else sent to a deposit address can't be recovered.","responses":{"200":{"description":"Networks.","content":{"application/json":{"schema":{"type":"object","properties":{"networks":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer"},"name":{"type":"string"},"tokens":{"type":"array","items":{"type":"string"}}}}}}},"example":{"networks":[{"chainId":8453,"name":"Base","tokens":["ETH","USDC","USDT","WETH"]}]}}}}}}},"/swapped/webhook":{"post":{"tags":["Platform"],"operationId":"swappedWebhook","x-internal":true,"summary":"Card order updates (called by Swapped)","description":"Swapped posts each card order's status here. The `signature` header must verify with Slay's live Swapped key; apps never call this.","parameters":[{"name":"signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string"},"order_status":{"type":"string"},"external_customer_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Recorded."},"401":{"description":"Bad signature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"bad signature"}}}},"404":{"description":"Card payments not live.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not configured"}}}}}}},"/openapi.json":{"get":{"tags":["Platform"],"x-internal":true,"operationId":"openapi","summary":"This API description (OpenAPI 3.1)","responses":{"200":{"description":"The document you're reading."}}}},"/csp-report":{"post":{"tags":["Platform"],"operationId":"cspReport","x-internal":true,"summary":"Content-Security-Policy violation report","description":"Where the Predict site's Content-Security-Policy sends violation reports (`report-uri` and `report-to`). Browsers call it on their own; accepts `application/csp-report` and `application/reports+json` bodies. Reports from other sites and from browser extensions are ignored.","responses":{"204":{"description":"Received."}}}},"/withdraw/enabled":{"get":{"tags":["Withdrawals"],"operationId":"withdrawEnabled","summary":"Can I withdraw?","description":"Whether withdrawals are open for the signed-in user.","security":[{"bearer":[]}],"responses":{"200":{"description":"Status.","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"example":{"enabled":true}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}}}}},"/withdraw/quote":{"post":{"tags":["Withdrawals"],"operationId":"withdrawQuote","summary":"Price a withdrawal","description":"Prices moving `usd` of the user's Cash (Hyperliquid spot USDC) to `to` on `chainId`, paid out in that network's USDC (or its main stablecoin; chains as in `/deposit-networks`). Returns what arrives, the cost, and Relay's two steps, which the user's own wallet signs: an EIP-712 nonce-mapping authorization (send it to `/withdraw/authorize`), then a Hyperliquid `sendAsset` submitted to Hyperliquid with the same nonce. Slay deposit addresses are refused as a destination. Minimum $2.","security":[{"bearer":[]}],"x-rate-limit":"60 / 10 min per user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chainId","to","usd"],"properties":{"chainId":{"type":"integer","example":8453},"to":{"type":"string","example":"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"},"usd":{"type":"number","maximum":1000000,"example":25},"token":{"type":"string","enum":["USDC","USDT","PUSD"],"default":"USDC","description":"Pay out in the network's USDC, its USDT (USDT0 / USD₮0 where that's its Tether), or `PUSD` on Polygon to fund the user's Polymarket wallet; converted by Relay."}}}}}},"responses":{"200":{"description":"The quote.","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"},"receive":{"type":"string"},"symbol":{"type":"string"},"feeUsd":{"type":"number"},"seconds":{"type":"number"},"steps":{"type":"array","items":{"type":"object"}}}},"example":{"requestId":"0x1793…","receive":"24.973705","symbol":"USDC","feeUsd":0.03,"seconds":2,"steps":[]}}}},"400":{"description":"Bad network, address or amount.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That isn't a Base address."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"Withdrawals aren't open for this user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Withdrawals aren't open yet."}}}},"409":{"description":"No wallet yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Set up your wallet first"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}},"502":{"description":"Relay couldn't price it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Couldn't price this withdrawal right now. Try again."}}}}}}},"/withdraw/authorize":{"post":{"tags":["Withdrawals"],"operationId":"withdrawAuthorize","summary":"Send the signed authorization","description":"Forwards the quote's signed nonce-mapping authorization to Relay, after checking it is for the signed-in user's own wallet. `body` is the `post.body` of the quote's `authorize` step; `signature` is the user's EIP-712 signature over its `sign` data.","security":[{"bearer":[]}],"x-rate-limit":"20 / 10 min per user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body","signature"],"properties":{"body":{"type":"object"},"signature":{"type":"string"}}}}}},"responses":{"200":{"description":"Accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"example":{"ok":true}}}},"400":{"description":"Missing, malformed, not the user's own, or refused by Relay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That authorization isn't for your wallet."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"Suspended, or withdrawals aren't open yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Withdrawals aren't open yet."}}}},"409":{"description":"No wallet yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Set up your wallet first"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}}}}},"/withdraw/addresses":{"get":{"tags":["Withdrawals"],"operationId":"savedAddresses","summary":"My saved destinations","description":"Addresses the user has withdrawn to, most recently used first (up to 6), labelled with their network.","security":[{"bearer":[]}],"responses":{"200":{"description":"Saved addresses.","content":{"application/json":{"schema":{"type":"object","properties":{"addresses":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"chainId":{"type":"integer"},"label":{"type":"string"},"lastUsedAt":{"type":"string"}}}}}},"example":{"addresses":[{"address":"0x7a3f…91c2","chainId":8453,"label":"Base","lastUsedAt":"2026-10-30T09:00:00Z"}]}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}}}},"post":{"tags":["Withdrawals"],"operationId":"rememberAddress","summary":"Remember a destination","description":"Saves an address after a withdrawal to it (or bumps it to the top if already saved).","security":[{"bearer":[]}],"x-rate-limit":"30 / 10 min per user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","chainId"],"properties":{"address":{"type":"string"},"chainId":{"type":"integer"}}}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"example":{"ok":true}}}},"400":{"description":"Bad address or network.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That isn't a valid address."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}}}}},"/withdrawals":{"get":{"tags":["Withdrawals"],"operationId":"listWithdrawals","summary":"My withdrawals","description":"The user's last 20 withdrawals, newest first, with what arrived where and the payout transaction.","security":[{"bearer":[]}],"x-rate-limit":"60 / 10 min per user","responses":{"200":{"description":"Withdrawals.","content":{"application/json":{"schema":{"type":"object","properties":{"withdrawals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"to":{"type":["string","null"]},"sent":{"type":["string","null"]},"received":{"type":["string","null"]},"symbol":{"type":["string","null"]},"chainId":{"type":["integer","null"]},"txHash":{"type":["string","null"]}}}}}},"example":{"withdrawals":[{"id":"0x1793…","status":"success","createdAt":"2026-10-30T09:00:00Z","to":"0x1f98…","sent":"25","received":"24.97","symbol":"USDC","chainId":8453,"txHash":"0xabc…"}]}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}},"502":{"description":"Relay unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Couldn't load your withdrawals right now."}}}}}}},"/volumes":{"get":{"tags":["Markets"],"operationId":"getVolumes","summary":"24h volume and price 24h ago per outcome coin","description":"Hyperliquid's 24-hour traded notional (USD) for every outcome side (`#<id>` coins), refreshed about every 30 seconds. Sum both sides of a market's outcomes for its volume. `prev` is each side's price 24 hours ago (0–1), for 24h moves; sides still at their 0.5 listing price are left out. `wide` lists sides whose order book is over 10c wide: [last trade kept inside the book, the midpoint it was read against]; show the first while the live midpoint is still the second.","responses":{"200":{"description":"Volumes keyed by coin.","content":{"application/json":{"schema":{"type":"object","properties":{"volumes":{"type":"object","additionalProperties":{"type":"number"}},"prev":{"type":"object","additionalProperties":{"type":"number"}},"wide":{"type":"object","additionalProperties":{"type":"array","items":{"type":"number"}}}}},"example":{"volumes":{"#198730":412310,"#198731":98120},"prev":{"#198730":0.61,"#198731":0.39},"wide":{"#237570":[0.836,0.588]}}}}}}}},"/deposit-address/{network}":{"get":{"tags":["Deposits"],"operationId":"depositAddress","summary":"My deposit address on a network","description":"The user's own Relay deposit address on `network`, created the first time and kept. Any coin the network accepts (see `/deposit-networks`), sent from any wallet or exchange, is converted and lands in the user's Cash as USDC. No gas, no signing.","security":[{"bearer":[]}],"x-rate-limit":"30 / 10 min per user","parameters":[{"name":"network","in":"path","required":true,"description":"A chain id from `/deposit-networks` (e.g. `8453` for Base). The names `base`, `hyperliquid`, `ethereum` and `polygon` also work.","schema":{"type":"string","pattern":"^\\d+$"},"example":"8453"}],"responses":{"200":{"description":"The address.","content":{"application/json":{"schema":{"type":"object","properties":{"network":{"type":"integer","description":"The chain id."},"address":{"type":"string"}}},"example":{"network":8453,"address":"0x0a1408a74930bf40d675e6cfa2e98306932bba36"}}}},"400":{"description":"Unsupported network.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That network isn't supported."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"409":{"description":"No wallet yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Set up your wallet first"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}},"502":{"description":"Relay couldn't create the address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Couldn't get a deposit address right now. Try again."}}}}}}},"/deposit-address/{network}/activity":{"get":{"tags":["Deposits"],"operationId":"depositActivity","summary":"What arrived on my deposit address","description":"The latest conversions from the address, newest first. When a coin is sitting there unconverted, the server asks Relay to pick it up (at most every 2 minutes). Before the address exists, `activity` is empty and `address` is absent.","security":[{"bearer":[]}],"x-rate-limit":"120 / 10 min per user","parameters":[{"name":"network","in":"path","required":true,"description":"A chain id from `/deposit-networks` (e.g. `8453` for Base). The names `base`, `hyperliquid`, `ethereum` and `polygon` also work.","schema":{"type":"string","pattern":"^\\d+$"},"example":"8453"}],"responses":{"200":{"description":"Activity.","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"activity":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"sent":{"type":["string","null"]},"token":{"type":["string","null"]},"received":{"type":["string","null"]}}}}}}}}},"400":{"description":"Unsupported network.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"That network isn't supported."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}}}}},"/swapped/url":{"post":{"tags":["Deposits"],"operationId":"swappedUrl","summary":"Card / Apple Pay: a signed Swapped widget URL","description":"Embed the URL in an iframe. Swapped handles sign-in, ID check and payment, then sends USDC to the user's Hyperliquid address (rail `hyperliquid`) or their wallet on Polygon.","security":[{"bearer":[]}],"x-rate-limit":"20 / 10 min per user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["usd"],"properties":{"usd":{"type":"number","minimum":8,"maximum":20000},"method":{"type":"string","enum":["creditcard","apple-pay"]},"rail":{"type":"string","enum":["hyperliquid","polygon"]}}},"example":{"usd":100,"method":"creditcard","rail":"hyperliquid"}}}},"responses":{"200":{"description":"Widget URL.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"live":{"type":"boolean"}}}}}},"400":{"description":"Outside $8–$20,000.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"The minimum is $8."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"409":{"description":"No wallet yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Set up your wallet first"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}}}}},"/swapped/orders/latest":{"get":{"tags":["Deposits"],"operationId":"latestSwappedOrder","summary":"My latest card order","description":"The user's latest card / Apple Pay / Google Pay order from either provider, as last reported. Swapped: `payment_pending`, `order_completed`, `order_broadcasted` (USDC sent) or `order_cancelled`. Crossmint: `pending`, `paid`, `delivered` or `failed`.","security":[{"bearer":[]}],"responses":{"200":{"description":"The order, or null.","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":["object","null"],"properties":{"order_id":{"type":"string"},"status":{"type":"string"},"crypto_amount":{"type":["number","null"]},"usd":{"type":["number","null"]},"usd_plus_fees":{"type":["number","null"]},"updated_at":{"type":"string"}}}}}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}}}}},"/card/order":{"post":{"tags":["Deposits"],"operationId":"createCardOrder","summary":"Card / Apple Pay / Google Pay: start an order","description":"Creates a Crossmint order for `usd` (rounded to cents) and returns its embedded-checkout URL; open `url` in an iframe on `origin`. `method: \"apple\"` offers Apple Pay and card, `\"card\"` offers card and Google Pay. Rail `hyperliquid` delivers USDC to the user's Cash (through their deposit address); rail `polygon` delivers USDC to their wallet on Polygon. Every call creates a new order; an unpaid one expires on its own. `url` carries the order's client secret: show it only to the user it's for. Only when `GET /funding` reports `provider: \"crossmint\"`.","security":[{"bearer":[]}],"x-rate-limit":"10 / 10 min per user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["usd"],"properties":{"usd":{"type":"number","minimum":8,"maximum":1000,"description":"Amount in USD. The maximum can change."},"method":{"type":"string","enum":["card","apple"],"default":"card"},"rail":{"type":"string","enum":["hyperliquid","polygon"],"default":"hyperliquid"}}},"example":{"usd":100,"method":"card","rail":"hyperliquid"}}}},"responses":{"200":{"description":"The order and its checkout.","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"url":{"type":"string","description":"Embedded-checkout URL (contains the order's client secret)."},"origin":{"type":"string","enum":["https://www.crossmint.com","https://staging.crossmint.com"]}}},"example":{"orderId":"8f3c2a1e-…","url":"https://www.crossmint.com/sdk/2024-03-05/embedded-checkout?…","origin":"https://www.crossmint.com"}}}},"400":{"description":"Outside the amount limits, or a network cards can't pay to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"The minimum is $8."}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"Suspended, or card payments aren't available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Card payments aren't available yet."}}}},"409":{"description":"No wallet yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Set up your wallet first"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}},"502":{"description":"Crossmint or the deposit address failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Couldn't start the payment. Try again."}}}}}}},"/card/orders/{id}":{"get":{"tags":["Deposits"],"operationId":"getCardOrder","summary":"Follow a card order","description":"One of the user's card orders, re-read from Crossmint while it's still open (at most every 4 seconds). Poll it after the checkout closes until `delivered` or `failed`.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The `orderId` from `POST /card/order`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The order.","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","paid","delivered","failed"]},"usd":{"type":["number","null"]},"received":{"type":["number","null"],"description":"USDC delivered."},"rail":{"type":["string","null"],"enum":["hyperliquid","polygon",null]},"txHash":{"type":["string","null"]}}}}},"example":{"order":{"id":"8f3c2a1e-…","status":"delivered","usd":100,"received":98.25,"rail":"hyperliquid","txHash":"0x5be1…"}}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"404":{"description":"Not one of the user's card orders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Order not found"}}}}}}},"/crossmint/webhook":{"post":{"tags":["Platform"],"x-internal":true,"operationId":"crossmintWebhook","summary":"Card order updates (called by Crossmint)","description":"Crossmint posts order events here. The body only names an order, which is then re-read from Crossmint with Slay's key; apps never call this.","responses":{"200":{"description":"Noted."},"404":{"description":"Card payments not set up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not configured"}}}}}}},"/leaderboard":{"get":{"tags":["Social"],"operationId":"getLeaderboard","summary":"Points leaderboard","x-rate-limit":"300 / 10 min per network","parameters":[{"name":"range","in":"query","schema":{"type":"string","enum":["week","month","all"],"default":"week"}}],"responses":{"200":{"description":"Top 100: by this week's Points (week), by landed Points (month, all).","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","example":"week"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardRow"}}}}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}}}}},"/handles/{handle}":{"get":{"tags":["Social"],"operationId":"checkHandle","summary":"Is this Slay ID free?","x-rate-limit":"120 / 10 min per network","parameters":[{"name":"handle","in":"path","required":true,"description":"A Slay ID, with or without the leading `@` (`ayush`, `@ayush`).","schema":{"type":"string","pattern":"^@?[a-z0-9._-]{2,32}$"},"example":"ayush"}],"responses":{"200":{"description":"Availability (the handle is normalized: lowercase, `@` dropped).","content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string"},"available":{"type":"boolean"}}},"example":{"handle":"ayush","available":false}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many checks. Wait a moment."}}}}}}},"/profiles/{handle}":{"get":{"tags":["Social"],"operationId":"getProfile","summary":"A public profile","description":"`followedByMe` is filled in when a session is sent.","x-rate-limit":"300 / 10 min per network, shared with followers and following","parameters":[{"name":"handle","in":"path","required":true,"description":"A Slay ID, with or without the leading `@` (`ayush`, `@ayush`).","schema":{"type":"string","pattern":"^@?[a-z0-9._-]{2,32}$"},"example":"ayush"}],"responses":{"200":{"description":"Profile.","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/PublicProfile"},"followedByMe":{"type":"boolean"}}}}}},"404":{"description":"No such Slay ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"No such Slay ID"}}}}}}},"/people":{"get":{"tags":["Social"],"operationId":"searchPeople","summary":"Find people by Slay ID or name","description":"Slay Predict users whose @handle starts with `q`, or whose display name contains it. Up to 8; fewer than 2 characters returns none.","x-rate-limit":"120 / 10 min per network","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"example":"ay"}],"responses":{"200":{"description":"Matches, handle matches first.","content":{"application/json":{"schema":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":["string","null"]},"image":{"type":["string","null"]}}}}}}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}}}}},"/holders":{"get":{"tags":["Social"],"operationId":"marketHolders","summary":"Slay users holding a market's sides","description":"`coins` is a comma list of outcome sides (`#<outcome><side>`, up to 6). Share counts and average price are read from each holder's Hyperliquid balance; anyone Hyperliquid does not confirm is left out. Cached for a minute.","x-rate-limit":"120 / 10 min per network","parameters":[{"name":"coins","in":"query","required":true,"schema":{"type":"string"},"example":"#14740,#14741"}],"responses":{"200":{"description":"Holders, most shares first.","content":{"application/json":{"schema":{"type":"object","properties":{"holders":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":["string","null"]},"image":{"type":["string","null"]},"coin":{"type":"string"},"shares":{"type":"number"},"avg":{"type":"number","description":"Average entry price, 0 to 1."}}}}}}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Wait a moment."}}}}}}},"/profiles/{handle}/followers":{"get":{"tags":["Social"],"operationId":"listFollowers","summary":"Who follows a Slay ID","parameters":[{"name":"handle","in":"path","required":true,"description":"A Slay ID, with or without the leading `@` (`ayush`, `@ayush`).","schema":{"type":"string","pattern":"^@?[a-z0-9._-]{2,32}$"},"example":"ayush"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"One page, newest first. `people` carries names and photos; `handles` is the same page, handles only. Pass `next` back as `cursor` for the next page; `next` is null on the last page.","content":{"application/json":{"schema":{"type":"object","properties":{"next":{"type":["string","null"]},"handles":{"type":"array","items":{"type":"string"}},"people":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":["string","null"]},"image":{"type":["string","null"]}}}}}}}}},"404":{"description":"No such Slay ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"No such Slay ID"}}}}}}},"/profiles/{handle}/following":{"get":{"tags":["Social"],"operationId":"listFollowing","summary":"Who a Slay ID follows","parameters":[{"name":"handle","in":"path","required":true,"description":"A Slay ID, with or without the leading `@` (`ayush`, `@ayush`).","schema":{"type":"string","pattern":"^@?[a-z0-9._-]{2,32}$"},"example":"ayush"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"One page, newest first. `people` carries names and photos; `handles` is the same page, handles only. Pass `next` back as `cursor` for the next page; `next` is null on the last page.","content":{"application/json":{"schema":{"type":"object","properties":{"next":{"type":["string","null"]},"handles":{"type":"array","items":{"type":"string"}},"people":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":["string","null"]},"image":{"type":["string","null"]}}}}}}}}},"404":{"description":"No such Slay ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"No such Slay ID"}}}}}}},"/follow/{handle}":{"post":{"tags":["Social"],"operationId":"follow","summary":"Follow a Slay ID","security":[{"bearer":[]}],"x-rate-limit":"60 / 10 min per user","parameters":[{"name":"handle","in":"path","required":true,"description":"A Slay ID, with or without the leading `@` (`ayush`, `@ayush`).","schema":{"type":"string","pattern":"^@?[a-z0-9._-]{2,32}$"},"example":"ayush"}],"responses":{"200":{"description":"Following.","content":{"application/json":{"schema":{"type":"object","properties":{"following":{"type":"boolean"},"profile":{"$ref":"#/components/schemas/PublicProfile"}}}}}},"400":{"description":"Following yourself.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"You can't follow yourself"}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"404":{"description":"No such Slay ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"No such Slay ID"}}}},"409":{"description":"No Slay ID yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Create your Slay ID first"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Slow down a little and try again."}}}}}},"delete":{"tags":["Social"],"operationId":"unfollow","summary":"Unfollow a Slay ID","security":[{"bearer":[]}],"x-rate-limit":"60 / 10 min per user","parameters":[{"name":"handle","in":"path","required":true,"description":"A Slay ID, with or without the leading `@` (`ayush`, `@ayush`).","schema":{"type":"string","pattern":"^@?[a-z0-9._-]{2,32}$"},"example":"ayush"}],"responses":{"200":{"description":"Not following.","content":{"application/json":{"schema":{"type":"object","properties":{"following":{"type":"boolean"},"profile":{"$ref":"#/components/schemas/PublicProfile"}}}}}},"401":{"description":"No valid session. Sign in again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Sign in first"}}}},"403":{"description":"The account is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This account has been suspended for violating Slay's terms.","code":"ACCOUNT_BANNED"}}}},"404":{"description":"No such Slay ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"No such Slay ID"}}}},"429":{"description":"Rate limit reached. Wait for the window to pass.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Slow down a little and try again."}}}}}}},"/oidc/.well-known/openid-configuration":{"get":{"tags":["Identity provider"],"operationId":"oidcDiscovery","summary":"OpenID Connect discovery","responses":{"200":{"description":"Discovery document."}}}},"/oidc/jwks.json":{"get":{"tags":["Identity provider"],"operationId":"oidcJwks","summary":"Signing keys (JWKS)","responses":{"200":{"description":"Public RS256 keys."}}}},"/data/markets":{"get":{"tags":["Market data"],"servers":[{"url":"https://www.slay.money/api"}],"operationId":"dataMarkets","summary":"All live markets, both venues linked","description":"Hyperliquid HIP-4's live markets and Polymarket's catalog, merged the way the app shows them: a game, season winner or crypto window listed on both is one entry, and each option carries both sides (`hyperliquid`, `polymarket`). Crypto windows are listed per venue (Hyperliquid's and Polymarket's settle on different prices, so they are different bets). Hyperliquid prices are live at the call.","x-rate-limit":"Edge cached (2 s)","parameters":[{"name":"venue","in":"query","required":false,"description":"`both` = only markets listed on both; `hyperliquid`; `polymarket`.","schema":{"type":"string","enum":["both","hyperliquid","polymarket"]}},{"name":"category","in":"query","required":false,"description":"sports, crypto, politics, …","schema":{"type":"string"}},{"name":"recur","in":"query","required":false,"description":"A crypto window length: 5m, 15m, 1h, 4h, daily…","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Text in the title.","schema":{"type":"string"}}],"responses":{"200":{"description":"Markets.","content":{"application/json":{"schema":{"type":"object","properties":{"at":{"type":"integer"},"count":{"type":"integer"},"markets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"category":{"type":"string"},"kind":{"type":"string","enum":["binary","matchup","multi","match3"]},"recur":{"type":"string"},"startsAt":{"type":"integer"},"endsAt":{"type":"integer"},"venues":{"type":"array","items":{"type":"string","enum":["hyperliquid","polymarket"]}},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"hyperliquid":{"type":"object","properties":{"coin":{"type":"string","description":"The side to buy: Hyperliquid `#<outcome><side>`, Polymarket `pm:<token id>`."},"against":{"type":"string","description":"The opposite side."},"price":{"type":["number","null"],"description":"0–1. Hyperliquid: live mid at the call. Polymarket: catalog price (≤ 2 min old; live: `/data/book`)."},"outcome":{"type":"integer"}}},"polymarket":{"type":"object","properties":{"coin":{"type":"string","description":"The side to buy: Hyperliquid `#<outcome><side>`, Polymarket `pm:<token id>`."},"against":{"type":"string","description":"The opposite side."},"price":{"type":["number","null"],"description":"0–1. Hyperliquid: live mid at the call. Polymarket: catalog price (≤ 2 min old; live: `/data/book`)."},"token":{"type":"string"},"market":{"type":"string"}}}}}}}}}}}}}},"502":{"description":"Hyperliquid didn't answer."}}}},"/data/book":{"get":{"tags":["Market data"],"servers":[{"url":"https://www.slay.money/api"}],"operationId":"dataBook","summary":"One side's order book","description":"Live order book for a Hyperliquid HIP-4 side or a Polymarket token: up to 50 levels each way, best first, prices 0–1, sizes in shares.","x-rate-limit":"Edge cached (1 s)","parameters":[{"name":"coin","in":"query","required":true,"description":"A Hyperliquid side (`#398270`) or a Polymarket token (`pm:<token id>`).","schema":{"type":"string"},"example":"#398270"}],"responses":{"200":{"description":"The book.","content":{"application/json":{"schema":{"type":"object","properties":{"coin":{"type":"string"},"at":{"type":"integer"},"bids":{"type":"array","items":{"type":"object","properties":{"px":{"type":"number"},"sz":{"type":"number"}}}},"asks":{"type":"array","items":{"type":"object","properties":{"px":{"type":"number"},"sz":{"type":"number"}}}}}}}}},"400":{"description":"Not a Hyperliquid side or Polymarket token."},"502":{"description":"The venue didn't answer."}}}},"/data/history":{"get":{"tags":["Market data"],"servers":[{"url":"https://www.slay.money/api"}],"operationId":"dataHistory","summary":"One side's price history","description":"Price history for a Hyperliquid HIP-4 side (its candles) or a Polymarket token. Points oldest first.","x-rate-limit":"Edge cached (15 s)","parameters":[{"name":"coin","in":"query","required":true,"description":"A Hyperliquid side (`#398270`) or a Polymarket token (`pm:<token id>`).","schema":{"type":"string"},"example":"#398270"},{"name":"range","in":"query","required":false,"description":"1H, 6H, 1D, 1W, 1M or ALL.","schema":{"type":"string","enum":["1H","6H","1D","1W","1M","ALL"],"default":"1D"}}],"responses":{"200":{"description":"Points.","content":{"application/json":{"schema":{"type":"object","properties":{"coin":{"type":"string"},"range":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"t":{"type":"integer","description":"ms"},"c":{"type":"number","description":"Price 0–1."}}}}}}}}},"400":{"description":"Bad coin or range."},"502":{"description":"The venue didn't answer."}}}},"/pm/markets":{"get":{"tags":["Polymarket"],"servers":[{"url":"https://www.slay.money/api"}],"operationId":"pmCatalog","summary":"The Polymarket catalog","description":"Polymarket's busiest live events (400, by 24h volume), plus every game and season-winner market Hyperliquid also lists in the next ten days, so a game on both venues can be shown as one and routed to the better price. One market per event. Rebuilt every two minutes.","x-rate-limit":"Edge cached (2 min)","responses":{"200":{"description":"The catalog.","content":{"application/json":{"schema":{"type":"object","properties":{"markets":{"type":"array","items":{"$ref":"#/components/schemas/PmMarket"}},"at":{"type":"integer","description":"Built at, ms."},"builder":{"type":"object","description":"Slay's Polymarket builder fee, as a fraction of the notional.","properties":{"taker":{"type":"number"},"maker":{"type":"number"}}},"total":{"type":"integer","description":"Live Polymarket events (what search can reach).","example":15000}}}}}},"503":{"description":"No catalog built yet."}}}},"/pm/search":{"get":{"tags":["Polymarket"],"servers":[{"url":"https://www.slay.money/api"}],"operationId":"pmSearch","summary":"Search every Polymarket market","description":"Any active Polymarket event by name, beyond the catalog. Games come back as their full event.","parameters":[{"name":"q","in":"query","required":true,"description":"What to look for, 2–80 characters.","schema":{"type":"string"},"example":"bitcoin"}],"x-rate-limit":"Edge cached (1 min per query)","responses":{"200":{"description":"Matches (empty under two characters).","content":{"application/json":{"schema":{"type":"object","properties":{"markets":{"type":"array","items":{"$ref":"#/components/schemas/PmMarket"}}}}}}}}}},"/pm/browse":{"get":{"tags":["Polymarket"],"servers":[{"url":"https://www.slay.money/api"}],"operationId":"pmBrowse","summary":"A category's next page","description":"The next live Polymarket events under a category, busiest first, a page at a time. With `freq` on `crypto`, the recurring Up or Down windows of that length instead, soonest first.","parameters":[{"name":"tab","in":"query","required":true,"description":"Category.","schema":{"type":"string","enum":["sports","politics","crypto","esports","elections","geopolitics","finance","tech","culture","economy","climate"]},"example":"politics"},{"name":"page","in":"query","required":false,"description":"Page, from 0.","schema":{"type":"integer","default":0}},{"name":"freq","in":"query","required":false,"description":"Crypto only: window length.","schema":{"type":"string","enum":["5m","15m","1h","4h","daily","weekly","monthly","yearly"]}}],"x-rate-limit":"Edge cached (5 min; 30 s with freq)","responses":{"200":{"description":"A page.","content":{"application/json":{"schema":{"type":"object","properties":{"markets":{"type":"array","items":{"$ref":"#/components/schemas/PmMarket"}},"more":{"type":"boolean","description":"Another page exists."}}}}}},"400":{"description":"Unknown tab."},"502":{"description":"Polymarket didn't answer."}}}},"/pm/event":{"get":{"tags":["Polymarket"],"servers":[{"url":"https://www.slay.money/api"}],"operationId":"pmEvent","summary":"One Polymarket event","description":"One event by its Polymarket id, for a market the catalog doesn't hold (a search result, a shared link). A closed event returns no markets.","parameters":[{"name":"id","in":"query","required":true,"description":"Polymarket event id (digits).","schema":{"type":"string","pattern":"^\\d{1,12}$"},"example":"1338742"}],"responses":{"200":{"description":"The event's market.","content":{"application/json":{"schema":{"type":"object","properties":{"markets":{"type":"array","items":{"$ref":"#/components/schemas/PmMarket"}}}}}}},"400":{"description":"Bad id."},"404":{"description":"No such event."}}}},"/pm/open":{"get":{"tags":["Polymarket"],"servers":[{"url":"https://www.slay.money/api"}],"operationId":"pmOpenPrice","summary":"Price to beat of an Up or Down window","description":"The coin's price when a timed Up or Down window opened: Polymarket's own figure, or Hyperliquid's price at that minute when Polymarket doesn't answer. `null` before the window opens.","parameters":[{"name":"symbol","in":"query","required":true,"description":"Coin.","schema":{"type":"string","enum":["BTC","ETH","SOL","XRP","DOGE","BNB","HYPE","ZEC"]},"example":"BTC"},{"name":"start","in":"query","required":true,"description":"Window start, ISO 8601 UTC.","schema":{"type":"string","format":"date-time"},"example":"2026-11-15T08:45:00Z"},{"name":"end","in":"query","required":true,"description":"Window end, ISO 8601 UTC.","schema":{"type":"string","format":"date-time"},"example":"2026-11-15T08:50:00Z"},{"name":"freq","in":"query","required":true,"description":"Window length.","schema":{"type":"string","enum":["5m","15m","1h","4h","daily","weekly","monthly","yearly"]},"example":"5m"}],"responses":{"200":{"description":"The price to beat.","content":{"application/json":{"schema":{"type":"object","properties":{"open":{"type":["number","null"],"description":"The price to beat; null when there's none yet."},"src":{"type":"string","enum":["polymarket","hyperliquid"],"description":"Whose figure it is."},"opensAt":{"type":"integer","description":"Before the window opens: when it does, ms."}}},"example":{"open":96231.5,"src":"polymarket"}}}},"400":{"description":"Bad parameters."}}}}}}