The project exposes container implementation for LiuAlgoTrader project. It's intended to kick-start strategy development, as well as exposing a full container/service oriented deployment for a full trading system.
liu-in-a-box
: a single container implementation that encapsulating database and the trading platform, for first time users.liu-db-in-a-box
: a ready to use database for LiuAlgoTrader
- make sure you have a locally installed docker (https://docs.docker.com/get-docker/) ,
- Setup your PAPER or LIVE trading account w/ Alpaca Markets https://alpaca.markets/ .
- Execute
docker pull amor71/liu-in-a-box
, - Download the file https://github.com/amor71/trade_deploy/blob/master/liu-in-a-box/env.list to the folder in which you intend to run your strategies (eg. ~/my-liu/),
- Make you to have a valid
tradeplan.toml
file in the same directory, as well as set-upLiuAlgoTrader
environment variables. For more details & examples see here https://liualgotrader.readthedocs.io/en/latest/Configuration.html .
Execute docker run -v <local_folder>:/opt/trader --env-file env.list --env DSN=postgresql://docker:docker@localhost/tradedb amor71/liu-in-a-box
- make sure you have a locally installed docker (https://docs.docker.com/get-docker/) ,
- Setup your PAPER or LIVE trading account w/ Alpaca Markets https://alpaca.markets/ ,
- recommanded: a local installation of
psql
(PostgreSQL client - https://www.postgresql.org/docs/12/app-psql.html) .
- Execute
docker pull amor71/liu-db-in-a-box
, - Execute
docker run -P amor71/liu-db-in-a-box
.
- Execute
docker ps
and find the local port, - Execute
\psql -h localhost -p <local-port-fron-step-1> -U docker tradedb
(password:docker
).
- Execute
docker ps
and find the local port, export DSN=postgresql://docker:docker@localhost:<local-port-fron-step-1>/tradedb
- Follow LiuAlgoTrader instructions for running the relevant application.