# FxSocket API Documentation

> Index of every docs page as Markdown: [llms.txt](https://fxsocket.com/docs/llms.txt). All pages in one file: [llms-full.txt](https://fxsocket.com/llms-full.txt).

Source: https://fxsocket.com/docs

FxSocket gives every trading account you link a REST API and a WebSocket stream: MetaTrader accounts on their own dedicated cloud terminal, cTrader accounts through our cTrader bridge. Pick your platform to dive into the reference, or go straight to the platform-wide API for multi-account execution and billing.

Every page below is also available as one file: https://fxsocket.com/llms-full.txt

## MetaTrader 5

REST & WebSocket API: account management, account data, market data, order execution, and live streams.

- [Overview](https://fxsocket.com/docs/mt5.md)
- [Authentication](https://fxsocket.com/docs/mt5/authentication.md): API keys: header or query parameter.
- [Managing accounts](https://fxsocket.com/docs/mt5/accounts.md): Link, list, and remove accounts via /v1.
- [Account data](https://fxsocket.com/docs/mt5/account-data.md): Balances, positions, history, and connection status.
- [Market data](https://fxsocket.com/docs/mt5/market-data.md): Symbols, quotes, price history, and contract specs.
- [Trading](https://fxsocket.com/docs/mt5/trading.md): Place, modify, and close orders.
- [WebSocket streams](https://fxsocket.com/docs/mt5/websocket.md): Live ticks, bars, positions, trades, and pending orders.
- [Errors & rate limits](https://fxsocket.com/docs/mt5/errors.md): Error codes, safe retries, and rate limits.

## MetaTrader 4

REST & WebSocket API: account management, account data, market data, order execution, and live streams.

- [Overview](https://fxsocket.com/docs/mt4.md)
- [Authentication](https://fxsocket.com/docs/mt4/authentication.md): API keys: header or query parameter.
- [Managing accounts](https://fxsocket.com/docs/mt4/accounts.md): Link, list, and remove accounts via /v1.
- [Account data](https://fxsocket.com/docs/mt4/account-data.md): Balances, positions, history, and connection status.
- [Market data](https://fxsocket.com/docs/mt4/market-data.md): Symbols, quotes, price history, and contract specs.
- [Trading](https://fxsocket.com/docs/mt4/trading.md): Place, modify, and close orders.
- [WebSocket streams](https://fxsocket.com/docs/mt4/websocket.md): Live ticks, bars, positions, trades, and pending orders.
- [Errors & rate limits](https://fxsocket.com/docs/mt4/errors.md): Error codes, safe retries, and rate limits.

## cTrader

REST & WebSocket API with the routes MT5 uses: cTrader sign-in, account data, market data, order execution, and live streams.

- [Overview](https://fxsocket.com/docs/ctrader.md)
- [Authentication](https://fxsocket.com/docs/ctrader/authentication.md): API keys: header or query parameter.
- [Managing accounts](https://fxsocket.com/docs/ctrader/accounts.md): Link with cTrader sign-in, list and remove via /v1.
- [Account data](https://fxsocket.com/docs/ctrader/account-data.md): Balances, positions, history, and connection status.
- [Market data](https://fxsocket.com/docs/ctrader/market-data.md): Symbols, quotes, price history, and contract specs.
- [Trading](https://fxsocket.com/docs/ctrader/trading.md): Place, modify, and close orders.
- [WebSocket streams](https://fxsocket.com/docs/ctrader/websocket.md): Live ticks, bars, positions, trades, and pending orders.
- [Errors & rate limits](https://fxsocket.com/docs/ctrader/errors.md): Error codes, safe retries, and rate limits.

## Platform API

The /v1 layer above the terminals: send one order to many accounts, close across them by selector, and top up the prepaid balance that renews them. Works across MT4, MT5 and cTrader in the same call.

- [Overview](https://fxsocket.com/docs/api.md)
- [Multi-account execution](https://fxsocket.com/docs/api/batch-orders.md): One order to many accounts, and selector-based closes across them.
- [Balance & top-ups](https://fxsocket.com/docs/api/wallet.md): Prepaid balance, crypto top-ups, seats and upcoming charges.

## MCP server for AI agents

Let Claude, Cursor, VS Code or any MCP client read your MT4, MT5 and cTrader accounts: balances, open positions, trade history, quotes and candles. Read-only, remote or as a Docker image. [Set up the MCP server](https://fxsocket.com/docs/mcp.md)

## Notion trade journal

Every closed MT4, MT5 and cTrader trade lands as a row in a Notion database, once each, with optional daily balance and equity snapshots. No code. [Connect Notion](https://fxsocket.com/docs/notion.md)

## Outbound webhooks

A signed JSON event at your own HTTPS endpoint for every MT4, MT5 and cTrader trade, pending order, balance change and broker disconnect. For n8n, Make, Zapier or your own code. [Set up webhooks](https://fxsocket.com/docs/webhooks-out.md)

## Docs for AI coding agents

A drop-in `AGENTS.md` rules file, every page as Markdown, and the whole reference in `llms-full.txt`, so Claude Code, Cursor, Codex and Copilot read the API instead of guessing it. [Set up your agent](https://fxsocket.com/docs/ai-agents.md)
