Move 17 library crates into crates/, CLI binary into bin/fxt, consolidate 10 test crates into testing/, split config crate from deployment config files. Root directory reduced from 38+ to ~17 directories. All Cargo.toml paths and build.rs proto refs updated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
53 lines
1.8 KiB
Rust
53 lines
1.8 KiB
Rust
#![deny(clippy::unwrap_used, clippy::expect_used)]
|
|
#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used))]
|
|
// Generated protobuf code has doc/naming issues we can't fix
|
|
#![allow(clippy::doc_markdown, clippy::module_name_repetitions)]
|
|
// Proto-generated code triggers these lints — safe to suppress crate-wide
|
|
#![allow(
|
|
clippy::missing_const_for_fn,
|
|
clippy::indexing_slicing,
|
|
clippy::too_many_lines,
|
|
clippy::cognitive_complexity,
|
|
clippy::too_many_arguments,
|
|
clippy::type_complexity,
|
|
clippy::similar_names
|
|
)]
|
|
|
|
//! cTrader Open API client for Rust.
|
|
//!
|
|
//! Provides a production-grade async client for the cTrader Open API protocol
|
|
//! (Protobuf over TCP+TLS), targeting ICMarkets broker connectivity.
|
|
//!
|
|
//! # Architecture
|
|
//!
|
|
//! - **config** — connection configuration (environment, credentials, timeouts)
|
|
//! - **error** — error types for all failure modes
|
|
//! - **proto** — compiled protobuf message types
|
|
//! - **codec** — length-delimited protobuf wire codec
|
|
//! - **connection** — TCP+TLS transport with heartbeat
|
|
//! - **auth** — OAuth2 token exchange + protobuf auth sequence
|
|
//! - **dispatch** — request/response correlation and event broadcasting
|
|
//! - **rate_limiter** — token-bucket rate limiter (50/s + 5/s historical)
|
|
//! - **orders** — order request builders and type conversions
|
|
//! - **symbols** — symbol name → ID resolution cache
|
|
//! - **account** — account info and position reconciliation
|
|
//! - **client** — high-level `CTraderClient` API
|
|
|
|
pub mod account;
|
|
pub mod auth;
|
|
pub mod client;
|
|
pub mod codec;
|
|
pub mod config;
|
|
pub mod connection;
|
|
pub mod dispatch;
|
|
pub mod error;
|
|
pub mod market_data;
|
|
pub mod orders;
|
|
pub mod proto;
|
|
pub mod rate_limiter;
|
|
pub mod symbols;
|
|
|
|
pub use client::CTraderClient;
|
|
pub use config::{CTraderConfig, CTraderEnvironment};
|
|
pub use error::{CTraderError, Result};
|