Type/to search
Welcome to FMZ Quant Trading Platform
Programming Languages
JavaScript
TypeScript
Python
C++
MyLanguage
PINE Language
Blockly Visual Programming
Workflow
Key Security
Live Trading
Strategy Library
Docker
Deploy Docker
One-Click Docker Rental
Manual Deployment of Bot
Docker Operation Precautions
Global IP Address Specification
Command Line Parameters for Bot Program
Live Trading Data Migration
Docker Monitor
Exchange
Strategy Editor
Backtesting System
Strategy Entry Functions
Strategy Framework and API Functions
Template Library
Strategy Parameters
Interactive Controls
Options Trading
C++ Strategy Writing Guide
JavaScript Strategy Writing Guide
Web3
Built-in Libraries
Extended API Interface
MCP Service
Trading Terminal
Data Explorer
Alpha Factor Analysis Tool
General Protocol
Debugging Tool
Remote Editing
Import and Export of Complete Strategies
Multi-language Support
Live Trading and Strategy Grouping
Live Trading Display
Strategy Sharing and Renting
Live Trading Message Push
Common Causes of Live Trading Errors and Abnormal Exits
Exchange-Specific Notes

The PluginRun method is used to call the debugging tool functionality of the FMZ Quant Trading Platform; only JavaScript language is supported.

Returns

json
{ "code": 0, "data": { "result": "{\"logs\":[{\"PlatformId\":\"\",\"OrderId\":\"0\",\"LogType\":5,\"Price\":0,\"Amount\":0,\"Extra\":\"Hello FMZ\",\"Currency\":\"\",\"Instrument\":\"\",\"Direction\":\"\",\"Time\":1732267473108}],\"result\":\"\"}", "error": null } }
  • result: Test result data returned after the debugging tool successfully executes the passed JavaScript code.

Arguments

NameTypeRequiredDescription

settings

JSON object

Yes

Setting parameters in the debugging tool, the settings configuration contains test code located in the source attribute. The settings parameter format is as follows:

json
{ "exchanges":[{"pair":"SOL_USDT","pid":123}], "node":123, "period":60, "source":"function main() {Log(\"Hello FMZ\")}" }
  • source: The code to be debugged.
  • node: Docker ID, specifies which docker to run the live trading on. If this value is -1, it means automatic allocation.
  • exchanges: Exchange object configuration, refer to the RestartRobot interface.

Remarks

{"eid": "OKEX", "pair": "ETH_BTC", "meta" :{"AccessKey": "123", "SecretKey": "123"}}
{"eid": "Huobi", "pair": "BCH_BTC", "meta" :{"AccessKey": "123", "SecretKey": "123"}}

For the exchanges attribute in settings, only one needs to be set when calling the PluginRun method (only one exchange object is supported when using the debugging tool page). Setting 2 exchange objects in settings will not cause an error, but accessing the second exchange object in the code will cause an error.