{"product":"Ylalo","tagline":"You Live At Least Once","summary":"Agent-first investing API: stocks, bonds, crypto, and event markets via MCP or REST. Real funds on mainnet. Agents cannot withdraw.","environment":"mainnet","playMoney":false,"instructions":["Call GET /v1/start (or ylalo_start) first.","Phone OTP (POST /v1/auth/otp → /auth/verify), then optional POST /v1/keys.","Send Authorization: Bearer <token> on REST and MCP (never pass tokens as MCP tool arguments).","Preferred snapshot: GET /v1/account (or ylalo_get_account).","Plan then confirm: POST /v1/orders { dryRun:true, usdAmount, bracket } → show summary → confirm.","Explore crypto (asset_class=crypto), stocks (asset_class=stocks), and prediction markets (asset_class=prediction + POST /v1/outcomes/trade).","Share webWatch.url from home/portfolio so the user can open the public dashboard in a browser.","On mainnet / when you cannot place for the user: share dryRun.approveUrl — human opens Approve / Cancel, then lands on their NAV.","Attach guardians so protection runs while the agent sleeps.","On resume: GET /v1/events?since=<lastEventId> then GET /v1/account.","GET /v1/changelog when behaviour seems off.","Read https://www.ylalo.com/llms.txt and https://www.ylalo.com/docs/quickstart.md for install + recipes."],"auth":{"requestOtp":"POST /v1/auth/otp","verify":"POST /v1/auth/verify","sessionHeader":"Authorization: Bearer <accessToken or ylk_ API key>","nicknameRequiredForNewUsers":true},"apis":{"restBase":"https://www.ylalo.com/v1","openapi":"https://www.ylalo.com/v1/openapi.json","mcp":"https://www.ylalo.com/mcp","docs":"https://www.ylalo.com/docs","rest":[{"method":"GET","path":"/v1/start","summary":"Agent onboarding instructions and available APIs","auth":"none"},{"method":"GET","path":"/v1/changelog","summary":"Public API changelog and limitsVersion","auth":"none"},{"method":"GET","path":"/v1/auth/countries","summary":"Country list for flexible phone sign-in","auth":"none"},{"method":"POST","path":"/v1/auth/otp","summary":"Request SMS verification code","auth":"none"},{"method":"POST","path":"/v1/auth/verify","summary":"Verify code; create account on first use; returns accessToken","auth":"none"},{"method":"DELETE","path":"/v1/auth/session","summary":"Revoke the current session","auth":"session"},{"method":"POST","path":"/v1/oauth/device","summary":"OAuth device flow for headless bots","auth":"none"},{"method":"GET","path":"/v1/account","summary":"One-call snapshot: positions, orders, guardians, limits, lastEventId","auth":"session"},{"method":"GET","path":"/v1/limits","summary":"Platform + account + key + rate limits","auth":"session"},{"method":"POST","path":"/v1/orders","summary":"Intent order: usdAmount, bracket, guardians, dryRun plan","auth":"session"},{"method":"POST","path":"/v1/orders/confirm","summary":"Confirm a dryRun plan via confirmToken","auth":"session"},{"method":"GET","path":"/v1/orders/approve/{token}","summary":"Public preview for click-to-approve trade link (from dryRun.approveUrl)","auth":"none"},{"method":"POST","path":"/v1/orders/approve/{token}","summary":"Public execute for click-to-approve link; then open redirectUrl (NAV)","auth":"none"},{"method":"POST","path":"/v1/orders/approve/{token}/cancel","summary":"Public cancel for click-to-approve link","auth":"none"},{"method":"POST","path":"/v1/orders/suggest","summary":"Size open/close to venue min and book depth","auth":"session"},{"method":"POST","path":"/v1/positions/{market}/close","summary":"Close position by market (fraction|usdAmount|size)","auth":"session"},{"method":"GET","path":"/v1/events","summary":"Cursor event feed since lastEventId","auth":"session"},{"method":"GET","path":"/v1/events/stream","summary":"SSE event stream for connected agents","auth":"session"},{"method":"POST","path":"/v1/guardians","summary":"Attach server-side guardians","auth":"session"},{"method":"POST","path":"/v1/heartbeat","summary":"Refresh dead-man-switch deadline","auth":"session"},{"method":"POST","path":"/v1/account/kill","summary":"Kill switch: flatten and cancel","auth":"session"},{"method":"POST","path":"/v1/webhooks","summary":"Register HMAC webhook for fills/triggers/guardians","auth":"session"},{"method":"GET","path":"/v1/home","summary":"Post-signin home: portfolio slice, guidance, webWatch","auth":"session"},{"method":"GET","path":"/v1/portfolio","summary":"Account value, positions, funding, guidance","auth":"session"},{"method":"GET","path":"/v1/settings","summary":"Self-limits plus open_as_draft / close_as_draft (always true → dryRun + human approveUrl required)","auth":"session"},{"method":"PATCH","path":"/v1/settings","summary":"Set or clear optional notional self-limits (null = no cap); draft flags are not patchable","auth":"session"},{"method":"POST","path":"/v1/keys","summary":"Create scoped agent API key (ylk_…); secret shown once","auth":"session"},{"method":"GET","path":"/v1/keys","summary":"List agent API keys (prefix only)","auth":"session"},{"method":"GET","path":"/v1/keys/personal","summary":"Account API key for the signed-in user (phone session). Shown again from Settings.","auth":"session"},{"method":"DELETE","path":"/v1/keys/{id}","summary":"Revoke an agent API key","auth":"session"},{"method":"GET","path":"/v1/funding","summary":"Funding instructions for the Ylalo account","auth":"session"},{"method":"GET","path":"/v1/markets","summary":"Search stocks, bonds, crypto, and event markets","auth":"none"},{"method":"GET","path":"/v1/markets/{coin}/candles","summary":"OHLCV candles for a perp","auth":"none"},{"method":"GET","path":"/v1/markets/{coin}/book","summary":"Order-book snapshot for a perp","auth":"none"},{"method":"GET","path":"/v1/orders","summary":"List open and trigger orders","auth":"session"},{"method":"DELETE","path":"/v1/orders/{oid}","summary":"Cancel one order by venue oid","auth":"session"},{"method":"DELETE","path":"/v1/orders","summary":"Cancel all orders for a coin (?coin=)","auth":"session"},{"method":"POST","path":"/v1/outcomes/trade","summary":"Buy or sell an event-market share","auth":"session"},{"method":"GET","path":"/v1/positions","summary":"Open positions and event-market balances","auth":"session"},{"method":"GET","path":"/v1/trades","summary":"Trade history","auth":"session"},{"method":"GET","path":"/v1/pnl","summary":"Realized and unrealized P&L (USD)","auth":"session"},{"method":"GET","path":"/v1/nav","summary":"NAV and time series","auth":"session"},{"method":"GET","path":"/v1/system/status","summary":"Public health and limits","auth":"none"},{"method":"GET","path":"/v1/wallets/{address}","summary":"Public read-only portfolio for a wallet","auth":"none"}],"mcpTools":[{"tool":"ylalo_start","summary":"Agent onboarding instructions and available APIs (call first)"},{"tool":"ylalo_help","summary":"Start + latest changelog"},{"tool":"ylalo_get_changelog","summary":"Public API changelog and limitsVersion"},{"tool":"ylalo_request_otp","summary":"Request SMS verification code"},{"tool":"ylalo_verify_otp","summary":"Verify code and open session; creates account on first use"},{"tool":"ylalo_get_account","summary":"One-call account snapshot"},{"tool":"ylalo_get_limits","summary":"Platform + account + key limits"},{"tool":"ylalo_search_markets","summary":"Search stocks, bonds, crypto, and event markets"},{"tool":"ylalo_get_market_data","summary":"Candles or book for a coin"},{"tool":"ylalo_suggest_order","summary":"Size open/close to venue min and book depth"},{"tool":"ylalo_plan_order","summary":"Dry-run intent order → planId + confirmToken"},{"tool":"ylalo_place_order","summary":"Place intent order (usdAmount + bracket + guardians)"},{"tool":"ylalo_close_position","summary":"Close by market with fraction or usdAmount"},{"tool":"ylalo_manage_orders","summary":"List/cancel resting and trigger orders"},{"tool":"ylalo_manage_guardians","summary":"Create/list/delete guardians or heartbeat"},{"tool":"ylalo_get_events","summary":"Events since cursor"},{"tool":"ylalo_get_trade_history","summary":"Trade history"},{"tool":"ylalo_manage_api_keys","summary":"Create/list/revoke agent API keys"},{"tool":"ylalo_trade_outcome","summary":"Buy or sell an event-market share"}]},"docsMd":{"quickstart":"https://www.ylalo.com/docs/quickstart.md","mcp":"https://www.ylalo.com/docs/mcp.md","auth":"https://www.ylalo.com/docs/auth.md","orders":"https://www.ylalo.com/docs/orders.md","guardians":"https://www.ylalo.com/docs/guardians.md","limits":"https://www.ylalo.com/docs/limits.md","errors":"https://www.ylalo.com/docs/errors.md"},"recipes":["https://www.ylalo.com/docs/recipes/first-protected-trade.md"],"prompt":"Set me up to trade on Ylalo.\n1. Read https://www.ylalo.com/llms.txt and GET /v1/start. www is real funds. Check X-Ylalo-Environment.\n2. Connect MCP at https://www.ylalo.com/mcp (or REST /v1, OpenAPI /v1/openapi.json).\n3. Auth: phone OTP then POST /v1/keys. Store as YLALO_API_KEY, never in chat.\n4. Show balance and limits (GET /v1/account). Attach a dead-man or stop guardian if you may sleep. Tell me plainly: leveraged products, environment, liquidation risk. Share webWatch.url so I can open the public portfolio UI.\n5. Propose ONE small trade with a stop-loss and take-profit; only place it after I say yes. Crypto, stocks, and prediction markets are available (hints[] / guidance.features). On mainnet, prefer dryRun and share approveUrl so I can Approve / Cancel in the browser if you cannot place.\n6. Prefer ylalo_suggest_order / POST /v1/orders/suggest, then place with POST /v1/orders or ylalo_place_order (brackets/guardians when possible). Do not use /v1/perps/*.\n7. Use stocks/bonds/portfolio/NAV language with users. Prefer clear risk language. Do not name the execution venue.","credit":{"currency":"USD","amountUsd":null,"enabled":false,"message":"Fund your Ylalo account before trading. See GET /v1/funding after sign-in."},"rules":["Agents cannot withdraw funds.","Confirm every order with the user before submitting (dryRun → confirmToken, or share approveUrl for one-click human approve).","Prefer POST /v1/orders with usdAmount + bracket; use POST /v1/orders/suggest to size first.","Tell users plainly: mainnet real funds, leveraged products, liquidation risk. Use TradFi language (stocks, bonds, portfolio, NAV, USD).","Share webWatch.url so the user can follow the portfolio in a browser (read-only, no sign-in).","Sessions are stored in the database and survive redeploys. On 401 session_expired, re-authenticate.","New human accounts need a pre-approved phone. If OTP returns phone_not_approved, POST /v1/waitlist { phoneNumber } so they join the waiting list."],"next":["POST /v1/auth/otp","POST /v1/auth/verify","GET /v1/account","GET /v1/funding","POST /v1/orders { dryRun:true, … }"],"hints":[{"code":"share_web_ui","message":"Share the web UI with the user: after sign-in, GET /v1/home or /v1/portfolio returns webWatch.url (/{walletAddress}) — public read-only dashboard for NAV, P&L, and positions; no sign-in required.","docsUrl":"https://www.ylalo.com/docs/account.md"},{"code":"try_crypto_markets","message":"Crypto trading: GET /v1/markets?query=BTC&asset_class=crypto (or ylalo_search_markets), size with POST /v1/orders/suggest, then POST /v1/orders / ylalo_place_order. Tickers like BTC, ETH.","docsUrl":"https://www.ylalo.com/docs/orders.md"},{"code":"try_prediction_markets","message":"Prediction / event markets: GET /v1/markets?asset_class=prediction then POST /v1/outcomes/trade (or ylalo_trade_outcome). Fully collateralized Yes/No shares — no leverage.","docsUrl":"https://www.ylalo.com/docs/market-data.md"},{"code":"try_stock_markets","message":"Stock perps alongside crypto: GET /v1/markets?query=AAPL&asset_class=stocks then POST /v1/orders. Equity tickers like AAPL, TSLA.","docsUrl":"https://www.ylalo.com/docs/orders.md"}]}