Skip to content

Configure autopilot and orderbook via config files #4005

@MartinquaXD

Description

@MartinquaXD

Background

Currently the autopilot and orderbook are configured via CLI args or env variables. This is very inconvenient for things that need multiple configuration parameters (e.g. configuring drivers). This prompted us to use a pattern where we encode multiple arguments inside 1 env variable by separating them via | or some other separator. This in turn always requires custom parsing logic and is overall just terrible to understand when reading an .env file.

To improve the situation the autopilot and orderbook should both be migrated to use config files like the driver.
This should be split into separate tasks but since the orderbook and autopilot actually share a lot of arguments I wanted to flag this in 1 overarching issue at least.

One thing to note is that clap (which is used for building CLI argument parsing) is exceptionally good for discoverability since it automatically generates a --help command that lists and explains all the available arguments.
This will no longer be possible the default with config files. Instead we likely have to use toml-example-derive to automatically generate example config files that stay in sync with the process and print that on --help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions