tucano-data

Crates.iotucano-data
lib.rstucano-data
version0.1.0
created_at2025-08-14 02:01:01.249577+00
updated_at2025-08-18 02:50:15.782167+00
descriptionNormalized WebSocket ingestion of public data (focus B3)
homepage
repositoryhttps://github.com/brbtavares/tucano
max_upload_size
id1794326
size406,139
Bruno Tavares (brbtavares)

documentation

https://docs.rs/tucano-data

README

Tucano Data

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 markets crate contains only abstractions (traits, enums, types).

🎯 Role

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

🔑 Main Modules

  • 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.

🔗 Interdependencies

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

✅ Completed

  • Basic event and subscription models.

  • Initial reconnection structure (streams::reconnect).

đŸ§Ș Partial

  • Generic transformer (some parser placeholders).
  • Book/depth snapshots – to be detailed.
  • Incremental book (diffs) not implemented.

🚧 PendĂȘncias

  • 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).

🏁 Exemplo (conceitual)

use data::event::MarketEvent; // assinatura ilustrativa

fn handle(event: MarketEvent) {
    match event { /* ... */ }
}
Commit count: 0

cargo fmt