hnlcf / rsquant

A quanting demo for cryptocurrency based on Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project Avatar

Quant Trader

A quanting trade system of the cryptocurrency based on Rust.

Contents

Introduction

Due to the direct use of Binance Public API Connector Rust, only Binance is currently supported.

The following picture is the structure diagram of the project divided by modules.

project-structure

The following is execution flow:

exec-flow

Build in Host

Requirements

  • System: Ubuntu 22.04
  • Language: Rust 1.75
  • Dependencies: pkg-config, libssl-dev, libpq, postgresql, poetry

Commands

./rsquant.sh setup

./rsquant.sh build

Build in Docker

Requirements

  • Images: Ubuntu 22.04

Commands

./rsquant.sh setup-docker

./rsquant.sh setup

./rsquant.sh build

Configuration

Before using it, you need to configure it correctly in the config file.

Examples

# File location: "$XDG_CONFIG_HOME/rsquant/config.toml"

[api_credentials.binance]
signature_type="HMAC"
api_key="<your-api-key>"
api_secret="<your-api-secret>"

[email]
from_email="Quant Trader <xxxx@gmail.com>"
to_emails=["hnlcf <xxxx@gmail.com>"]
from_passwd="xxxx"
smtp_addr="smtp.gmail.com"

[network.proxy]
# https_proxy="<protocol>://<proxy-host>:<port>"

[log]
log_path="log/output.log"

[database.postgresql]
pg_addr="postgres://postgres:postgres@localhost:5432/rsquant_db"

Description

  1. api_credentials: It is your credentials manually generated in Binance account, and currently only supports HMAC.
  2. email: You can set the sender's email account(from_email), password(from_passwd), server address(smtp_addr) and subscriber's email list(to_emails).
  3. network.proxy (Optional): You can set the address of the network proxy.
  4. log: You need to set the path of log file (The path must be exists).
  5. database.postgresql: You need to set the address of postgresql database.

Run

Launch data server

./rsquant.sh run

Launch web server

./rsquant.sh web

License

MIT

About

A quanting demo for cryptocurrency based on Rust.

License:MIT License


Languages

Language:Rust 77.8%Language:TypeScript 15.7%Language:Shell 3.5%Language:Dockerfile 1.9%Language:HTML 0.5%Language:CSS 0.4%Language:JavaScript 0.2%