Build
API
Every HTTP route and socket on Sōba's server, grouped by what it does, with who may call it.
The server answers at api.usesoba.xyz. Everything under /api/connections, /activity, /me, /portfolio, /glasses, /contacts, /watchlist, /shortcuts, /telegram, /calls, /trade, /ask, /earn needs a session cookie. Guests (Try, sandbox) can't add, change or remove connections or contacts (GET only there). CORS allows the website's origin only.
| Method | Path | Does |
|---|---|---|
| GET · POST | /api/auth/* | Better Auth: email code, wallet (SIWE), Google, Telegram, device code, guests, bearer |
| GET | /api/config | Which sign-in methods are on |
| POST | /api/telegram-webhook | Telegram updates (secret-checked) |
| POST | /api/nansen-webhook | Nansen wallet alerts (HMAC-SHA256 signed) |
| GET | /health | Status |
| Method | Path | Does |
|---|---|---|
| GET | /api/connections | Your logins (public details only, never a secret) |
| POST | /api/connections/hyperliquid/prepare · /:id/hyperliquid/activate | Make an agent key · confirm your wallet approved it |
| POST | /api/connections/hyperliquid/watch · /hyperliquid/api-wallet | Read-only by address · paste an API-wallet key |
| POST | /api/connections/polymarket/lookup · /polymarket | "Is this you?" · save read-only |
| POST | /:id/polymarket/session · /session/activate · /session/forget | Session key: make · confirm · turn trading off |
| POST | /api/connections/exchange | Binance, Bybit, OKX or Coinbase key, checked before it's saved |
| POST | /api/connections/gram/start · /trust/start; GET /:id/pairing | Start TON Connect · WalletConnect; poll the pairing |
| PUT | /:id/trading | Pause or resume trading on one login |
| GET | /:id/deposit · /:id/fund · /:id/polymarket/deposit | Deposit address · Add money routes · Polymarket bridge addresses |
| DELETE | /:id | Disconnect; Sōba's copy of the key is destroyed |
| Method | Path | Does |
|---|---|---|
| POST | /api/trade/prepare | Check and word a trade into a ticket (2 min, at most 20 held) |
| POST | /api/trade/:id/confirm | Send that ticket, once |
| GET | /api/trade/spot-price · /spot-chart | Spot price and history on a login |
| POST | /api/ask · /api/ask/voice | Ask Sōba, typed or a recorded clip (≤ 20 s) |
| GET | /api/earn · /api/earn/validators | Earn products; HYPE validators |
| Method | Path | Does |
|---|---|---|
| GET · PUT | /api/me · /api/me/mode | Settings · switch Real ⇄ Practice (website and glasses together) |
| GET · PUT | /api/me/alerts · /api/me/alerts/mute | Alert settings · pause 15 min |
| GET · POST · DELETE | /api/watchlist, /:id/alerts, /alerts/:id/rearm | Watched coins and markets, one-time price alerts |
| GET · POST · PATCH · DELETE | /api/shortcuts, /:id, /:id/test | Shortcuts, and "Test on glasses" (sends nothing) |
| GET · POST · PUT · DELETE | /api/telegram, /link, /settings, /summary | The bot link and delivery settings |
| GET · POST · DELETE | /api/calls, /:id/ignore, /channels/:id/mute | Trade calls and callers |
| GET | /api/portfolio · /listings · /history | Holdings, coins each app lists, value history (1d/1w/1m/all) |
| GET · DELETE | /api/glasses · /:id | Linked pairs (tokens stripped) · unlink one |
| GET · POST · DELETE | /api/contacts | Saved send contacts (12 at most) |
| GET | /api/activity · /:id · /wallets | Activity pages · one record · on-chain wallet history |
| Method | Path | Does |
|---|---|---|
| GET | /api/market/perps · /bets · /bets/event/:slug · /:symbol | Hyperliquid perps, Polymarket events, a coin card with Nansen context |
| GET | /api/demo/portfolio · /deck · /ticker | The read-only public demo (60 requests a minute) |
| POST | /api/try/start · /touch · /end | Lend, keep or return a Try seat |
| POST | /api/sandbox/start · /nudge | A paper account; "what if the price moves" |
Sockets
| Path | Auth | Carries |
|---|---|---|
/ws/glasses | Pairing, then the pair's token inside the socket | The lens protocol: deck, interrupt, voice, actStatus, activity (≤ 40), prefs; from the plugin act, gesture, menu, view, mute, mic audio. A repeated tap (same request id) is answered, never re-run, for 15 min. |
/ws/mirror | Website session | Portfolio, mode, alerts, the glasses' view |
/ws/demo | Public, 4 per IP | Demo portfolio, deck, ticker |