Module utils

Source
Expand description

Common utility functions

Modules§

id_generation
SmartString ID generation helpers to reduce duplication across exchange adapters
simd_nan_safe
SIMD NaN-safe operations submodule

Functions§

bp_to_decimal
Convert basis points to decimal (1 bp = 0.01%)
decimal_to_bp
Convert decimal to basis points
format_decimal
Format decimal for API submission (removing trailing zeros)
generate_order_id
Generate a unique order ID
normalize_symbol
Normalize trading symbol (e.g., “BTC-USDT” -> “BTCUSDT”)
parse_decimal_option
Parse optional decimal value from string
parse_decimal_safe
Parse decimal value from string, returning zero on error
parse_symbol_pair
Parse symbol into base and quote currencies