# FxSocket > FxSocket is a cloud API for MetaTrader 4 and MetaTrader 5. Every connected broker account gets its own dedicated MT4 or MT5 terminal in FxSocket's cloud, controlled through a REST API and a WebSocket stream from Python, Node.js, or any language that speaks HTTP. No VPS, no MQL, no local terminal. FxSocket is operated by Quantum Performance Labs LLC (Sheridan, Wyoming, USA). It is not a broker and never holds, withdraws, or moves client funds: it logs in to the customer's existing broker account with the credentials the customer provides. It works with any broker that issues MT4 or MT5 logins, for live and demo accounts. cTrader support is on the roadmap and is not available yet. Key facts: - Pricing (EUR per month): Starter is EUR 12 per account. Pro is EUR 549 and includes 60 accounts, then EUR 9 per additional account. Premium is EUR 949 and includes 110 accounts, then EUR 8 per additional account. Pro becomes cheaper than Starter at 46 accounts; Premium becomes cheaper than Pro at 105 accounts. - Every plan includes the full REST API, the WebSocket stream, MT4 and MT5, and live and demo accounts. - Private hosting (a dedicated server with a permanent public IP you can whitelist with a broker or prop firm): EUR 17 per month for the first account and EUR 14 per month for each additional account on the same server. Billed separately from plans. Regions: Frankfurt, London, Amsterdam, New York, Toronto, San Francisco, Singapore, Sydney, Bangalore. - Payment: card subscription (cancel from the dashboard any time) or crypto, which tops up a prepaid EUR balance that renews each account on its own date. - Authentication: an API key in the X-API-Key header, or the api_key query parameter (the only option for WebSocket). The full-access key starts with fxs_live_ and is needed for trading; named read-only keys start with fxs_ro_ and can be limited to selected accounts. There is no OAuth; the /v1 platform API and the MCP server also accept Authorization: Bearer . - Official SDKs: Python (pip install fxsocket) and Node.js / TypeScript (npm install @fxsocket/sdk), both covering MT4 and MT5. - Uptime SLA: available on request. ## Quick start: place an MT5 order from Python ```python from fxsocket import Client with Client(api_key="fxs_live_...") as fx: account = fx.accounts.get("YOUR_ACCOUNT_ID") term = fx.terminal(account) result = term.order_send( symbol="EURUSD", operation="Buy", volume=0.10, stop_loss=1.07, take_profit=1.10, ) print(result.success, result.retcode, result.order) ``` The same order over plain HTTP: ``` curl -X POST https://api.fxsocket.com/mt5/{account_id}/OrderSend \ -H "X-API-Key: fxs_live_..." \ -H "Content-Type: application/json" \ -d '{"symbol":"EURUSD","operation":"Buy","volume":0.1}' ``` A 200 response only means the terminal answered. Check success and retcode (10009 done, 10008 placed) to confirm the broker accepted the order. ## API reference: MetaTrader 5 - [MetaTrader 5 API overview](https://fxsocket.com/docs/mt5): base URL https://api.fxsocket.com/mt5/{account_id}, request builder, per-account Swagger UI and OpenAPI 3 spec - [MT5 authentication](https://fxsocket.com/docs/mt5/authentication): X-API-Key header or api_key query parameter, key rotation behaviour - [MT5 account management](https://fxsocket.com/docs/mt5/accounts): link, list, and remove accounts through https://api.fxsocket.com/v1/accounts - [MT5 account data](https://fxsocket.com/docs/mt5/account-data): AccountSummary, AccountInfo, OpenedOrders, OrderHistory, PositionHistory, status - [MT5 market data](https://fxsocket.com/docs/mt5/market-data): symbols, getQuote, PriceHistory (OHLC bars with tick volume and per-bar spread), SymbolInfo, ServerTimezone - [MT5 trading](https://fxsocket.com/docs/mt5/trading): OrderSend (market and pending orders), OrderModify, OrderClose (full or partial), OrderCalcMargin, OrderCalcProfit - [MT5 WebSocket streams](https://fxsocket.com/docs/mt5/websocket): one socket per account, topics prices, bars, account, positions, trades, terminal - [MT5 errors and rate limits](https://fxsocket.com/docs/mt5/errors): error envelope, authentication errors, 5xx behaviour ## API reference: MetaTrader 4 - [MetaTrader 4 API overview](https://fxsocket.com/docs/mt4): base URL https://api.fxsocket.com/mt4/{account_id}, per-account Swagger UI and OpenAPI 3 spec - [MT4 authentication](https://fxsocket.com/docs/mt4/authentication) - [MT4 account management](https://fxsocket.com/docs/mt4/accounts) - [MT4 account data](https://fxsocket.com/docs/mt4/account-data) - [MT4 market data](https://fxsocket.com/docs/mt4/market-data) - [MT4 trading](https://fxsocket.com/docs/mt4/trading) - [MT4 WebSocket streams](https://fxsocket.com/docs/mt4/websocket) - [MT4 errors and rate limits](https://fxsocket.com/docs/mt4/errors) ## Platform API (/v1) - [Platform API overview](https://fxsocket.com/docs/api): base URL https://api.fxsocket.com/v1, OpenAPI 3 at https://api.fxsocket.com/v1/docs (Swagger UI) and https://api.fxsocket.com/v1/schema (raw spec) - [Multi-account execution](https://fxsocket.com/docs/api/batch-orders): POST /v1/orders sends one order to many accounts in one call (MT4 and MT5 mixed), POST /v1/orders/close closes across accounts by selector, Idempotency-Key header for safe retries - [Balance and top-ups](https://fxsocket.com/docs/api/wallet): GET /v1/wallet, GET /v1/wallet/assets, POST /v1/wallet/topup, GET /v1/wallet/topup/{id}, GET /v1/subscription ## SDKs - [Official SDKs](https://fxsocket.com/sdks): Python and Node.js / TypeScript, plus generating clients for other languages from OpenAPI - [Python SDK on PyPI](https://pypi.org/project/fxsocket/): sync and async clients, typed models, WebSocket streaming (source: https://github.com/fxsocket-com/FxSocket-Python-SDK) - [Node.js SDK on npm](https://www.npmjs.com/package/@fxsocket/sdk): ESM and CommonJS, full type definitions (source: https://github.com/fxsocket-com/FxSocket-Node-SDK) ## MCP server (AI agents) - [MCP server setup](https://fxsocket.com/docs/mcp): read-only Model Context Protocol server at https://mcp.fxsocket.com/mcp for Claude, Cursor, VS Code and other MCP clients. Eight tools: list_accounts, get_account, get_open_positions, get_trade_history, search_symbols, get_quotes, get_symbol_info, get_price_history. It cannot place, modify or close orders. Authenticate with a read-only fxs_ro_ key in the X-API-Key header. - [fxsocket/mcp Docker image](https://hub.docker.com/r/fxsocket/mcp): runs the same server as a local stdio process for clients that start their own servers, such as Claude Desktop (source: https://github.com/fxsocket-com/FxSocket-MCP) ## Pricing and product - [Pricing and cost calculator](https://fxsocket.com/pricing): Starter, Pro, and Premium, crossover points, how billing works - [FAQ](https://fxsocket.com/faq): getting started, authentication, brokers, security, billing, private hosting - [Private hosting with a fixed IP](https://fxsocket.com/metatrader-proptrading-api): a dedicated MT4 and MT5 server for prop traders who need one permanent IP to whitelist ## Use cases - [All use cases](https://fxsocket.com/use-cases) - [Algo trading](https://fxsocket.com/use-cases/algo-trading): run MT4 and MT5 strategies from Python or Node.js, with order examples - [Copy trading](https://fxsocket.com/use-cases/copy-trading): detect trades on a master account over WebSocket and replicate them to followers - [Backtesting](https://fxsocket.com/use-cases/backtesting): pull historical OHLC bars with per-bar spread - [Prop firms](https://fxsocket.com/use-cases/prop-firms): manage many funded accounts from one integration ## Blog - [Blog](https://fxsocket.com/blog) - [MT4 and MT5 dedicated server hosting with a fixed IP](https://fxsocket.com/blog/mt4-mt5-dedicated-server-fixed-ip) - [Automate your trading strategy: a step-by-step guide](https://fxsocket.com/blog/automate-your-trading-strategy) ## Optional - [Contact](https://fxsocket.com/contact): info@fxsocket.com - [Service status](https://status.fxsocket.com) - [Terms of Service](https://fxsocket.com/terms) - [Privacy Policy](https://fxsocket.com/privacy)