Contains all code for gathering data from exchanges such as Binance or Bitfinex.
-
Make sure a docker container of the database is running. This can be checked by using:
docker ps
Example output:
13f0646a4f36 || postgres || "docker-entrypoint.s…" || 23 hours ago || Up About an hour || 0.0.0.0:5432->5432/tcp || runner_db_1
If the database container is not running, run
docker-compose up --build
in theRunner
project. -
Copy
.env.example
to.env
and adjust the parameters (DATABASE_URL and INTERVAL).cp .env.example .env
Example (and default)
.env
file:DATABASE_URL=postgresql://postgres:password@db/spreadshare INTERVAL=300000
The
DATABASE_URL
parameter is the same url as inrunner/.env
. TheINTERVAL
parameter signifies the timespan of a candle. -
Copy
CSV
files data toinput-data
. This may requiresudo
as docker may claim ownership of the folder. Be aware that the data has aTimestamp, Open, Close, High, Low, Volume
format.sudo cp *.csv ./input-data
Cleaned 5 minute data may be retrieved at: https://stack.raoulschipper.com/s/AKdwqOjrBqsbCwF
-
Run the Datapump using:
docker-compose up --build
-
Run
docker network ls
-
Find the network that the runner uses
-
Adjust the network in
docker-compose.yml
in two places:networks: - runner_default
networks: runner_default: external: true
Some of the data is already present in the data. It is assumed that all of the data is already in the database and no further attempt to push the data is made.
A header for the csv files was expected, but not found. This is a warning and the first row, normally a header, is actually inserted. However, it may indicate that the order of columns is wrong!
The csv file XXXCandles has no proper timestamps. Ensure that the candle interval (INTERVAL
) in .env
is set
correctly. If this does not solve the problem, the csv
file has inconsistent timestamp intervals.
Either the DATABASE_URL
is incorrect or the database is not online. Ensure that the database container is running by
using docker ps
. See step 1 in the section Using the Datapump
.