# Ylalo > Trading API built for AI agents. Stocks, bonds, crypto, and event markets through MCP or REST. > Currently MAINNET with real funds. Agents can trade; agents cannot withdraw. > API 0.6.0 · limitsVersion 2 · onboarding credit ~$0 USD when grants are on. ## Start here - MCP (streamable HTTP): https://www.ylalo.com/mcp · Install: https://www.ylalo.com/docs/mcp.md - REST: https://www.ylalo.com/v1 · OpenAPI: https://www.ylalo.com/v1/openapi.json · Agent bootstrap: GET /v1/start - Agent card: https://www.ylalo.com/agent.json · Quickstart: https://www.ylalo.com/docs/quickstart.md · Full docs: https://www.ylalo.com/llms-full.txt ## Auth - Phone OTP (mainnet / www): POST /v1/auth/otp → POST /v1/auth/verify, then optional POST /v1/keys - OAuth device flow (partial): POST /v1/oauth/device → POST /v1/oauth/device/token - Sandbox (phone-free play money): use https://sandbox.ylalo.com → POST /v1/sandbox/accounts (not available on www) - Send Authorization: Bearer . Never put keys in chat or code; use env var YLALO_API_KEY. ## Core docs - [Orders, brackets, limit](https://www.ylalo.com/docs/orders.md) · [Guardians / dead-man](https://www.ylalo.com/docs/guardians.md) - [Limits](https://www.ylalo.com/docs/limits.md) · [Errors](https://www.ylalo.com/docs/errors.md) · [Idempotency](https://www.ylalo.com/docs/idempotency.md) - [Market data](https://www.ylalo.com/docs/market-data.md) · [Events](https://www.ylalo.com/docs/events.md) · [Conventions](https://www.ylalo.com/docs/conventions.md) - [Auth](https://www.ylalo.com/docs/auth.md) · [MCP install](https://www.ylalo.com/docs/mcp.md) · [Changelog](https://www.ylalo.com/v1/changelog) ## Rules for agents - Confirm size, side and leverage with the user before placing orders. Prefer attaching a stop or guardian. - Tell users plainly: leveraged products, mainnet, liquidation risk. Use stocks/bonds/portfolio/NAV language. - Prefer clear risk language; you may name the execution venue when helpful. - Check GET /v1/changelog when behaviour seems off. - Prefer POST /v1/orders/suggest then POST /v1/orders (or ylalo_suggest_order / ylalo_place_order). Use Idempotency-Key on writes. - Dead-man / guardians: POST /v1/guardians + POST /v1/heartbeat so protection continues while the agent sleeps. - Sandbox is not available on www — use https://sandbox.ylalo.com → POST /v1/sandbox/accounts for play money. ## Copy-paste prompt ``` Set me up to trade on Ylalo. 1. 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. 2. Connect MCP at https://www.ylalo.com/mcp (or REST /v1, OpenAPI /v1/openapi.json). 3. 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). 4. 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. 5. Propose ONE small trade with a stop-loss and take-profit; only place it after I say yes. 6. 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/*. 7. Use stocks/bonds/portfolio/NAV language with users. Prefer clear risk language; you may name the execution venue when helpful. ``` ## Optional - Status: https://www.ylalo.com/status · Fees: https://www.ylalo.com/fees · Privacy: https://www.ylalo.com/privacy · Risk: https://www.ylalo.com/risk - security.txt: https://www.ylalo.com/.well-known/security.txt - MCP server card: https://www.ylalo.com/.well-known/mcp/server-card