Skip to content

πŸ“š API Reference β€” Overview (MT5)

Short, navigable entry point to the MT5 API reference. Use this page to jump to the right place and understand naming rules & conventions.


πŸ—ΊοΈ What’s inside

  • Messages β€” payload structures (requests, replies, snapshots) with field notes.
  • Enums β€” all enumerations with human meanings.
  • Streaming β€” long‑lived gRPC streams and their chunk types.

Looking for usage? See Cookbook recipes next to this section (e.g. Orders/PlaceMarketOrder, MarketInfo/GetQuote, Streaming/SubscribeQuotes).


🏷️ Naming & readability

  • Original proto names are scoped for MT5 (e.g., enums prefixed with TMT5_ / BMT5_, messages in mt5_term_api).
  • In headings we show both: full name and a short alias in parentheses β€” e.g. OpenedOrderInfo (OpenedOrder).
  • Inside tables and notes we use short names for easier reading.

Why the MT5 prefixes? They disambiguate MT5 from MT4 artifacts and avoid collisions across modules/languages.


🧩 Common type legend

  • Timestamp ⏰ β€” UTC time. Log in RFC3339.
  • Optional fields πŸŽ› β€” proto3 optional (or wrappers) indicate presence; omit when not set.
  • Money & PnL πŸ’΅ β€” in account currency (see AccountSummaryData.account_currency).
  • Prices & volumes πŸ’Ή β€” validate with SymbolInfoDoubleProperty (SymbolVolumeMin/Max/Step, Point, Digits).

πŸ”Œ API families β†’ where to read

Area Start here
Connection & Health Connect/ConnectEx/Disconnect, Health.Check β†’ see Messages β†’ Connection & Health
Orders (sync) OrderSend{Request,Reply,Data}, OrderModify/Close, and opened/pending order payloads β†’ Messages β†’ Account & Orders
Positions PositionInfo, tickets stream, profits snapshots β†’ Streaming
Market info & quotes MrpcMqlTick, OnSymbolTick, SymbolInfoDouble{Request,Data} β†’ Messages β†’ Quotes & Market Info
Streaming Quotes, trade updates, tickets, position PnL, charts/history β†’ Streaming

🚦 Stability notes

  • Optional fields may be omitted by the server when not applicable.
  • Enums can gain new values β€” handle unknown values defensively on the client side.
  • Streaming replies typically use oneof { data = 1, error = 2 }; surface error and transport exceptions to your retry logic.