Skip to main content

perp_underlying

Function perp_underlying 

Source
pub fn perp_underlying(symbol: &str) -> Option<&str>
Expand description

Extract the underlying from a perp symbol (e.g., “BTC-PERP” -> “BTC”, “BTC” -> “BTC”). Returns None for option symbols or other hyphenated symbols that aren’t perps.