| Crates.io | tucano-markets |
| lib.rs | tucano-markets |
| version | 0.1.0 |
| created_at | 2025-08-14 01:57:38.647985+00 |
| updated_at | 2025-08-18 02:46:21.538188+00 |
| description | Exchange, Instrument, Asset models and market utilities |
| homepage | |
| repository | https://github.com/brbtavares/tucano |
| max_upload_size | |
| id | 1794324 |
| size | 30,944 |
Abstractions for market entities (Exchange, Asset, Instrument, Side, OrderType). This crate now contains only traits, enums, and types; all concrete exchange/broker integrations are implemented in
dataorintegration.
The markets crate provides the taxonomy and semantic types that support execution, data, and risk. It ensures that instruments and assets are consistently identified throughout the platform.
| Responsibility | Description |
|---|---|
| Exchange Model | exchange.rs defines the ExchangeId enum and characteristics (abstractions only) |
| Asset Model | asset.rs, asset_simplified.rs and specializations (Stocks, ETFs, REITs, Futures) (abstractions only) |
| Instrument | Standardized construction (name, market, derived symbol) |
| Index | index/ for efficient keyed collections |
-- ExchangeId โ Canonical identifier.
-- Asset โ Implementations by category (stock, ETF, REIT, future).
Instrument โ Combination of asset + market + semantics (e.g., mini-index).Side, OrderType โ Order direction and modality.| Depends on | Reason |
|---|---|
rust_decimal, chrono |
Monetary precision / timestamps |
| Consumed by | Usage |
|---|---|
execution |
Order identification / routing |
data |
Market event normalization |
risk |
Limit calculations per asset/instrument |
core |
Global instrument state |
analytics |
Aggregation keys by instrument |
-- Enum of exchanges and basic types.
Multi-broker abstraction (initial structure; all concrete implementations now live in data or integration).
Futures: rollover and adjustment factor calculation not yet implemented.
Normalization of derivative symbols (WIN, IND, DOL, WDO) with robust parsing.
Configurable multipliers / tick size table.
Dynamic instrument catalog (loading via API/Master file).
Mapping of corporate actions (dividends / splits) for accurate backtesting.
use markets::exchange::ExchangeId;
// let venue = ExchangeId::SomeExchange;