Skip to main content

adaq_trading_crypto/
lib.rs

1//! # adaq-trading-crypto
2//!
3//! 为 AdaQ 量化平台实现的加密货币与预测市场统一交易接口(Rust lib)。
4//!
5//! - 统一接口面:[`Exchange`](exchange::Exchange)(REST)与
6//!   [`Realtime`](exchange::Realtime)(watch_*,需 `realtime` feature)。
7//! - 统一数据结构:[`types`],字段与 ccxt 对齐。
8//! - 精确数值:[`Precise`] 与 [`decimal_to_precision`](decimal::decimal_to_precision)。
9//! - 错误体系:[`Error`] / [`ErrorKind`](error::ErrorKind),镜像 ccxt 异常树。
10//!
11//! 功能基线与 [ccxt](https://github.com/ccxt/ccxt) 对齐;适配器解析逻辑若
12//! 参考 ccxt 源码,相应文件保留 MIT 声明(见仓库 `NOTICE`)。
13
14pub mod adapters;
15pub mod contract_gen;
16pub mod decimal;
17pub mod eip712;
18pub mod error;
19pub mod exchange;
20pub mod generic;
21pub(crate) mod generic_parse;
22pub mod httpcore;
23pub mod methods;
24pub mod precise;
25pub mod realtime;
26pub mod serde_helpers;
27pub mod signing;
28#[cfg(feature = "sync")]
29pub mod sync;
30pub mod throttle;
31pub mod transport;
32pub mod types;
33
34pub use decimal::{PaddingMode, PrecisionMode, RoundingMode, decimal_to_precision};
35pub use error::{Error, ErrorContext, ErrorKind, Result};
36pub use exchange::{Config, Exchange, Params, Realtime};
37pub use precise::Precise;
38#[cfg(feature = "sync")]
39pub use sync::{BlockingExchange, SyncRuntime};
40pub use throttle::{ThrottleMode, Throttler};
41pub use transport::Transport;
42pub use types::{
43    Balance, Balances, Currencies, Currency, Fee, FundingRate, LedgerEntry, Level, Limit, Limits,
44    Market, MarketType, Markets, OHLCV, Order, OrderBook, Position, Precision, Ticker, Tickers,
45    Trade, Transaction,
46};