资产服务根据各个交易所当前提供的不同方式,通过REST API或Websocket方式实现了对各大交易所平台账户资产的的获取及推送。
资产事件默认
10秒
推送一次,可以在配置通过设置update_interval
来指定资产事件更新推送时间间隔。
需要安装 thenextquant
量化交易框架,使用 pip
可以简单方便安装:
pip install thenextquant
git clone https://github.com/TheNextQuant/Asset.git # 下载项目
cd Asset # 进入项目目录
vim config.json # 编辑配置文件
python src/main.py config.json # 启动之前请修改配置文件
- 配置示例
{
"RABBITMQ": {
"host": "127.0.0.1",
"port": 5672,
"username": "test",
"password": "123456"
},
"PROXY": "http://127.0.0.1:1087",
"ACCOUNTS": [
{
"platform": "binance",
"account": "test@gmail.com",
"access_key": "abc123",
"secret_key": "abc123"
}
]
}
以上配置表示:增加
binance
平台的账户test@gmail.com
到资产服务器。
配置请参考 配置文件说明。