| Crates.io | tucano-data |
| lib.rs | tucano-data |
| version | 0.1.0 |
| created_at | 2025-08-14 02:01:01.249577+00 |
| updated_at | 2025-08-18 02:50:15.782167+00 |
| description | Normalized WebSocket ingestion of public data (focus B3) |
| homepage | |
| repository | https://github.com/brbtavares/tucano |
| max_upload_size | |
| id | 1794326 |
| size | 406,139 |
Layer for ingestion, normalization, and distribution of market events for global sources. All concrete exchange/broker integrations are now implemented as local modules here. The
marketscrate contains only abstractions (traits, enums, types).
The data crate centralizes the modeling of market events (ticks, trades, books, snapshots), abstracts heterogeneous sources (initially ProfitDLL), and delivers a unified stream to the core.
| Responsibility | Description |
|---|---|
| Event Models | event.rs defines structured enums (Trade, Quote, Book, etc.) |
| Identifiers | instrument.rs, exchange.rs, subscriber/subscription manage keys |
| Streams | streams/ module provides construction, reconnection, transformation |
| Transformation | transformer/ for parsing/adapting raw payloads |
| Integration Example | Implemented as a local module in exchange/ |
| Normalization | Integration with asset/market types from the markets crate |
| Snapshotting | snapshot.rs + collection/ for consistent initial state |
event.rs â Market/account event types.instrument.rs â Structures for normalized instrument identification.streams/ â Connectors and resilient (re)connection logic.exchange/ â Organization by venue (B3 first; room for others).subscriber/ & subscription/ â Subscription and lifecycle management.transformer/ â Parsing and enrichment pipelines.snapshot.rs â Initial snapshot processing.| Depends on | Reason |
|---|---|
markets |
Abstractions (traits, enums, types) for assets/instruments |
integration |
Channels/transport (websocket/http wrappers in the future) |
execution |
To join market and account events (consistency) |
| Consumed by | Usage |
|---|---|
core |
Main feed for the event engine |
analytics |
Price/trade series for metrics |
strategy |
Signal triggers |
risk |
Volatility, gaps, integrity checks |
Basic event and subscription models.
Initial reconnection structure (streams::reconnect).
Suporte a diferentes frequĂȘncias (agg de 1s/1m) nativamente.
Compressão e serialização eficiente (Parquet / Arrow) para histórico.
Backfill de gaps de conexĂŁo.
Canal de latĂȘncia (timestamp triplo: source, receive, process).
use data::event::MarketEvent; // assinatura ilustrativa
fn handle(event: MarketEvent) {
match event { /* ... */ }
}