skyfffire 2 жил өмнө
parent
commit
7ca9e8920c
2 өөрчлөгдсөн 42 нэмэгдсэн , 5 устгасан
  1. 37 0
      README.md
  2. 5 5
      config.toml.sample

+ 37 - 0
README.md

@@ -15,3 +15,40 @@
 └─ global                               // 一些全局变量或配置
 ```
+
+## 运行步骤(以ubuntu 20 为例)
+
+### 1. 安装rust运行环境
+```shell
+sudo su
+sudo apt update
+sudo apt-get install build-essential libssl-dev pkg-config
+curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+rustc --version
+```
+### 2. 项目本地化(第一次使用git需要输入git用户名和密码完成克隆)
+```shell
+cd /
+mkdir app
+cd app
+git config --global credential.helper store
+git clone http://git.skyfffire.com/skyfffire/as-rust.git
+```
+
+## 3. 配置相关参数
+```shell
+cd as-rust/
+cp config.toml.sample config.toml
+nano config.toml
+```
+使用nano文本编辑器时,ctl+s保存,ctl+x退出编辑
+
+## 4. 编译及运行
+```shell
+cargo run
+```
+
+## 5. 如果之后项目有更新,执行下面命令可以获取最新版
+```shell
+git pull origin master
+```

+ 5 - 5
config.toml.sample

@@ -2,16 +2,16 @@ broker_id = "gate"
 account_name = "gate_account"
 access_key = ""
 secret_key = ""
-pass_key = "21314123"
+pass_key = ""
 exchange = "gate_usdt_swap"
-pair = "eth_usdt"
+pair = "blz_usdt"
 open = 0.001
 close = 0.0002
-lever_rate = 1.0
+lever_rate = 0.1
 # 延迟时间,改成ms级别
 interval = 100
 ref_exchange = ["binance_usdt_swap"]
-ref_pair = ["eth_usdt"]
+ref_pair = ["blz_usdt"]
 used_pct = 0.9
 index = 0
 save = 0
@@ -23,4 +23,4 @@ grid = 1
 place_order_limit = 0
 colo = 0
 # 日志级别,从低到高依次是:[trace, debug, info, warn, error]
-log_level = "debug"
+log_level = "info"