Skip to content
All library documents

FMZ Trading Tutorial: Multi-Exchange APIs, Backtesting, and WebSockets

Article FMZ forum · Author: 小草

Summary

This intermediate FMZ tutorial explains practical platform techniques for building automated trading strategies. It covers operating across exchanges and symbols, configuring futures and swap contracts, and handling API failures through retries, null checks, or exception handling. It also describes accessing exchange-specific data and endpoints through raw responses and extended API calls, and connecting to WebSocket feeds for event-driven market data. Later sections discuss charting and reusable strategy templates.

The backtesting section contrasts a real-tick mode using historical tick data with a faster simulated mode that generates ticks from candle data; the latter trades accuracy for speed. The tutorial is primarily an implementation guide, with illustrative code and platform-specific examples rather than a trading strategy or empirical evidence of profitability. Exchange support, API behavior, endpoint formats, and platform features can change, and the examples do not establish that a particular design is safe or effective in live markets. Robust error handling and validation remain the strategy author’s responsibility.

Key ideas

  • A single FMZ robot can access multiple exchanges and symbols through indexed exchange objects or symbol switching.
  • Futures and swap trading requires selecting an appropriate exchange and contract type.
  • Real-tick backtests use historical tick data, while simulated ticks are faster but less accurate.
  • Exchange API calls can fail, so strategies should handle null results, retry, or catch exceptions.
  • WebSockets support streaming market data, while direct API access can expose exchange-specific information.
  • The tutorial teaches platform implementation and provides no evidence that its examples are profitable.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.