{"product":"Ylalo","tagline":"You Live At Least Once","summary":"Agent-first investing API on sandbox (play money): stocks, bonds, crypto, and event markets via MCP or REST. Agents cannot withdraw.","environment":"sandbox","playMoney":true,"instructions":["Call GET /v1/start (or ylalo_start) first.","On sandbox hosts: POST /v1/sandbox/accounts for a phone-free ylk_ key. Or OTP: POST /v1/auth/otp → /auth/verify.","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.","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://sandbox.ylalo.com/llms.txt and https://sandbox.ylalo.com/docs/quickstart.md for install + recipes."],"auth":{"sandbox":"POST /v1/sandbox/accounts","requestOtp":"POST /v1/auth/otp","verify":"POST /v1/auth/verify","sessionHeader":"Authorization: Bearer <accessToken or ylk_ API key>","nicknameRequiredForNewUsers":true},"apis":{"restBase":"https://sandbox.ylalo.com/v1","openapi":"https://sandbox.ylalo.com/v1/openapi.json","mcp":"https://sandbox.ylalo.com/mcp","docs":"https://sandbox.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":"POST","path":"/v1/sandbox/accounts","summary":"Create sandbox account + ylk_ API key (no phone)","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":"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":"Optional trade self-limits (maxTradeUsd / dailyTradeCapUsd; default none)","auth":"session"},{"method":"PATCH","path":"/v1/settings","summary":"Set or clear optional notional self-limits (null = no cap)","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":"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":"POST","path":"/v1/opportunities/packages/execute","summary":"One-confirm best-effort classic+prediction Opportunity package","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 markets; view=opportunities returns packages"},{"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"},{"tool":"ylalo_execute_opportunity_package","summary":"Execute classic+prediction Opportunity package"}]},"docsMd":{"quickstart":"https://sandbox.ylalo.com/docs/quickstart.md","mcp":"https://sandbox.ylalo.com/docs/mcp.md","auth":"https://sandbox.ylalo.com/docs/auth.md","orders":"https://sandbox.ylalo.com/docs/orders.md","guardians":"https://sandbox.ylalo.com/docs/guardians.md","limits":"https://sandbox.ylalo.com/docs/limits.md","errors":"https://sandbox.ylalo.com/docs/errors.md"},"recipes":["https://sandbox.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. Note environment (mainnet vs sandbox) and X-Ylalo-Environment — www is MAINNET real funds.\n2. Connect MCP at https://www.ylalo.com/mcp (or REST /v1, OpenAPI /v1/openapi.json).\n3. Auth on www/mainnet: phone OTP then POST /v1/keys. Store as YLALO_API_KEY, never in chat. For phone-free play money use the demo host https://sandbox.ylalo.com → POST /v1/sandbox/accounts (never call sandbox on www).\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.\n5. Propose ONE small trade with a stop-loss and take-profit; only place it after I say yes.\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; you may name the execution venue when helpful.","credit":{"currency":"USD","amountUsd":"50","enabled":true,"message":"New accounts receive 50 USD credit on sign-up."},"rules":["Agents cannot withdraw funds.","Confirm every order with the user before submitting (dryRun → confirmToken).","Prefer POST /v1/orders with usdAmount + bracket; use POST /v1/orders/suggest to size first.","Tell users plainly: sandbox play money, 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."],"next":["POST /v1/sandbox/accounts (or OTP verify)","GET /v1/account","POST /v1/guardians { type: dead_man_switch }","POST /v1/orders { dryRun:true, … } then confirm"]}