Açıklama Yok

skyffire 649e8be75b 移除敏感信息。 6 ay önce
derive 72525ffe83 添加bitget数据导出 11 ay önce
exchanges 649e8be75b 移除敏感信息。 6 ay önce
global c39169b28a 子账户相关 8 ay önce
src 1910f0df05 v4.2.0_beta: 可以编译通过的版本,还没测试运行! 8 ay önce
standard 53b126e0e5 v3.2.6: 修复bybit_swap的一个rest接口格式化问题。 7 ay önce
strategy 10467e7ee9 v3.2.7: 修复平仓信号更新不及时导致的多次打订单问题。 7 ay önce
tests 72525ffe83 添加bitget数据导出 11 ay önce
.gitignore a2904c1f79 修复bitget的bug: 11 ay önce
Cargo.toml 1910f0df05 v4.2.0_beta: 可以编译通过的版本,还没测试运行! 8 ay önce
README.md 1a83863067 增加虚拟内存配置说明 2 yıl önce
config.toml.sample a686b6d4d7 合并异常的处理。 1 yıl önce
rust-toolchain 2752a25f17 交叉编译支持 9 ay önce
test_account.toml.sample 7288ffcb2d 火币合并 1 yıl önce

README.md

声明

项目结构解析

|
├─ main                                 // 系统入口
│
├─ exchanges                            // 交易所层(网络层)
│
├─ strategy                             // 策略层(主逻辑、风控等)
│
├─ standard                             // 标准化层(中间件)
│
└─ global                               // 一些全局变量或配置

运行步骤(以ubuntu 20 为例)

1. 安装rust运行环境,安装环境时选择1)Proceed with installation (default)

sudo su
sudo apt update -y
sudo apt-get install build-essential -y 
sudo apt-get install libssl-dev -y 
sudo apt-get install pkg-config -y 
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

然后先后运行这两个命令,检查rust运行环境安装成功:

source $HOME/.cargo/env
rustc --version

增加虚拟内存

sudo fallocate -l 1G /swapfile
ls -lh /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h

2. 项目本地化(第一次使用git需要输入git用户名和密码完成克隆)

cd /
mkdir app
cd app
git config --global credential.helper store
git clone http://git.skyfffire.com/skyfffire/as-rust.git

3. 配置相关参数

cd as-rust/
cp config.toml.sample config.toml
nano config.toml

使用nano文本编辑器时,ctl+s保存,ctl+x退出编辑

4. 编译及运行

cargo run

5. 如果之后项目有更新,执行下面命令可以获取最新版

git pull origin master