Gunbot wiki
Wiki em português
English
English
  • Welcome to the Gunbot wiki
  • About
    • What's new?
      • New in v22
      • New in v20
      • New in v18
      • New in v16.7+
      • New in v16
      • New in v15
      • New in v13 / v14
      • New in v12
      • New in v11
      • New in v10
      • New in v9
      • New in v8
      • New in v7
      • New in v6
    • Supported exchanges
      • Creating API keys
      • Websockets support
    • License info & system specs
      • How to create a wallet
    • Purchasing Gunbot
  • Setup & general settings
    • Installation & startup
      • Quickstart guide
      • Download software
      • Windows installation
      • macOS installation
      • Linux installation
      • ARM installation
      • How to enable SSL/TLS
      • Running multiple instances
      • Headless mode
    • Global settings
      • Import settings
      • Bot settings
      • Cancel orders
      • Advanced
    • Profile settings
      • Exchanges
      • Gunthy wallet
      • Edit license
      • GUI authentication
      • Telegram
      • Tournament
  • How to work with Gunbot
    • Learning the basics
      • Trading logic
      • Important settings
      • Order types
      • Period
      • Trailing
      • ROE trailing
    • Strategies & pairs
      • Easy edit
      • Strategy editor
      • Trading pairs
        • Pair processing
    • Chart & results
    • Extra modules
      • AutoConfig
      • Backtesting
      • Code editor
      • TradingView Alerts
        • IMAP listener
      • Alerts (beta)
  • Trading strategy options
    • About Gunbot strategies
      • Trading methods
      • Protections
    • Regular strategies (spot trading)
      • ADX
      • ATRTS
      • Bollinger Bands
      • Bollinger Bands (TA)
      • EMA spread
      • Emotionless
      • Gain
      • Ichimoku
      • MACD
      • MACDH
      • Pingpong
      • Stepgain
      • Spotgrid
      • Spotgrid Advanced
      • StepGrid
      • SMA cross
      • Support / Resistance
      • Tssl (trailing stop / stop limit)
      • Time series analysis
    • Margin trading strategies
      • ADX
      • ATRTS
      • Bollinger Bands
      • Bollinger Bands (TA)
      • EMA spread
      • Futures Grid
      • Gain
      • Ichimoku
      • MACD
      • MACDH
      • Pingpong
      • Stepgain
      • SMA cross
      • Tenkan
      • Tssl (trailing stop / stop limit)
      • Time series analysis
    • Custom strategies
    • Balance settings
    • Confirming indicators
    • Dollar Cost Avg (DCA)
    • Reversal trading (RT)
    • TrailMe
    • Misc settings
  • More
    • Config marketplace
  • Various
    • Backups
    • Logs
    • Handling bags
    • Acronyms
  • Troubleshooting
    • Critical errors
    • Bot does not trade
    • Reset password
Powered by GitBook
On this page
  • Config file system
  • Disabling the GUI
  • Connecting exchanges
  • Strategies
  • Defining pairs and overrides

Was this helpful?

  1. Setup & general settings
  2. Installation & startup

Headless mode

Information about running Gunbot in headless mode.

PreviousRunning multiple instancesNextGlobal settings

Last updated 5 years ago

Was this helpful?

This article is meant for power users who want to run Gunbot without using the GUI.

This is not an exhaustive overview of all available settings, just a quick overview of how to manually work with the config file. Refer to other parts of the wiki for detailed settings descriptions.

Config file system

All Gunbot settings are defined in a single file named config.js. This is where you set up your exchange API keys, add pairs and define your strategies.

You can refer to the included config-js-example.txt file for an example of a config file with properly defined pairs and all needed parameters for adding each exchange. Throughout this wiki you'll find detailed descriptions for every parameter available in the config file.

When the config file is overwritten while Gunbot is running, the changed settings will be loaded automatically.

Make sure that no parameters are removed when setting it up. Make sure the JSON-formatting stays intact. If you are unsure about your config file, you can validate it on (or a similar JSON validator).

The only actions that requires using the GUI is updating master keys.

Disabling the GUI

To disable the GUI completely, make the following change in the GUI section of config.js:

"GUI": {
        "enabled": false,

Connecting exchanges

To connect an exchange, add the relevant settings to the exchange section of config.js.

It looks like this:

"binance": {
            "masterkey": "registered_api_key",
            "mastersecret": "secret_for_registered_api_key",
            "key": "trading_api_key",
            "secret": "secret_for_trading_api_key",
            "delay": 1,
            "type": "binance"
        },

Note that you can use a different API key for trading than the registered key. If you don't use a secondary key, you can just enter the registered key in the key parameter.

Strategies

A strategy is defined by giving it a unique name and adding it to the strategies section of the config file. This strategy can then be assigned to one or more trading pairs.

It looks like this:

"custom-strategy": {
            "BUY_METHOD": "tssl",
            "BUY_ENABLED": true,
            "SELL_METHOD": "tssl",
            "SELL_ENABLED": true,
            "BUY_LEVEL": 1,
            "GAIN": 0.5,

(many lines cut out to keep this page clean)

            "SL_DISABLE_BUY": false,
            "COUNT_SELL": 9999,
            "TRADES_TIMEOUT": 0
        },

Defining pairs and overrides

In the pairs section of the config file you can add one or more pairs inside a block specifying the exchange the pairs will run on.

Each pair must be assigned an existing strategy, it must be specified if the pair is enabled or not.

"Binance": {
            "BTC-LTC": {
                "strategy": "SMACROSS",
                "enabled": true,
                "override": {
                    "TRADING_LIMIT": 1000
                }
            }
        },

The override section allows for pair specific modifications to the assigned strategy. Any strategy parameter can be used as an override.

In the example above the pair will run the SMACROSS strategy, with a TRADING_LIMIT different from what is defined in the strategy itself.

https://jsonlint.com