| Crates.io | tucano-execution |
| lib.rs | tucano-execution |
| version | 0.1.0 |
| created_at | 2025-08-14 02:04:36.714892+00 |
| updated_at | 2025-08-18 02:52:18.530405+00 |
| description | Order & account data: execution (mock/live) and private streams |
| homepage | |
| repository | https://github.com/brbtavares/tucano |
| max_upload_size | |
| id | 1794329 |
| size | 212,156 |
Order execution and account synchronization layer (global venues, with all concrete integrations implemented as local modules;
marketscontains only abstractions).
The execution crate encapsulates interaction with venues for order submission, fill reception, balance and position synchronization, offering a stable interface to core and abstracting specific details (latency, proprietary formats).
| Responsibility | Description |
|---|---|
| Client Trait | client/ abstracts submission, cancellation, state fetching |
| Order | order/ models the lifecycle (request, snapshot, state) |
| Trade | trade/ represents executions and fees |
| Balance | balance/ tracks multi-asset balances |
| Indexing | indexer.rs and map/ for efficient lookup |
| Mock | exchange/mock for deterministic tests and backtests |
ExecutionClient (trait) โ Contract for any execution integration.MockExchange / MockExecutionConfig โ Controlled simulation environment.AccountEvent / AccountSnapshot โ Unified account updates.OrderRequest(Open/Cancel) and OrderSnapshot โ Complete order flow.map::ExecutionTxMap โ Routing requests to different exchanges.| Depends on | Reason |
|---|---|
markets |
Abstractions (traits, enums, types) for exchange/instrument identifiers |
integration |
Async channels for requests/responses |
data |
Coherence between market events and fills (timestamp) |
| Consumed by | Usage |
|---|---|
core |
Order submission and account event ingestion |
risk |
Validation before submit/cancel |
analytics |
Sourcing trades for metrics |
Functional mock execution structure.
Structured account event pipeline (snapshot, open order, cancel, trade).
Compat layer (String โ ExchangeId) stabilized post-refactor.
Execution reconnection management (only a draft).
Implement effective cancellation / partial fills.
Time-in-force, advanced types (stop, OCO) โ roadmap.
Latency measurement (queueing timestamps).
Order sequence persistence for recovery.
use execution::order::request::OrderRequestOpen; // assinatura ilustrativa
let order = OrderRequestOpen::market_buy("PETR4", 100.0);
execution_tx.send(order)?;