Skip to main content

Gunbot Code Editor

The Code Editor is an integral part of the Gunbot interface, offering a seamless experience for those who prefer direct control over their config files or strategy code. It's the perfect tool for users who are comfortable with JavaScript and JSON, enabling you to edit Gunbot configuration files, view internal data, and develop custom strategies without leaving the Gunbot environment.

Gunbot code editor interface for custom strategy development

For the Code Enthusiasts​

If you're at home with config files or JavaScript code, the Code Editor is your playground. It supports editing config.js, the main configuration file, and autoconfig.json for AutoConfig jobs. Plus, it's equipped with autocomplete templates and suggestions, ensuring your syntax is on point and your configurations are valid.

For the Casual User​

Even if you're not a coding aficionado, the Code Editor is designed to be user-friendly. It's there when you need it but stays out of the way when you don't. You can stick to the graphical user interface for most of your trading needs.

Supported File Types​

The Code Editor supports various file types, each serving a unique purpose in your trading setup:

  • Main Config (config.js): Modify your core settings with read and write support.
  • AutoConfig (autoconfig.json): Define dynamic trading jobs. The editor assists with templates and autocomplete features.
  • Pair State Files: Access internal read-only data to understand your trading performance.
  • Custom Strategies: Craft your trading algorithms in JavaScript, stored in the /customStrategies folder, with full editing capabilities.
  • Config Backups: Safeguard your settings with automatic backups every time you make changes through the GUI.

Code suggestions and autocompletion in Gunbot editor AutoComplete feature showing available methods and parameters Strategy editing interface with syntax highlighting and code validation