MetaTrader®, MT4® and MT5® are trademarks of MetaQuotes Ltd. This is an independent service and is not affiliated with, authorized by, or endorsed by MetaQuotes. Trustpilot4.0
LEVEL 2 · TICK DATA

See the whole book — depth of market & tick data, over the API.

Pull a symbol's full order book — every resting bid and ask — plus tick-by-tick history with trade flags, last price and real volume. The raw material for microstructure, VWAP, liquidity heatmaps and tick charts.

/MarketBookGet · /CopyTicks?mode=all|trade
Full order book, not just top-of-book Ticks up to 5,000 per call Trade flags · last · real volume Millisecond timestamps
// what it is

Two views under the price: depth and ticks.

The Depth of Market API returns a symbol's full Level 2 order book — every resting bid and ask with its volume — while the tick API returns tick-by-tick price history enriched with trade flags, last price and real volume. /MarketBookGet gives you the book at this instant (type, price, volume and real volume per level); /CopyTicks gives you the sequence of ticks over a window, each tagged with flags that tell you whether the bid, ask or last changed and whether a trade printed. Together they turn a MetaTrader account into a market-microstructure data source you can query like any other API.

Depth of market

/MarketBookGet — the stacked bids and asks resting in the book right now, each with its volume. Subscribe with /MarketBookAdd, release when done.

Tick history

/CopyTicks — up to 5,000 ticks with bid, ask, last, volume, volumeReal, timeMsc and decoded flags. Choose all ticks or only trade ticks.

Broker-dependent: depth of market only exists when the broker publishes it. If a broker doesn't, /MarketBookGet tells you plainly — it never invents a book. Tick history is available across brokers.
// the data

Query it like any other endpoint.

ticks.sh — tick history with decoded flags
curl "https://hrx.info/CopyTicks?id=<acc>&symbol=EURUSD&count=20&mode=all" \
  -H "x-api-key: sk_live_…"

{
  "symbol": "EURUSD", "count": 20, "mode": "all",
  "ticks": [
    { "timeMsc": 1788975235949, "bid": 1.16395, "ask": 1.16403,
      "last": 0.0, "volumeReal": 0,
      "flags": 6, "flagNames": ["BID", "ASK"] }
  ]
}
// who it's for

For anyone modelling what happens under the price.

Quant & microstructure

Reconstruct order flow, imbalance and liquidity from real book and tick data.

→ Quant researchers

Tick chart & VWAP tools

Build true tick charts and volume-weighted metrics from 5,000-tick pulls with real volume.

→ Charting apps

Execution analytics

Measure spread, slippage and depth-at-price to score how well fills are placed.

→ TCA & execution desks
// questions

Frequently asked

Does the API return Level 2 depth of market?+
Yes, when the broker publishes it. /MarketBookGet returns the full order book — every resting bid and ask with its price, volume and real volume. Subscribe first with /MarketBookAdd.
What if my broker doesn't provide depth?+
Depth of market is a broker feature. If a broker doesn't publish it, /MarketBookGet returns a clear message rather than a fabricated book. Tick history via /CopyTicks works regardless.
What's in each tick from CopyTicks?+
Bid, ask, last price, tick volume, real volume, a millisecond timestamp (timeMsc) and trade flags — both the raw flags integer and decoded flagNames such as BID, ASK, LAST, BUY, SELL.
How much tick history can I pull at once?+
Up to 5,000 ticks per call, from a start time you specify (fromMsc). Choose mode=all for every tick or mode=trade for trade ticks only.
Can I stream depth and ticks live instead of pulling?+
Live quotes stream over the WebSocket API, and each streamed frame carries the same enriched fields (last, real volume, millisecond time, flags). Use /CopyTicks for historical windows and the stream for the live edge.
Start free

Read the book on any MT5 account.

Connect an account, pull the depth of market and tick history, and start modelling what happens under the price.