1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Canonical types, events, commands, and traits for the trading bot.
//!
//! `bot-core` is the shared contract between strategies, the engine, and
//! exchange adapters. It owns identifiers, money/quantity wrappers, instrument
//! metadata, order state, command/event DTOs, and the strategy/exchange traits.
//!
//! # Example
//!
//! ```
//! use bot_core::{
//! Environment, ExchangeId, ExchangeInstance, InstrumentId, OrderSide, PlaceOrder, Price, Qty,
//! };
//! use rust_decimal::Decimal;
//!
//! let exchange = ExchangeInstance::new(ExchangeId::new("hyperliquid"), Environment::Testnet);
//! let order = PlaceOrder::limit(
//! exchange,
//! InstrumentId::new("BTC-PERP"),
//! OrderSide::Buy,
//! Price::new(Decimal::new(65_000, 0)),
//! Qty::new(Decimal::new(1, 3)),
//! );
//!
//! assert_eq!(order.instrument.as_str(), "BTC-PERP");
//! ```
//!
//! # Error and panic policy
//!
//! Constructors are intentionally lightweight and do not validate exchange
//! semantics. String parsing helpers return `rust_decimal::Error` on invalid
//! decimals. Non-WASM [`now_ms`] panics only if the host clock is before the
//! Unix epoch.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;