bbgo icon indicating copy to clipboard operation
bbgo copied to clipboard

fix: JSON parse error when restart bbgo GUI after initial setup

Open jessy1092 opened this issue 4 years ago • 1 comments

Version: The latest BBGO Platform: Windows 10

Create new strategy during setup.

螢幕擷取畫面 2021-05-08 003636

The side value did not setup with api. But the bbgo.yml has side value as ""

exchangeStrategies:
  - grid:
      catchUp: false
      gridNumber: 20
      lowerPrice: 10000
      profitSpread: 1000
      quantity: 0.03
      side: ""
      symbol: ETHTWD
      upperPrice: 90000
    "on":
      - max
sessions:
  max:
    envVarPrefix: MAX
    exchange: max
    name: max

Then restart BBGO, it has error invalid side type

time="2021-05-08T00:20:32+08:00" level=error msg="can not load config file" error="json parsing error, given payload: {\"amount\":1000,\"catchUp\":false,\"gridNumber\":20,\"lowerPrice\":90000,\"profitSpread\":1000,\"side\":\"\",\"symbol\":\"ETHTWD\",\"upperPrice\":105000}: invalid side type"

If I remove side, it can restart correctly.

jessy1092 avatar May 07 '21 16:05 jessy1092

thank you for reporting this!

c9s avatar May 07 '21 18:05 c9s