pipsocketDOCS
Guides / Get started

Introduction

Hosted MT5 accounts behind an API.

Pipsocket runs your MT5 accounts on its own hosts, each in its own MT5 terminal, and gives you one API for all of them: trade, read positions and history, and get prices and fills as they happen.

How a call works

Every call is for one account:

https://api.pipsocket.com/v1/accounts/{account}/...
Authorization: Bearer $PIPSOCKET_KEY

The API checks your workspace's key, finds the host that runs the account, and hands the call to the account's terminal. Hosts don't accept connections from the internet: each keeps one connection open to Pipsocket, and calls and events travel over it.

One call, one MT5 request

A trade call is exactly one MT5 trade request (MqlTradeRequest), sent once:

  • Nothing is changed. No splitting, no retries, no rounding, no picked filling mode. Fields you leave out are MT5's own empty values (0, "", gtc).
  • MT5's answer, as it is. A fill and a rejection both come back as 200 with MT5's retcode. A rejection is not an HTTP error: read the retcode.
  • 5 seconds for the broker. If the trade server hasn't answered by then, you get 202 with "state": "pending". The request is never sent again; look it up or watch for it on the stream.
  • Safe to retry. Send an Idempotency-Key and a repeat returns the first request instead of trading again.

What's here

The API reference is generated from the engine's own routes, and the whole API is also an OpenAPI document. For tools and LLMs, /llms.txt lists every page as Markdown, and /llms-full.txt is all of them in one file.