diff --git a/.gitignore b/.gitignore index b89472b..2e9bf38 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules/ dist/ data.json -envfile \ No newline at end of file +.env diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..cce9d3c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "semi": false +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..78664b2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.tabSize": 2 +} diff --git a/README.md b/README.md index 6f0605d..b6b4d09 100644 --- a/README.md +++ b/README.md @@ -3,22 +3,18 @@ ## Installation ```bash -git clone https://gitlab.com/MadDeveloper/bot-warhead.git theddy +git clone https://gitlab.com/MadDeveloper/trading-bot.git theddy cd theddy -npm install --global typescript lite-server npm install ``` -Create your API keys on the platform (binance, gdax, etc.) and export them as environment vars. +Create your API keys on the platform (binance, etc.) and export them as environment vars. For exemple, on Linux, add to your ~/.bashrc the following lines: ```bash -export BINANCE_API_KEY=lorem -export BINANCE_API_SECRET=lorem -export BINANCE_API_PASSPHRASE=lorem -export GDAX_API_KEY=lorem -export GDAX_API_SECRET=lorem -export GDAX_API_PASSPHRASE=lorem +export BINANCE_API_KEY= +export BINANCE_API_SECRET= +export BINANCE_API_PASSPHRASE= ``` ## Getting started @@ -34,7 +30,7 @@ Or one by step: ```bash npm run build && npm start -```` +``` If you want to see in realtime the chart: @@ -45,21 +41,19 @@ npm run chart And then you can go to http://localhost:3000 and watch the magic happening! ## Docker + ### Setup ```bash -touch envfile +touch .env ``` -Then add the following lines to the envfile: +Then add the following lines to the .env file: ```bash BINANCE_API_KEY=xxxxxx BINANCE_API_SECRET=xxxxx BINANCE_API_PASSPHRASE=xxxxx -GDAX_API_KEY=xxxx -GDAX_API_SECRET=xxxxx -GDAX_API_PASSPHRASE=xxxxx ``` ### Build @@ -77,11 +71,11 @@ npm run docker:build ### Run ```bash -docker run -it --env-file envfile -p 3000:3000 theddy +docker run -it --env-file .env -p 3000:3000 theddy ``` or ```bash npm run docker:run -``` \ No newline at end of file +``` diff --git a/index.html b/index.html index c819e1d..85b4f36 100644 --- a/index.html +++ b/index.html @@ -18,8 +18,6 @@ } #myChart { - width: 99% !important; - max-height: 700px !important; margin: 0; padding: 0; } @@ -261,7 +259,18 @@