Skip to content
All library documents

Automating TradingView Alerts Through FMZ’s Command API

Article FMZ digest · Author: 发明者量化-小小梦

Summary

This guide explains how to route TradingView alerts to an FMZ trading bot through FMZ’s extended API. The proposed flow uses the CommandRobot interface to send a command string to a running bot, which checks for new commands and places spot or futures orders. The example uses a MACD chart alert and shows how to encode the API request parameters and identify the target bot.

The bot parses commands into an action and amount, then selects order behavior based on whether the exchange connection is spot or futures. A manual interaction test demonstrates that the bot receives a command, and the article shows an alert reaching the robot. The method depends on a suitable TradingView plan with webhook support and correctly configured API credentials. The sample is for learning; it does not establish risk controls, robust error handling, or live-trading readiness, and the author recommends further changes before real use.

Key ideas

  • TradingView webhooks can trigger FMZ bot commands through the extended API.
  • The example routes commands with an action and trade amount to a selected robot.
  • The bot handles spot buys and sells separately from futures opens and closes.
  • API keys should be restricted to the required command permission and kept confidential.
  • The sample needs additional safeguards and adjustment before live trading.

Tags

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