Giter Site home page Giter Site logo

sleeyax / voltra Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 2.0 164 KB

Cross-market volatile cryptocurrency trading bot

License: GNU General Public License v3.0

Go 99.46% Dockerfile 0.54%
binance binance-bot bitcoin btc cryptocurrency cryptocurrency-trading-bot trading-bot go-crypto-volatility-trading-bot algorithmic-trading cryptocurrencies

voltra's Introduction

logo

Voltra

A cross-market cryptocurrency volatility trading bot written in go.

Warning

Trading cryptocurrency carries risks. This bot is a tool, not financial advice. Use at your own discretion.

Note

This project has entered its alpha phase. We welcome you to report and/or help resolve any bugs!

build status

Strategy

The bot analyses changes in price of all coins across all supported marketplaces and places trades on the most volatile ones.

Features

  • Supports multiple cryptocurrency marketplaces
  • Highly configurable
    • Configurable stop loss (SL) and take profit (TP)
    • Trailing SL and TP
    • Limit amount of coins to trade
    • Option to include or exclude specific pairs
    • Option to reinvest profits
    • Configurable intervals, trading fees etc.
    • ...
  • Optimized for speed and efficiency
    • Selling and buying coins happens in different goroutines (= lightweight threads)
    • Marketplace API requests are reduced to a minimum
  • Trade history is stored to a (local) database.
  • Production-grade logging
  • Receive status updates via Telegram or Discord - coming very soon!
  • Request a feature!

Supported markets

If you're a developer, you can add support for a new marketplace by implementing the Market interface here. See the Binance implementation as an example. Comment on the relevant issue if you need help.

Getting started

First of all, make sure you have a valid config file. You can use the example config as a starting point:

$ cp config.example.yml config.yml

Open the file in your text editor of choice and edit it according to your preferred trading strategy. Don't forget to at least configure your API keys!

Binaries

The easiest way to get started is by downloading the latest release for your operating system from the releases page. Extract the archive, copy your config file to the same directory and finally run the binary in a terminal/command prompt as follows:

$ ./voltra

Docker

You can run the bot on any platform or cloud provider that supports Docker.

First, pull the latest image from GitHub's container registry as follows:

$ docker pull ghcr.io/sleeyax/voltra:latest
OR click here for instructions to build from source Clone the source code and build the docker image locally:
$ git clone https://github.com/sleeyax/voltra.git
$ cd voltra
$ docker build --tag ghcr.io/sleeyax/voltra:latest .

Then, to run the bot you have the option to run with our without data persistence. When you opt for the latter, any outputted data such as your database will be deleted as soon as the container is removed.

  • With full data persistence:
$ docker run --name voltra --volume ./config.yml:/bot/config.yml:ro --volume ./data:/bot/data -it sleeyax/voltra:latest

Alternatively, you can store your config file in the data directory and only mount that directory:

$ docker run --name voltra --volume ./data:/bot/data -it sleeyax/voltra:latest
  • Without data persistence:
$ docker run --name voltra --volume ./config.yml:/bot/config.yml:ro -it sleeyax/voltra:latest

Credits

Inspired by CyberPunkMetalHead/Binance-volatility-trading-bot and its many forks.

voltra's People

Contributors

renovate[bot] avatar sleeyax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

zyx898

voltra's Issues

Bybit Module

Describe the feature you'd like
Add Bybit

Describe alternatives you've considered
Considered using Binance, but with a lot of countries banned from futures there, it makes it impossible to trade.

Error on live mode: panic: runtime error: invalid memory address or nil pointer dereference

Describe the bug
The error occurs when test mode is disabled, manifesting after a successful token purchase.

[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5a3b34d]

goroutine 7 [running]:
github.com/sleeyax/voltra/internal/bot.(*Bot).sell(0xc000078690, {0x5c2a0e0, 0xc0001df7c0}, 0xc0000ac360?)
	/github/workspace/internal/bot/bot.go:191 +0x2ed
created by github.com/sleeyax/voltra/internal/bot.(*Bot).Start in goroutine 1
	/github/workspace/internal/bot/bot.go:58 +0x157

Steps to reproduce
Disabling test mode; it runs normally while in test mode.

enable_test_mode: false

Steps:

  • I executed ./voltra in a terminal/command prompt

Screenshots
image
System information

  • OS: macos
  • Bot version: latest

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

dockerfile
Dockerfile
  • golang 1.22-alpine
  • golang 1.22-alpine
github-actions
.github/workflows/publish_binaries.yml
  • actions/checkout v4
  • wangyoucao577/go-release-action v1
.github/workflows/publish_docker.yml
  • actions/checkout v4
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/metadata-action v5
  • docker/build-push-action v5
  • actions/upload-artifact v4
  • actions/download-artifact v4
  • docker/setup-buildx-action v3
  • docker/metadata-action v5
  • docker/login-action v3
.github/workflows/run_tests.yml
  • actions/checkout v4
  • actions/setup-go v5
gomod
go.mod
  • go 1.22.2
  • github.com/adshao/go-binance/v2 v2.5.0
  • github.com/glebarez/sqlite v1.11.0
  • github.com/spf13/viper v1.18.2
  • github.com/stretchr/testify v1.9.0
  • go.uber.org/zap v1.27.0
  • golang.org/x/text v0.14.0
  • gorm.io/gorm v1.25.10

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.