Skip to main content

Crate wickra_terminal_core

Crate wickra_terminal_core 

Source
Expand description

§wickra-terminal-core

The data-driven core of the Wickra trading terminal. It folds market events into an O(1) AppState and turns panels into view-models — plain data (values, series, sides), never renderer commands. Two reference renderers consume those view-models (a native TUI and a Web app), and the same core is exposed as a JSON data API in ten languages.

§Shape

use wickra_terminal_core::{Config, SourceSpec, Terminal, Symbol};

let mut cfg = Config::default_layout();
cfg.sources = vec![SourceSpec::Synth { seed: 1 }];
let mut term = Terminal::new(&cfg).unwrap();
term.subscribe(0, &Symbol::new("BTC", "USDT")).unwrap();
let frame = term.tick();
assert_eq!(frame.panels.len(), 5);

Re-exports§

pub use candle::CandleBuilder;
pub use candle::Timeframe;
pub use config::default_indicators;
pub use config::Config;
pub use config::IndicatorSpec;
pub use config::Keybinds;
pub use config::Layout;
pub use config::Market;
pub use config::PanelSpec;
pub use config::RectSpec;
pub use config::SourceSpec;
pub use error::Error;
pub use error::Result;
pub use panels::build_panel;
pub use panels::Panel;
pub use panels::PanelKind;
pub use registry::build as build_indicator;
pub use registry::TickIndicator;
pub use registry::TickInput;
pub use registry::KINDS;
pub use source::build_source;
pub use source::DataSource;
pub use source::SourceId;
pub use source::SourceKind;
pub use state::AppState;
pub use state::IndicatorReading;
pub use state::IndicatorSet;
pub use terminal::Terminal;
pub use view::Frame;
pub use view::IndicatorField;
pub use view::IndicatorValue;
pub use view::PanelView;

Modules§

candle
Tick-to-OHLCV aggregation.
config
The terminal configuration — the data-driven description of what to show.
error
The crate error type.
panels
Panels — pure functions from state to a view-model.
registry
Indicator registry: constructs wickra-core indicators by name and wraps them behind a uniform, object-safe TickIndicator the terminal can drive from one tick.
source
Data sources — the activatable feed modules behind one trait.
state
The terminal’s application state — folded from events in O(1) per event.
terminal
The Terminal handle — the single entry point every renderer and every language binding drives.
view
View-models — the renderer-agnostic output of the core.

Structs§

Symbol
A canonical, venue-neutral market: a base asset against a quote asset.

Enums§

Event
An item yielded by a pull-based stream.

Functions§

version
The crate version (the same string Terminal::version returns).