# Pipwire > Pipwire is a hosted REST and WebSocket API for MetaTrader 5 accounts (not the PipeWire audio server). Connect a broker login and Pipwire runs a terminal for it, keeps it signed in, and serves the account's positions, history, prices and candles, or places orders, over HTTPS. Not affiliated with MetaQuotes Ltd. Agent notes: - API base URL: https://api.pipwire.io/v1 - Auth: send an API key as `Authorization: Bearer pw_...` (create keys in the dashboard). Read-only keys cannot place orders. - API reference with examples: https://pipwire.io/docs - OpenAPI reference: https://api.pipwire.io/docs (spec: https://api.pipwire.io/openapi.json) - MCP server (for AI agents): https://api.pipwire.io/mcp, Streamable HTTP, `Authorization: Bearer pw_...`. Reading tools for every key: list_accounts, get_account, get_positions, get_deal_history, get_order_history, get_open_orders, get_price, get_candles, search_symbols, get_symbol, get_account_events. Trading tools: place_order (market, limit, stop, stop-limit, with stop loss and take profit), close_position (in full or in part), modify_position, modify_order, cancel_order. Trading is off for every key until its owner turns it on, per key: "ask before each trade" (the tool returns a summary and a confirm_token, and trades only when called again with it) or "trade freely". Read keys never trade. Hosted: no MetaTrader terminal to keep running on your own computer or VPS. Works with Claude Code, Claude Desktop, Codex, Cursor, VS Code and Windsurf. Setup: https://pipwire.io/mcp - Trading (trade keys): market, limit, stop and stop-limit orders (POST /v1/accounts/{id}/orders with type, price, stopLimitPrice, expiresAt); list, change and cancel pending orders (GET/PATCH/DELETE /orders); change stops (PATCH /positions/{id}); close all or part of a position (DELETE /positions/{id}?volume=). - Retries: send a clientId with orders, closes and cancels; the same clientId within 24 hours never trades twice (the first answer is replayed with Idempotent-Replayed: true; an unknown outcome is checked on the terminal before resending). - Streaming: wss://api.pipwire.io/v1/accounts/{id}/stream, auth by Authorization header or a first {"type":"auth","key":...} message; subscribe to positions, orders, account and prices; snapshot then position.opened/updated/closed, order.placed/updated/removed, account and price events within about 0.5 s. - Rate limits: 1,200 requests a minute per key, 120 order actions a minute per account, 10 streams per key; RateLimit-* headers and Retry-After on 429. - Keys can be read or trade, and limited to chosen accounts (one key per customer for SaaS builders). - Kill switch: POST /v1/trading/stop (workspace) or /v1/accounts/{id}/trading/stop stops new orders and pending-order changes from the API, MCP and copier (423); closing, cancelling and moving stops still work. Any trade key can stop; only a signed-in person can start again. - Per-key order limits: maxLots per order (422) and maxOrdersPerDay per UTC day (429); refused orders don't count; closes are never limited. - Times are UTC. Candles use these timeframe names: 1m 2m 3m 4m 5m 6m 10m 12m 15m 20m 30m 1h 2h 3h 4h 6h 8h 12h 1d 1w 1mn. - One hosted terminal per account; health is checked every 30 seconds. - Trade copier: copies positions, stop changes, partial closes and pending orders from a leader MT5 account (read-only is enough) to follower accounts at any broker, with per-follower sizing, symbol mapping, daily loss and drawdown limits, a simulate mode and a log of every copy with its delay. No copier fee: the leader and followers are billed at the normal account prices. Setup: https://pipwire.io/mt5-trade-copier ## Pricing - Read-only: $5 per account per month (balances, positions, history, prices, candles). - Trading: $10 per account per month (everything in read-only, plus orders). - Billed only for days the account is connected to its broker. No deployment fees, no minimums. A card is needed before the first account connects. ## Pages - [Home](https://pipwire.io/): what Pipwire is, with product screens and pricing - [API reference](https://pipwire.io/docs): every endpoint, with curl and Python examples - [MCP server](https://pipwire.io/mcp): connect Claude, Codex, Cursor or VS Code to MT5 accounts; read, and trade when you allow it - [Pricing](https://pipwire.io/pricing): $5 read-only or $10 trading per account a month, billed per connected day, with worked examples and billing rules - [Connect MT5 to Claude](https://pipwire.io/connect-mt5-to-claude): step-by-step guide for Claude Desktop, Claude Code and Codex, with what Claude may and may not do - [MT5 Python API](https://pipwire.io/mt5-python-api): MT5 from Python on Windows, macOS or Linux with no terminal to keep open; why pip install MetaTrader5 fails outside Windows; Python examples (positions, candles in pandas, orders, streaming) plus a MetaTrader5-package-to-Pipwire function map - [Trade copier](https://pipwire.io/mt5-trade-copier): copy trades between MT5 accounts at any broker, pending orders included; no copier fee - [Best MT5 MCP servers](https://pipwire.io/best-mt5-mcp-servers): every way to connect an AI agent to MetaTrader 5 (built-in, hosted, open source), with prices and where each is ahead - [Pipwire vs MT5's built-in MCP](https://pipwire.io/compare/mt5-built-in-mcp): hosted terminals vs the terminal's own local MCP server - [Pipwire vs MetaApi](https://pipwire.io/compare/metaapi): pricing, MT4, SDKs, MCP and copy trading compared - [Create an account](https://pipwire.io/signup) - [Status](https://pipwire.io/status): uptime per region and for the API - [Terms of Service](https://pipwire.io/terms) - [Privacy Policy](https://pipwire.io/privacy)