Type/to search
Getting Started
Platform Basics
Exchange
Docker
Strategy Library
Live Trading
Grouping
Live Trading Observation
Live Trading Message Push
Common Causes of Live Trading Errors and Abnormal Exits
Trading Terminal
Account and Billing
Writing Strategies
Development Tools
Backtesting System
Advanced Topics
Data and Research
Extended API Interface

A live robot can push log lines as messages to the mobile app, email, Telegram or a WebHook; enable the channels on the push settings page.

Push Settings

Push channels
  • Mobile (App): when enabled, push messages are sent to the FMZ mobile app.
  • Email: verify your email address first; after that you receive push messages.
  • Telegram: bind Telegram in the push settings and enable it.
  • WebHook: enable it and set a push address such as http://abc.com/push.php?data={body}; the format is described below.

Alerts such as docker monitoring, robot monitoring and the balance alert are also sent according to the push settings, but never to the WebHook.

WebHook address

When a robot sends a push message, the platform sends a GET request to the push address: {body} in the address is replaced with the message content and {subject} with the message title, both URL-encoded; {{body}} and {{subject}} are replaced as-is, without encoding.

To send a POST request, write the push address as request URL||request body, for example http://abc.com/push.php||text={body}: the part before || is the request URL and the part after it is the request body; both parts can use the placeholders above. The push address must be an http or https address reachable from the public internet.

Pushing from a strategy
  • JavaScript, Python, Rust: when calling Log or another function that writes to the log area (such as exchange.CreateOrder() or exchange.CancelOrder()), pass one more argument @ after the required ones and that log line is pushed according to the push settings, for example Log("This is a push message", "@"). In Rust use the Log! macro the same way: Log!("This is a push message", "@");.
  • PINE and My language: enable trade log push in the parameters of the "trading library" built into the strategy; trades then push messages automatically.
Push limits

The docker reports push messages with its heartbeat (about every 20 seconds), and several pushes in one cycle are merged into one; each account can push at most 50 messages per hour (a merged message counts as one), and the body of each push is at most 200 characters. The backtest system and the debugging tool do not push messages. See Log for the full rules.