Coder Social home page Coder Social logo

m2land / hf_ctp_py_proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haifengat/pyctp

0.0 0.0 0.0 31.11 MB

上期技术期货交易api之python封装,实现接口调用。支持windows linux.

License: Apache License 2.0

C# 41.49% C 12.12% C++ 16.56% Python 29.82%

hf_ctp_py_proxy's Introduction

hf_ctp_py_proxy

上期技术期货交易api之python封装,实现接口调用。支持windows linux.

环境需求

  • VS2017
  • python 3.6+

使用说明

  • 运行 pyton generate\\run.py 生成所有文件
  • C++编译
    • Windows
      • 环境要求 vs2017
      • 设置项目为x64,否则会提示找不到windows.h
      • 打开ctp_c\ctp.sln
      • 编译ctp_quote 和 ctp_trade项目
      • 编译后生成的dll放在py_ctp\lib32|lib64目录下
    • Linux
      • 设置系统语言为:zh_CN.UTF-8
      • 复制文件到linux ctp_c\*.h *.cpp 到ctp_c目录下
      • 复制 ctp_20180109\*.so到dll目录下
      • 复制 py_ctp\*.py到py_ctp目录下
      • 进入dll目录,执行以下指令
        • g++ -shared -fPIC ./trade.cpp -o ./ctp_trade.so ./thosttraderapi_se.so ./LinuxDataCollect.so
        • g++ -shared -fPIC ./quote.cpp -o ./ctp_quote.so ./thostmduserapi_se.so
  • 测试
    • Python
    • C#
      • copy cs_ctp\*.cs cs_ctp\ctp_test\
      • 打开cs_ctp\ctp_test 项目进行调试
      • 打开cs_ctp\proxytest 项目测试.net封装

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.