Expand description
Trading constants and utilities
Constants§
- DEFAULT_
MAKER_ FEE_ RATE - Default maker fee rate (0.1%)
- DEFAULT_
STOP_ LOSS_ BPS - Default stop loss in basis points.
- DEFAULT_
TAKER_ FEE_ RATE - Default taker fee rate (0.1%)
- DEFAULT_
TAKE_ PROFIT_ BPS - Default take profit in basis points.
- HIGH_
FEE_ BPS - High fee in basis points.
- MAKER_
FEE_ BPS - Common fee rates in basis points (compile-time calculated)
- MAX_
LEVERAGE - Risk management constants
- MAX_
OPEN_ ORDERS_ PER_ SYMBOL - Maximum number of open orders per symbol
- MAX_
ORDER_ SIZE - Maximum order size (safety limit)
- MAX_
POSITION_ PCT - Maximum position size as percentage of account balance
- MIN_
ORDER_ SIZE - Minimum order size (common across many exchanges)
- TAKER_
FEE_ BPS - Default taker fee in basis points.
Functions§
- calculate_
fee_ bps - Const fn helpers for trading calculations
- max_
position_ size - Calculates the maximum position size based on account balance and risk percentage.
- optimal_
order_ count - Calculates the optimal number of orders based on total size and minimum order size.
- risk_
adjusted_ size - Adjusts the order size based on a risk factor.