Giter VIP home page Giter VIP logo

openquant-ctp's Introduction

OpenQuant内盘期货插件

目的

将OpenQuant与国内的CTP进行对接,让OpenQuant直接能交易国内期货

设计思路

  1. 利用了本开源项目的C-CTP接口,与CSharp-CTP接口
  2. C-CTP、CSharp-CTP都以dll方式调用
  3. 本插件同时支持QuantDeveloper、OpenQuant2和OpenQuant3(以下分别简称QD、OQ2和OQ3),只要进行再编译即可
  4. 为了支持查询合约列表功能,不使用OpenQuant接口,而是使用更底层的SmartQuant接口

如何安装使用

  1. 找到SmartQuant接口插件目录C:\Program Files\SmartQuant Ltd\OpenQuant\Framework\bin\
  2. 复制QuantBox.OQ.CTP.dll这个SQ插件,确保此插件的版本正确
  3. 找到OpenQuant接口插件目录C:\Program Files\SmartQuant Ltd\OpenQuant\Bin\
  4. 复制thostmduserapi.dll、thosttraderapi.dll两个CTP的dll到此目录
  5. 复制QuantBox.C2CTP.dll、QuantBox.CSharp2CTP.dll、QuantBox.Helper.CTP.dll、NLog.dll到此目录
  6. 复制CTP.nlog到此目录,或自己修改此文件
  7. 找到软件的插件配置文件C:\Documents and Settings\Administrator\Application Data\SmartQuant Ltd\OpenQuant\Framework\ini\framework.xml
  8. 添加<plugin enabled="True" assembly="QuantBox.OQ.CTP" type="QuantBox.OQ.CTP.CTPProvider" x64="False" />到对应位置
  9. 如何使用请查看插件的使用说明

如何开发

  1. 确保你的C-CTP接口的dll、CSharp-CTP接口等都是最新的
  2. 修改引用中有关SmartQuant类库的地址,使用你目标OQ中下的dll
  3. 修改.NET框架要使用的版本,QD使用2.0,OQ2使用3.5,OQ3使用4.0
  4. 修改dll生成的目录,具体请参考如何安装。
  5. 调试只能使用附加到进程,建议学习并使用远程调试
  6. 如果插件完全无法加载,请找到对应的log文件,查看日志。

openquant-ctp's People

Contributors

wukan1986 avatar fouvy avatar wangjiecifco avatar

Watchers

James Cloos avatar Kuo-Cheng Yeu 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.