Trading Bot based on Invest Tinkoff API
Our documentation is available on GitHub Pages.
Clone this repository first, and we are ready to go.
$ git clone https://github.com/elkopass/BITA
This bot is fully configurable with environment variables using envconfig library.
You can find full list of them in our .env-example file.
Right before we started, obtain your Tinkoff Invest API token in
settings and set it as follows: TRADEBOT_TOKEN=<your_api_token>
.
Running trade-bot in a Docker-container is a preferable way.
$ cp cmd/trade-bot/.env-example cmd/trade-bot/.env
$ vim cmd/trade-bot/.env # make sure to reconfigure it with your own data!
$ docker-compose up --build
Let's set and export env variables first:
$ cp cmd/trade-bot/.env-example cmd/trade-bot/.env
$ vim cmd/trade-bot/.env # make sure to reconfigure it with your own data!
$ export $(grep -v '^#' cmd/trade-bot/.env | xargs)
After that, you can build binary and run it using go v1.16+ as follows:
$ go build -v -o trade-bot ./cmd/trade-bot
$ ./trade-bot
It is very important to create alert rules on key trade actions to prevent possible money losses
This is why our service exports a lot of useful metrics for you to configure your own monitoring.
Check out our cool Grafana dashboard >> here <<
You can always download and import the latest version from JSON file for your own installation.
If you want to support this project, check our contributing guideline.
The developers are NOT RESPONSIBLE for any financial losses incurred during the use of the trading bot.
This project is released under the Apache License. See LICENSE for details.