Disclosure: I work on MetaRPC, which provides developer APIs, SDKs and hosted software. This article was prepared with AI assistance. The code below was executed against local fixtures; it does not demonstrate a live trade or successful production authentication.
A read-only request is a useful first step when integrating a trade copier: can the client list the copier records owned by this API key? Before interpreting the result, check the contract of the wrapper you are using.
In the current MetaRPC GoCopier wrapper, a failed RPC can become a reply with Ok: false and an Error string, while the returned Go error is nil. Checking only err can therefore send your program down its success path after a refusal or a timeout.
This behavior belongs to this wrapper. It is not a general rule that generated Go gRPC clients discard transport errors.
The check to make
The core sequence is:
reply, err := service.List(ctx) if err != nil { // Handle a Go-level failure. return } if reply == nil { // There is no usable response. return } if !reply.Ok { // The operation failed, even though err is nil. // Inspect reply.Error privately, with appropriate redaction. return } // Now interpret reply.Copiers. An empty successful list is valid. Avoid treating an empty list as an authentication error. Ok: true with zero records can simply mean this owner has no copiers. Conversely, an unsuccessful reply does not become successful because its list happens to be empty.
Run six cases without credentials
The complete example is in a public working revision, not a new SDK release. Use the fixed revision below in a new directory so the commands reproduce the tested code:
git clone https://github.com/MetaRPC/GoCopier.git gocopier-response-check cd gocopier-response-check git checkout a4d60c06dc57ac46585fe72016b2758a8da4edd6 go test ./... go run ./examples/list-status The repository requires Go 1.21 or later. These commands use the default offline fixture mode; they do not contact a broker or copier service. Go may download the module dependencies.
Expected output:
request error: request_failed nil reply: missing_reply refused with nil Go error: operation_failed successful empty list: list_ok total=0 paused=0 successful list: list_ok total=2 paused=1 malformed summary: invalid_summary The two records in the successful fixture are synthetic. The final case checks a nil summary entry so the reporting loop cannot panic on malformed input. The output contains categories and counts, without account IDs, broker servers, API keys or raw remote error messages.
Read the complete example and tests. A separate regression test injects Unauthenticated, PermissionDenied, DeadlineExceeded and Unavailable into the actual SDK wrapper and verifies its existing failure-envelope behavior. Those are injected errors, not claims about a live server.
An optional read-only live check
After the offline exercise, the same example can make one List request if you explicitly run:
go run ./examples/list-status --live This mode requires your real owner key in MRPC_API_KEY. Supply it through your normal secret-management workflow. The SDK sends lowercase apikey gRPC metadata and the request's user_key; a broker login, copier ID or TRIAL is not a replacement. The authentication guide explains the differences between gRPC, REST and WebSocket requests.
The example uses TLS and a ten-second deadline. It does not create accounts, start or pause copiers, remove records, or place trades. Existing running services continue their normal billing. It is a Go client that can run on Windows, macOS or Linux; it does not install a local MetaTrader terminal.
Success here is only success of the read
These categories are deliberately broad. They prevent a false success path; they do not diagnose the root cause or implement automatic retries. Correct a key or ownership problem before retrying. For operations with side effects, reconcile the actual server state before repeating an uncertain request.
A successful List also does not prove that copying works. For that, use disposable demo accounts and separately verify sizing, one opening and closing, pause/resume and the relevant logs.
The MT4/MT5 copier setup guide covers the next steps, and the lot-sizing worksheet helps review requested follower volume before a demo test. The worksheet does not establish equal financial risk or place trades. Hosted terminals and running copiers use service credit, including on broker demo accounts.
MetaRPC supplies APIs and software infrastructure. We do not hold, manage or invest customers' trading funds. This is a software-validation exercise, not investment advice.