All Projects → WiSaGaN → ctp-rs

WiSaGaN / ctp-rs

Licence: other
A Rust wrapper of CTP API

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to ctp-rs

Lodepng Rust
All-in-one PNG image encoder/decoder in pure Rust
Stars: ✭ 78 (+5.41%)
Mutual labels:  rust-bindings
Shaderc Rs
Rust bindings for the shaderc library.
Stars: ✭ 143 (+93.24%)
Mutual labels:  rust-bindings
voikko-rs
Rust bindings for the Voikko library
Stars: ✭ 16 (-78.38%)
Mutual labels:  rust-bindings
Napi
High-level Node.js N-API bindings for Rust [WIP] ✨🦀🚀✨
Stars: ✭ 85 (+14.86%)
Mutual labels:  rust-bindings
Nix
Rust friendly bindings to *nix APIs
Stars: ✭ 1,660 (+2143.24%)
Mutual labels:  rust-bindings
Mlua
High level Lua 5.4/5.3/5.2/5.1 (including LuaJIT) bindings to Rust with async/await support
Stars: ✭ 176 (+137.84%)
Mutual labels:  rust-bindings
Gutenberg Parser Rs
An experimental Rust parser for WordPress Gutenberg post format
Stars: ✭ 76 (+2.7%)
Mutual labels:  rust-bindings
MarketHub
CTP期货数据收集与中转程序
Stars: ✭ 33 (-55.41%)
Mutual labels:  ctp
Rust Jack
Decent jack bindings for rust
Stars: ✭ 128 (+72.97%)
Mutual labels:  rust-bindings
mongo-rust-driver
Mongo Rust driver built on top of the Mongo C driver
Stars: ✭ 89 (+20.27%)
Mutual labels:  rust-bindings
Rustkit
Fast and ergonomic Rust bindings for ObjC APIs
Stars: ✭ 89 (+20.27%)
Mutual labels:  rust-bindings
Rust Security Framework
Bindings to the macOS Security.framework
Stars: ✭ 102 (+37.84%)
Mutual labels:  rust-bindings
Midir
Cross-platform realtime MIDI processing in Rust.
Stars: ✭ 221 (+198.65%)
Mutual labels:  rust-bindings
Rust Onig
Rust bindings for the Oniguruma regex library
Stars: ✭ 81 (+9.46%)
Mutual labels:  rust-bindings
ftdc
implement ftdc protocol of CTP in java
Stars: ✭ 34 (-54.05%)
Mutual labels:  ctp
Rusted Switch
Nintendo Switch Homebrew with Rust 🦀
Stars: ✭ 75 (+1.35%)
Mutual labels:  rust-bindings
Zstd Rs
A rust binding for the zstd compression library.
Stars: ✭ 159 (+114.86%)
Mutual labels:  rust-bindings
liboqs-rust
Rust bindings for liboqs
Stars: ✭ 46 (-37.84%)
Mutual labels:  rust-bindings
vnpy3
vnpy3
Stars: ✭ 19 (-74.32%)
Mutual labels:  ctp
backend-ctp
CTP接口封装,使用redis做消息中转
Stars: ✭ 26 (-64.86%)
Mutual labels:  ctp

ctp-rs

Build Status

A Rust wrapper of CTP API.

Background

CTP is a popular trading system in Chinese futures market. Finding a CTP trading system to connect to is easy in Chinese futures market. As a result, large portions of individual investors implement their trading strategies against CTP.

CTP API is an offical C++ API that manages connections to CTP trading system. Several language bindings for CTP API ranging from C# to Python have been created. Rust has native FFI support for C, but does not support C++ directly. This wrapper aims to provide an easy to use Rust binding of CTP API.

In contrast to conventional Rust binding for C++ that uses intermediate C wrapper, this Rust wrapper includes a handcrafted C++ calling interface in Rust for virtual function calls and virtual tables in callbacks. This makes the Rust interface cleaner and faster than alternatives.

This git repository contains 3 Rust crates: ctp-common, ctp-md, ctp-trader. ctp-md and ctp-trader both depend on ctp-common, but can be used separately.

ctp-common

Common datatypes including constants, structs in original C++ API, as well as some conversions to idiomatic Rust data types.

ctp-md

Wrapper for market data API. A run-time dependency of thostmduserapi.so is needed for Rust application that uses this crate.

ctp-trader

Wrapper for trader API. A run-time dependency of thosttraderapi.so is needed for Rust application that uses this crate.

OS support

Currently these 3 crates only support Linux x86_64

Minimal Rust version

1.26.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].