Skip to content
All library documents

Executing TradingView Webhook Signals Through an FMZ Trading Bot

Article Strategy library · Author: 发明者量化-小小梦

Summary

This tutorial describes a bot that receives TradingView-style webhook commands through the FMZ platform and translates them into spot or futures orders. Signals carry fields for an exchange index, trading pair, contract type, price, action, and amount. The bot checks the message structure and some field values, selects the exchange object, reads order-book data to infer price and quantity precision, and maps actions to order calls. It also supports closing a position and opening the opposite direction, test signals, a rolling signal log, and adjustable polling intervals.

The material is an execution adapter, not a strategy for producing signals, and it reports no trading or reliability results. Its checks do not amount to comprehensive order or risk validation: for example, handling depends on exchange configuration and available order-book data, while the sample's test signal uses an amount of zero that the validator rejects. The approach also relies on API credentials and platform-specific behavior, so users must verify the setup and order semantics before relying on it.

Key ideas

  • Webhook messages specify the market, contract type, order action, price, and quantity for execution.
  • The bot maps accepted signals to spot or futures orders and supports reverse-position actions.
  • Order-book data is used to infer price and quantity precision before placing orders.
  • Test commands and a bounded signal log support basic operational inspection.
  • The code provides no trading performance evidence and its validation does not cover every operational risk.

Tags

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