Comparing FMZ API Forwarding with an In-Strategy HTTP Signal Server
Summary
This guide compares two ways to deliver external trading signals, such as alerts from a charting system, to a running FMZ strategy. With the platform extension API, an external request is forwarded through the platform and received by the strategy as an interaction command. With the built-in JavaScript HTTP service, the strategy runs a separate server thread and receives the request directly, removing the forwarding step. The article describes the trade-off as simpler platform-managed delivery versus more direct reception that requires configuring a secure service.
A sample test sends concurrent requests through both routes, records sent and received messages, matches them by identifiers, checks for missing messages, and calculates elapsed time. The reported test observed slightly lower average latency for the built-in server and no missing messages through the API during the test. The author cautions that the test setup is not rigorous because the requests were not truly external, and that network conditions can affect reliability. The built-in server example also lacks validation, so it is a demonstration rather than a production-ready signal receiver.
Key ideas
- The extension API forwards external signals to a strategy as interaction messages.
- A strategy's built-in HTTP service can receive signals directly on a separate thread.
- The sample comparison checks message matching, missing signals, and elapsed time for both approaches.
- The observed latency favored direct HTTP reception slightly, but the test was not rigorous.
- Signal validation and secure service configuration matter when adapting the demonstration for live use.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.