Funded with FlowTwo integration paths, one key: a REST API (/api/v1) for scripts and bots, and an MCP server for AI agents — both reading your accounts, positions and live risk through secure, permissioned tokens. When you choose, they can execute too.
Read-only by default · Trading stays gated until you opt in · Revoke anytime
Why it's safe
Connect agents to a live funded account without handing over the keys to the kingdom. Every permission is explicit, every call is gated and audited.
Every key carries an explicit scope set. Grant read-only analytics, research, or execution if you opt in. Nothing is implicit.
New keys can see accounts, positions, orders and risk. They cannot place a single order until you deliberately enable trading.
Execution requires the global switch, your per-account opt-in, a trading-enabled key, and the trade scope. If any one is off, no orders go through.
Tokens are shown once, stored only as HMAC-SHA256 hashes, expire automatically, and can be rotated or revoked instantly.
Tools call the same risk, accounts and order engine that runs the platform. Your agent sees the truth, not a stale copy.
Per-token rate limits and a full audit trail of every tool call, so you can trust an autonomous agent on a live account.
How it works
In your dashboard under API & MCP Access, mint a key with a permission preset: read-only, research, or execution.
Drop the server URL and your bearer token into your agent or MCP-compatible client config.
It reads accounts, positions and live risk in real time. If you enabled it, the agent also prepares and places guarded orders.
{
"mcpServers": {
"fundedwithflow": {
"url": "https://mcp.fundedwithflow.com/mcp",
"headers": { "Authorization": "Bearer fwf_mcp_•••your_key•••" }
}
}
}Tool catalog
Read-only tools available on every key. Execution tools unlock only when you enable trading.
REST API
Everything MCP tools can do is also a REST endpoint. The same keys authenticate both — Authorization: Bearer fwf_mcp_… — with the same scopes, gates and audit trail.
1. POST /api/v1/orders/preview with the order. The response carries previewId (single-use, 20s TTL) plus rule/margin impact, blocks, and warnings.
2. POST /api/v1/orders with EITHER { "previewId": "..." } alone (the server replays the exact previewed order) OR the SAME order fields + previewId. No previewId, no placement (ORDER_PREVIEW_REQUIRED); a reused previewId is PREVIEW_REPLAYED (409).
Send an Idempotency-Key header (or idempotencyKey body field) on placement. It maps to the order row idempotency key; a retried placement returns the ORIGINAL order with { ok: true, deduped: true } and can never double-fill.
Machine-readable contract: https://fundedwithflow.com/api/v1/doc.json · introspect your key: https://fundedwithflow.com/api/v1/info
# 1. Preview the order (mints a single-use previewId, 20s TTL)
PREVIEW=$(curl -s -X POST https://fundedwithflow.com/api/v1/orders/preview \
-H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d '{"symbol":"AAPL","side":"buy","quantity":1,"orderType":"limit","limitPrice":100}')
PID=$(echo "$PREVIEW" | jq -r .data.previewId)
# 2. Place it — Idempotency-Key makes retries safe (never double-places)
curl -X POST https://fundedwithflow.com/api/v1/orders \
-H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-H "Idempotency-Key: my-unique-id-1" \
-d "{\"previewId\":\"$PID\"}"
# 3. Cancel it
curl -X POST https://fundedwithflow.com/api/v1/orders/cancel \
-H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d '{"orderId":"ORDER_ID"}'| Method | Path | Scope | What it does |
|---|---|---|---|
| GET | /api/v1/info | — | API-key introspection: mode, scopes, eligible accounts, limits, trading availability. |
| GET | /api/v1/doc.json | — | This document. |
| GET | /api/v1/account | account:read | Active account snapshot: code, type, status, balances, rule fields (null on paper by design), flags. |
| GET | /api/v1/accounts | account:read | All owned accounts with active marker + automation-eligibility flags. |
| GET | /api/v1/positions | positions:read | Open positions on the active account, including option combos. |
| GET | /api/v1/orders?status=working|all | orders:read | Working orders (default) or recent history (status=all, capped at 200). |
| GET | /api/v1/fills?limit=N | fills:read | Closed trades (limit defaults 50, cap 300). |
| GET | /api/v1/quote?symbol=X | market:read | Latest platform quote for a symbol. SIMULATED platform quote, not a consolidated tape. |
| GET | /api/v1/rules | risk:read | Account rule set + current usage (daily loss, drawdown, profit target, consistency). Nulls on paper are intentional. |
| POST | /api/v1/orders/preview | orders:preview | Preview an order; mints the single-use previewId (20s TTL) required for placement. |
| POST | /api/v1/orders/validate | orders:validate | Validate an order against account rules (verdict only; never mints a confirmation). |
| POST | /api/v1/orders | orders:place | Place a limit/stop/stop-limit order. Requires previewId; Idempotency-Key header makes retries safe. |
| POST | /api/v1/orders/cancel | orders:cancel | Cancel one working order (body: { "orderId": "..." }). |
| POST | /api/v1/orders/cancel-all | orders:cancel_all | Cancel every working order on the active account. |
| POST | /api/v1/positions/close | positions:close | Close a position by symbol (pass the full position quantity for a full close). |
| POST | /api/v1/account/flatten | account:flatten | Cancel all orders and close all stock/futures positions on the active account. Option combos are reported, not flattened. |
Manage keys in the dashboard under API & MCP Access. Trading endpoints additionally require the platform trading switch, your per-account trading opt-in, and a trading-enabled key.
Security model
Every tool call passes an authorization gate that AI text can never influence: global switch → maintenance → your account opt-in → token rate limit → scopes → trading gates → account / asset / symbol restrictions. Keys are user-scoped. They are never admin and never cross-account.
Mint a scoped key in seconds. It starts read-only, so you flip on trading only when you're ready.