Socketrade

Use case · Backtesting

History first. Then the loop.

A backtest needs bars it can trust and a way to feed the same logic live. Socketrade exposes historical bars and live ticks for an MT5 account, so your harness and your live loop can share the same data shape. It is a connection; it is not a tick archive or a backtest engine.

How it works

Step 1
Connect a demo account

Use a demo with the history depth you need. The terminal downloads bars from the broker.

Step 2
Request the bars

Ask for a symbol and timeframe over a date range, then cache them on your side.

Step 3
Test your logic

Run your own backtest. Socketrade does not run strategies.

Step 4
Replay live ticks

The WebSocket streams current ticks, so the same parser can handle live and recorded data.

What the API gives you

  • Historical bars through the v1 PriceHistory call.
  • Live bid/ask ticks over the v2 WebSocket.
  • Account state and order calls for a paper or demo run.
  • The same symbols and account model as the live API.

A minimal example

# historical bars (Api2Trade-compatible v1 call)
curl "https://api.socketrade.com/PriceHistory?id=41299492&symbol=EURUSD&timeframe=M15&from=2026-01-05T00:00:00Z&to=2026-01-06T00:00:00Z" \
  -H "X-API-Key: $SOCKETRADE_KEY"

Honest limits

  • Socketrade is not a data vendor. Bar and tick depth depends on the broker and what the terminal has downloaded.
  • There is no tick archive to download. The WebSocket sends ticks as they arrive.
  • No backtest engine, no strategy optimiser and no portfolio simulator are included.
  • Demo data and live data can differ. Test on the account type you will trade.