hfqr / flashfunk Goto Github PK
View Code? Open in Web Editor NEWHigh Performance Runtime in Rust
High Performance Runtime in Rust
在底层尽可能处理掉操作逻辑, 暴露给上层的都是统一的API Interface
接口包括
行情接口
---》 rust层自动生成对接的API md_api.rs
交易接口
---> rust层自动生成对接的API td_api.rs
根据接口不同 可以实现feature=["ctp", "ess"]来实现对接各种不同的接口
添加一个Risk trait
pub trait Risk{
fn new() -> Self;
fn check_order(&self, order: &OrderData) -> bool;
}
pub struct RiskControl{
}
impl Risk for RiskControl {
fn new() -> Self{
RiskControl {}
}
fn check_order(&self, order: &OrderData) -> bool{
true
}
}
该trait实现检查报单
CtpbeeR::builder::<MdApi, TdApi, _>("ctpbee")
.strategies(vec![strategy_1.into_str()])
.risk(RiskControl )
.id("name")
.pwd("id")
.path("bug")
.login_form(login_form)
.start();
In here we provide the todo list,
context
, we need to store all data in a map as soon as possible在不影响报单的性能下 将底层函数执行的日志按照logger格式
添加Log
传送出来 。
將不安全的底層封裝單個crate 基於特性 來增加額外接口
设定一个TdOtherApiMessage的 结构,在识别到其他的行情的客户端的报单的时候 作为单独的行情发送到 Context上面去 ,不做其他处理, 并不进行回调 。 这样能保证数据的准确,防止重复插入。
后续还会开发支持ees接口吗
需要一个统一的仓位管理器来让程序知道当前有多少个仓位
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.