Skip to main content

MT5 market data in API v2, and ticks in batches

MT5 v2 now returns chart bars for every timeframe and historical ticks, the v2 hub streams live ticks, and all four hubs can deliver ticks in batches instead of one message each.

Building a chart on API v2 for MT5 is now possible without dropping back to v1.

GET /api/v2/MT5/{tradePlatform}/ChartRequest/{symbol} returns OHLC bars with period from M1 to D1; anything coarser than a minute is aggregated on our side from the server's minute bars, on the trading server's own clock. GET /api/v2/MT5/{tradePlatform}/TicksHistory/{symbol} returns historical ticks and requires from — ticks are dense enough that an unbounded request cannot answer in time.

The /hubs/mt5/v2 hub streams live ticks, and every hub — MT4 and MT5, v1 and v2 — now has a batch mode: SubscribeToTicksBatch collects ticks and delivers them as one array in OnTicksBatch, at 200 ms or 200 ticks by default. A batched subscriber does not also receive per-tick events.

Running on the sandbox; production follows within days. The full write-up, including the time-zone caveat, is on the blog.

This note sums up an article on the CPlugin™ blog. Read the full article ↗