GoMT4 SDK Documentation¶
ℹ️ Account ID / Session ID: when connecting via
Connect/ConnectEx, MetaRPC automatically generates a terminal session GUID and returns it interminalInstanceGuid. You do not need to callGetIdor supply anidheader before connecting — subsequent calls (subscriptions, order requests) use this session ID automatically.
Type-safe Go SDK for MetaTrader 4 trading automation over gRPC — connect, stream live ticks, and execute orders from any Go application.
Your first project from scratch in 10 minutes. Connect, read your balance, place a trade.
New here? Start with setup, the API key, and an overview of how the SDK is organized.
How the low-, mid- and high-level layers fit together, and where everything lives.
MT4 terms, return codes, enums and concepts — a reference to keep open while you build.
Direct gRPC / protobuf layer. Maximum control over every request and typed response.
Friendly facade over MT4Account — clean arguments and unwrapped return values.
One-liner operations, risk-based position sizing and smart defaults for fast strategies.