Skip to content

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

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


πŸ—ΊοΈ What’s inside

  • Messages β€” payload structures (requests, responses, 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/StreamQuotes).


🏷️ Naming & readability

  • Original proto names are prefixed with Mt4 (e.g., Mt4AccountSummary).
  • In headings we show both: full name and a short alias in parentheses β€” e.g. Mt4AccountSummary (AccountSummary).
  • Inside tables and notes we use short names for easier reading.

Why Mt4? It scopes types (MT4 vs MT5) and avoids name collisions across modules/languages.


🧩 Common type legend

  • Timestamp ⏰ β€” UTC time. Log in RFC3339.
  • DoubleValue / StringValue / Int32Value πŸŽ› β€” optional fields with presence (omit β†’ not set).
  • Money & PnL πŸ’΅ β€” in account currency (AccountSummary.currency).
  • Prices & volumes πŸ’Ή β€” obey SymbolParams (digits, point, lot_step, lot_min/max).

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

Area Start here
Connection & Health Connect/Disconnect, ConnectionState, Ping, ServerInfo, Time, HealthCheck β†’ see Messages β†’ Connection & Health
Orders (sync) OrderSendRequest/Result, OrderModify/Close/Delete/CloseBy, OrderActionResult β†’ Messages β†’ Account & Orders
Orders (history) OrderHistory, paged/streaming history β†’ Streaming β†’ Orders History Streaming
Market info & quotes Quote, SymbolParams, tick values, quote history β†’ Messages β†’ Quotes & Market Info
Streaming Quotes, trade updates, opened tickets, PnL snapshots, charts β†’ Streaming

πŸ”— Source of truth

This reference is generated from your .proto files (mrpc‑proto). When proto changes, Messages/Enums/Streaming are updated to match field order and enum values exactly.


🚦 Stability notes

  • Fields marked optional (wrapper types) may be omitted by the server when not applicable.
  • New enum values can appear in the future β€” handle unknown values defensively on the client side.
  • Streaming: always process is_last = true and surface transport errors to your retry logic.

Happy building! ✨