Everything here is live. Times are UTC; prices and candles come from each account's own terminal.
export PIPWIRE_API=https://api.pipwire.io
curl $PIPWIRE_API/v1/accounts \
-H "Authorization: Bearer $PIPWIRE_KEY"curl "$PIPWIRE_API/v1/accounts/acc_…/candles?symbol=XAUUSD%2B&timeframe=30m&limit=500" \
-H "Authorization: Bearer $PIPWIRE_KEY"Keys. Send Authorization: Bearer pw_…. A read key sees every account in the workspace; a trade key can also place and close orders. Keys are shown once; revoke one and it stops working at once.
Times. Every time in and out is UTC, ISO 8601 with a Z. MT5 brokers keep their own server clock; Pipwire converts for you, including the night New York changes its clocks.
Symbols. Use the broker's own names (Vantage calls gold XAUUSD+). Search them with /symbols. Encode + as %2B and # as %23 in URLs.
Limits. No published rate limits during the private beta.
Errors are JSON with a plain-words error; invalid fields also come back in fields.
/v1/accountsEvery account in your workspace, oldest first.
{ "data": [ {
"id": "acc_mg69qi9is4j8",
"name": "Gold data",
"server": "VantageMarkets-Live 6",
"login": 37017655,
"access": "read",
"status": "connected",
"statusDetail": "Signed in to VantageMarkets-Live 6.",
"statusAt": "2026-11-22T12:42:31Z",
"connectedSince": "2026-11-22T12:42:01Z",
"lastConnectedAt": "2026-11-22T12:42:31Z",
"balance": 0.0,
"equity": 0.0,
"currency": "USD",
"pingMs": 18.6,
"region": "fsn-1",
"clock": "ny+7",
"createdAt": "2026-11-22T12:41:44Z"
} ] }/v1/accountsConnect an MT5 account. Pipwire starts a terminal for it and signs it in.
Answers at once with status "signing_in". Poll the account: most brokers sign in within a minute. A refused login shows as status "error" with the reason in statusDetail. Connecting with access "trade" needs a key with trade permission.
serverstring · requiredlogininteger · requiredpasswordstring · requiredaccess"read" | "trade"namestringclockstringcurl -X POST $PIPWIRE_API/v1/accounts \
-H "Authorization: Bearer $PIPWIRE_KEY" -H "Content-Type: application/json" \
-d '{"server": "VantageMarkets-Live 6", "login": 37017655, "password": "…", "access": "read"}'Response: 201, the account (as above) with status "signing_in".
/v1/accounts/{id}One account: status, balance, equity and ping, refreshed every 30 seconds.
/v1/accounts/{id}Rename an account, or give it a new password (it signs in again).
namestringpasswordstring/v1/accounts/{id}Shut the terminal down and erase the stored password. 204. Your MT5 account itself isn't touched.
/v1/accounts/{id}/restartRestart the account's terminal. Also /pause (stops it; not billed) and /resume.
/v1/accounts/{id}/uptimeShare of each UTC day the account was connected, oldest first.
null means nobody was watching that day (before it was connected, or while paused), not 0%. GET /v1/accounts/uptime gives every account at once.
daysinteger{ "data": [ { "day": "2026-11-21", "uptime": null }, { "day": "2026-11-22", "uptime": 0.99861 } ] }/v1/accounts/{id}/eventsWhat happened to the account, newest first: created, connected, disconnected, error, restarted, paused, resumed, order.
limitinteger{ "data": [ { "id": 41, "kind": "connected", "message": "Signed in to VantageMarkets-Live 6.", "at": "2026-11-22T12:42:37Z" } ] }/v1/accounts/{id}/candlesOHLC candles from the account's own terminal, with times in UTC.
Three ways to ask: the newest bars (limit); bars starting at a time (from and limit); or every bar between two times (from and to). Each bar's time is when it opens.
symbolstring · requiredtimeframestringlimitintegerfrom, toISO 8601curl "$PIPWIRE_API/v1/accounts/acc_…/candles?symbol=XAUUSD%2B&timeframe=30m&limit=2" \
-H "Authorization: Bearer $PIPWIRE_KEY"{
"symbol": "XAUUSD+",
"timeframe": "30m",
"data": [
{ "time": "2026-11-20T21:00:00Z", "open": 3523.41, "high": 3538.31, "low": 3519.07, "close": 3537.2, "volume": 10173, "spread": 15 }
]
}/v1/accounts/{id}/priceLatest bid and ask. A symbol not yet in the terminal's Market Watch is added for you.
symbolstring · required{ "symbol": "XAUUSD+", "bid": 3537.2, "ask": 3537.35, "time": "2026-11-20T21:56:59Z" }/v1/accounts/{id}/symbolsThe broker's symbol names.
searchstringlimitinteger{ "data": ["XAUUSD+", "XAUEUR+"], "total": 2 }/v1/accounts/{id}/symbols/{symbol}Everything needed to size and place an order on one symbol.
stopsLevel and freezeLevel are in points (point × digits). tradeMode is full, long_only, short_only, close_only or disabled.
{ "symbol": "XAUUSD+", "digits": 2, "point": 0.01, "contractSize": 100.0, "minVolume": 0.01, "maxVolume": 50.0,
"volumeStep": 0.01, "stopsLevel": 20, "freezeLevel": 0, "tickSize": 0.01, "tickValue": 1.0, "profitTickValue": 1.0,
"lossTickValue": 1.0, "tradeMode": "full", "baseCurrency": "XAU", "profitCurrency": "USD", "marginCurrency": "XAU",
"spread": 15, "swapLong": -45.1, "swapShort": 20.3 }/v1/accounts/{id}/infoBalance, equity, margin and leverage, straight from the terminal.
type is demo, contest or real; marginMode is hedging or netting. tradeAllowed is false on a read-only (investor password) connection.
{ "login": 37017655, "server": "VantageMarkets-Live 6", "name": "…", "broker": "Vantage International Group Limited",
"type": "real", "marginMode": "hedging", "currency": "USD", "balance": 10482.16, "credit": 0.0, "equity": 10611.4,
"profit": 129.24, "margin": 702.5, "freeMargin": 9908.9, "marginLevel": 1510.5, "leverage": 500,
"tradeAllowed": true, "access": "trade" }/v1/accounts/{id}/positionsOpen positions. A stop or target of 0 at the broker comes back as null.
symbolstring{ "data": [ { "id": "57052791711", "symbol": "XAUUSD+", "side": "sell", "volume": 0.1, "openPrice": 3500.0,
"currentPrice": 3490.0, "stopLoss": null, "takeProfit": 3400.0, "profit": 100.0, "swap": 0.0,
"openedAt": "2026-11-20T14:00:00Z", "comment": "my bot", "clientId": "ord-7f3a", "magic": 0 } ] }/v1/accounts/{id}/positions/{positionId}One open position, same shape. 404 once it has closed; its deals are then at /deals?positionId=.
/v1/accounts/{id}/dealsClosed deals in a time range.
entry is in (opened), out (closed), inout (reversed) or out_by.
from, toISO 8601positionIdstring{ "data": [ { "id": "56719498044", "orderId": "57052856011", "positionId": "57052791711", "symbol": "XAUUSD+",
"side": "buy", "entry": "out", "volume": 0.1, "price": 3490.0, "profit": 100.0, "commission": 0.0, "swap": 0.0,
"fee": 0.0, "time": "2026-11-21T09:12:44Z", "comment": "", "clientId": null, "magic": 0 } ] }/v1/accounts/{id}/orders/historyOrders that finished: filled, partial, rejected, canceled or expired.
To learn whether an order went through after its reply was lost, look for your clientId here and in /positions.
from, toISO 8601{ "data": [ { "id": "57052856011", "positionId": "57052856011", "symbol": "XAUUSD+", "type": "buy", "state": "filled",
"volume": 0.1, "remainingVolume": 0.0, "openPrice": null, "stopLoss": 3450.0, "takeProfit": null,
"placedAt": "2026-11-20T14:00:00Z", "doneAt": "2026-11-20T14:00:00Z", "comment": "my bot", "clientId": "ord-7f3a", "magic": 0 } ] }/v1/accounts/{id}/ordersTrade keyPlace a market order.
Needs a key with trade permission and an account connected with access "trade". If the broker rejects it, you get 422 with its reason and MT5 retcode, e.g. 10018 market closed, 10019 not enough money.
symbolstring · requiredside"buy" | "sell" · requiredvolumenumber · requiredstopLoss, takeProfitnumberdeviationintegerclientIdstringcommentstringmagicintegercurl -X POST $PIPWIRE_API/v1/accounts/acc_…/orders \
-H "Authorization: Bearer $PIPWIRE_KEY" -H "Content-Type: application/json" \
-d '{"symbol": "XAUUSD+", "side": "buy", "volume": 0.01, "stopLoss": 3450}'201 { "retcode": 10009, "message": "Request executed", "orderId": "57052856011", "dealId": "56719498044",
"positionId": "57052856011", "price": 3501.2, "volume": 0.01, "clientId": "ord-7f3a" }/v1/accounts/{id}/positions/{positionId}Trade keyMove a position's stop-loss and/or take-profit.
A field you leave out keeps its current value; null removes it. If nothing changes you get 200 with changed: false. A level too close to the price is refused with 422 and retcode 10016.
stopLossnumber | nulltakeProfitnumber | null{ "changed": true, "retcode": 10009, "stopLoss": 3480.0, "takeProfit": 3600.0 }/v1/accounts/{id}/positions/{positionId}Trade keyClose a whole position at market. Same answer and rules as placing an order.
deviationinteger/v1/accounts/{id}/marginTrade keyThe margin the broker would hold for an order, from the terminal's own order check.
symbolstring · requiredvolumenumber · requiredside"buy" | "sell"pricenumber{ "symbol": "XAUUSD+", "side": "buy", "volume": 0.1, "price": 3500.5, "margin": 70.01, "freeMarginAfter": 9900.0 }