π 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 inmt5_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 }
; surfaceerror
and transport exceptions to your retry logic.