Giter VIP home page Giter VIP logo

asset-1's Introduction

资产服务

资产服务器主要实现了资产数据的获取和资产事件的发布功能。 资产服务器将根据各大交易所提供的REST API等方式,大约每隔10秒钟,从交易所获取一次资产详情,然后将资产数据经过打包处理,通过资产事件的方式发布至事件中心。

1. 准备工作

  • 使用 pip 安装 thenextquant:
pip install thenextquant
  • 下载项目 & 修改配置文件
git clone https://github.com/TheNextQuant/Asset.git  # 下载项目
cd Asset  # 进入项目目录
vim config.json  # 编辑配置文件

可以参考配置示例,配置文件详解请参考 配置文件说明

2. 运行

python src/main.py config.json  # 启动之前请修改配置文件

3. 各大交易所资产服务配置

将需要获取资产的账户,写入配置文件的 PLATFORMS 项目下,其中 key 为交易平台名称小写字母,可以通过 from quant import const 下各个交易所名称来确定。 注意,assets 为数组,可以同事配置多个账户。

  • OKEx

OKEx的配置需要注意 passphrase 参数不要遗漏。

{
    "PLATFORMS": {
        "okex": {
            "assets": [
                {
                    "account": "[email protected]",
                    "access_key": "abc123",
                    "secret_key": "ABC123",
                    "passphrase": "test123456"
                }
            ]
        }
    }
}

asset-1's People

Contributors

demon-hunter avatar

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.