Giter Site home page Giter Site logo

c-for-futuopend's Introduction

C++ For FutuOpenD

C++对接富途证券Open API,使用C++进行量化交易。

编译说明:

  1. 依赖:

    • 支持C++ 11的编译器
    • libuv 1.22
    • google protobuf 3.5.1
  2. Windows:VS2013可以直接打开sln

  3. Linux:可以用cmake:

    • mkdir build && cd build
    • cmake ..
    • make

功能:

  1. 基本流程已经运行正常,添加新功能时参考NetCenter里的做法就好:

    • socket连接成功后,要先发InitConnect协议,成功返回后就可以做事情了
    • 拉取数据参照Req_GetGlobalState
    • 接收实时数据推送前要先订阅(参考Req_Subscribe),并注册接收推送(参考Req_RegPush)
    • 接收推送数据参考QuoteHandler::OnRsp_Qot_UpdateTicker
    • 需要每隔一定时间向FutuOpenD发送心跳包,参考StartKeepAliveTimer
  2. 当前代码对应FutuOpenD的1.02版本

  3. 运行成功界面:

image

参考:

  1. Futu Open API下载
  2. Futu Open API使用说明
  3. Python API
  4. protobuf协议文档

c-for-futuopend's People

Contributors

towerd avatar

Watchers

 avatar  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.