Skip to main content
The easiest way: ask your AI assistant. With Itoflow MCP connected to Claude or Codex, paste:

Open in Claude

Start this in Claude with the Itoflow plugin.

Open in ChatGPT

Start this in ChatGPT with the Itoflow plugin.
Using another client? Copy the prompt with the button on the code block.To connect a broker, use the app; never paste broker keys into a chat. The rest of this page covers the HTTP API.
A broker connection links your brokerage account to Itoflow so a live portfolio can read holdings and, after your approval, place trades. Itoflow supports Trading 212. Connecting any other broker returns 400 UNSUPPORTED_BROKER. We recommend connecting a broker in the Itoflow app, which guides you through each broker’s steps. The endpoints below do the same thing.

Connect

POST /brokers/connect with "broker_type": "trading212". Send your API key and secret as api_key and api_secret, and a permissions object. The key needs all eight permissions set to true: metadata, account_data, portfolio, orders_execute, orders_read, history_orders, history_transactions and history_dividends. If any is missing, you get 400 MISSING_REQUIRED_PERMISSIONS with the missing ones in details. The call connects straight away and returns connection_id, sync_status and portfolio_id. Treat the key and secret like passwords: load them from a secret store, never from source code, and don’t log them. Then poll GET /brokers/{connectionId}/status until the connection is ready. A successful connect doesn’t mean holdings have synced yet.

Read

Reconnect

When the status says a reconnect is needed, call POST /brokers/{connectionId}/reconnect. Trading 212 also has:
  • POST /brokers/{connectionId}/trading212/reconnect to reconnect with a new key and secret.
  • POST /brokers/{connectionId}/trading212/reconnect-stored to retry with the key Itoflow already holds.
  • POST /brokers/trading212/connect-manual, another way to connect with an API key.

Disconnect

DELETE /brokers/{connectionId} disconnects the account. The response doesn’t tell you what happened to open positions or orders, so first check any live portfolio that uses the connection and cancel its pending trades. A connection ID only works for the account that owns it. See the broker endpoint reference for each broker’s fields and errors.