- 使用Trait定义核心接口
- 采用异步编程模型(async/await)
- 强大的错误处理机制
- 类型安全的数据结构
- 配置管理:使用强类型配置
- 数据获取:异步数据获取接口
- 策略实现:可扩展的策略trait
- 风险管理:实时风险控制
- 交易执行:异步订单处理
- 使用tokio作为异步运行时
- 使用serde进行序列化
- 使用rust_decimal处理金融计算
- 使用tracing进行日志记录
- 使用thiserror和anyhow处理错误
- 内存安全
- 并发性能好
- 类型安全
- 编译时错误检查
cargo run
To run the application, you need to provide a configuration file.
- Copy
config.example.jsontoconfig.json. - Replace the placeholder values in
config.jsonwith your actual API key, secret, and other parameters. - Alternatively, you can create a
.envfile with the required environment variables.