Skip to main content

Overview

Per-user; requires Authorization: Bearer nv_sk_…. Each tenant_user links their own brokerage account via OAuth; Naive proxies the brokerage’s trading API on their behalf. The same endpoints trade stocks, options, and crypto — the order symbol decides the market (AAPL, BTC/USD, AAPL241213C00250000). Naive is not a broker-dealer or investment adviser and does not exercise trading discretion — the user directs and approves every order. Routes are available both company-scoped (/v1/trading/..., acting as the account’s default agent profile) and per-user (/v1/users/:user_id/trading/...). Gated by the trading primitive in the user’s AccountKit.
Money-moving actions (POST /v1/trading/orders, DELETE /v1/trading/orders/:id, DELETE /v1/trading/positions/:symbol) are approval-gated by default. An agent (API-key) call may return 202 { "status": "pending_approval", "approval_id" }; a human approves it via Approvals and the action runs on replay. See Approvals.

Endpoints

All GET/DELETE endpoints accept an optional ?env=paper|live query param (required only when both environments are connected). MCP equivalents are naive_trading_*.

Connect

POST /v1/trading/connect
Show the returned disclosure to the user (required at connection time), then open authorize_url in a browser. After the user approves, the brokerage redirects to /v1/trading/oauth/callback, which exchanges the code for a token and marks the connection active. The scope’s spaces are %20-encoded (the authorize endpoint rejects the + form).

Place an Order

POST /v1/trading/orders
The request’s Idempotency-Key is forwarded as the order’s client_order_id so a retried order deduplicates at the broker.

Close a Position

DELETE /v1/trading/positions/:symbol

Market Data

GET /v1/trading/market-data

Errors