Giter Club home page Giter Club logo

cryptobot's Introduction

License Build Status

Cryptocurrency Trading bot

This repository contains a trading bot written in Rust that implements automatic trading on the https://www.coss.io/ platform.

It currently supports the following trading mechanisms:

  • Grid trading

As it is written in Rust, a multi-platform language, it can be run on any machine (Windows, Linux, macOS, etc...).

This bot has originally written to participate to the COSS contest. My handle on Telegram is @greglem.

WARNING: This bot is provided AS-IS and must only be used by experienced cryptocurrency traders. The developer cannot be held responsible for any financial loss any user of this bot may encounter.

Installation instructions

Installing rust

The best way to install Rust on your machine is to follow the quick installation instructions on rustup.rs.

Build the sources

First download the sources of the bot using git:

git clone https://github.com/glemercier/cryptobot.git

Run the build:

cargo build --release

The executable program will be generated under: target/release/cryptobot

Trading bot configuration

The configuration of the bot is done using a configuration file called config.conf. It can be edited using any text editor and should contain the following information:

credentials {
  public_key = "<public key of the COSS account>"
  secret_key = "<secret key of the COSS account>"
}

gridbot {
  pair = "<name of the pair to trade>"
  upper_limit = <upper limit of the grids>
  lower_limit = <lower limit of the grids>
  order_amount = <amount to buy/sell for each grid>
  number_of_grids = <number of grids to create between set limits>
}

The COSS API credentials (public/secret keys) can be generated on the COSS platform under Account -> API Management. The gridbot parameters need to be adjusted to match the expected trading strategy. Following is a simple example on the ETH/USDT pair:

gridbot {
  pair = "ETH_USDT"
  upper_limit = 160
  lower_limit = 140
  order_amount = 0.072
  number_of_grids = 20
}

Launching the bot

When launched, the bot will look for the config.conf file in the current directory. Make sure this file is valid and present, then run the bot:

target/release/cryptobot

The bot is not interactive and automatically place the orders by monitoring the target price in real-time. It displays everything it does in the console, and reports any error the same way. If you need to stop the bot, simply press Ctrl + C. Note that it will not cancel any orders that have been placed during the trading process, make sure to check and close the orders manually if needed using the COSS platform.

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.