Expand description
Data provider integrations
Source-specific adapters for fetching and processing tick/trade data.
§Supported Providers
binance- Binance spot and futures markets (primary - crypto)exness- Exness EURUSD Standard tick data (primary - forex)
§Provider Selection
| Asset Class | Provider | Rationale |
|---|---|---|
| Crypto | Binance | Official data, high volume, REST + WebSocket |
| Forex | Exness | Zero rate limiting, 100% reliability, simple format |
§Adding New Providers
Follow the established pattern:
providers/
└── [provider_name]/
├── mod.rs # Public API and documentation
├── client.rs # HTTP client or WebSocket
├── types.rs # Provider-specific data structures
├── builder.rs # Open deviation bar builder (if custom logic needed)
└── conversion.rs # Convert to AggTrade format§Design Principles
- Adapter pattern: Convert provider format → AggTrade (core format)
- Error propagation: Raise immediately, no silent failures
- Stateless where possible: Cache externally, not in provider
- Documented edge cases: Timezone handling, decimal factors, etc.
- Out-of-box dependencies: Use standard crates (zip, csv, chrono)
§Quick Start
Top-level re-exports allow shorter import paths:
ⓘ
// Top-level imports (recommended)
use opendeviationbar_providers::{
HistoricalDataLoader,
get_tier1_symbols,
ExnessFetcher,
};Or use submodule paths directly:
ⓘ
// Submodule imports (also supported)
use opendeviationbar_providers::binance::HistoricalDataLoader;
use opendeviationbar_providers::exness::ExnessFetcher;Re-exports§
pub use binance::AdaptiveRateLimiter;pub use binance::BinanceWebSocketStream;pub use binance::CsvAggTrade;pub use binance::HistoricalDataLoader;pub use binance::HistoricalError;pub use binance::IntraDayChunkIterator;pub use binance::RateLimitError;pub use binance::TIER1_SYMBOLS;pub use binance::WebSocketError;pub use binance::detect_csv_headers;pub use binance::fetch_aggtrades_parallel;pub use binance::get_tier1_symbols;pub use binance::get_tier1_usdt_pairs;pub use binance::is_tier1_symbol;pub use binance::python_bool;
Modules§
- binance
- Binance data provider
- serde_
helpers - Binance sends price and quantity as JSON strings (e.g.,
"112070.01000000"). Instead of deserializing toStringthen parsing, these helpers deserialize directly toFixedPoint— eliminating per-trade String allocations (~4000/sec on WS).