Hummingbot stores trades in a local SQLite for database by default, but it may be limiting for some cases such as sharing data to external system, in some cases user may want to use their own preferred client/server RDBMS for it.
These dialects requires separate DBAPI driver to be installed on Hummingbot's conda environment, see SQLAlchemy documentation for more information on appropriate DBAPI driver for each RDBMS. For example, to use PostgreSQL, psycopg2 need to be installed. Run the following command to install it using conda:
conda install psycopg2
To configure RDBMS connection, we need to edit conf_client.yml in the /hummingbot_conf directory.
Note
In past versions of Hummingbot (1.5.0 and below), the conf_client.yml file is named conf_global.yml
It is also possible to connect with available SQLAlchemy's external dialects (e.g. Amazon Redshift). But the feature is not currently supported in Hummingbot due to its various DSN format, use this at your own risk.
In this Youtube Video the Foundation's lead developer Fede, shows you how you can use Docker Compose to launch multiple instances that all save to a single Postgres database.