parse_base_quote_from_symbol

Function parse_base_quote_from_symbol 

Source
pub fn parse_base_quote_from_symbol(symbol: &str) -> Result<(&str, &str)>
Expand description

Extracts base and quote currencies from an OKX symbol.

All OKX instrument symbols start with {BASE}-{QUOTE}, regardless of type.

§Errors

Returns an error if the symbol doesn’t contain at least two parts separated by ‘-’.