Skip to main content

sym

Macro sym 

Source
macro_rules! sym {
    ($raw:literal) => { ... };
    (&$canonical:expr) => { ... };
}
Expand description

Short syntax for constructing a SymbolInput.

  • sym!("BTCUSDT")SymbolInput::Raw("BTCUSDT")
  • sym!(&my_symbol)SymbolInput::Canonical(&my_symbol)

For canonical from base/quote literals, construct Symbol directly: Symbol::new("BTC", "USDT") then pass via sym!(&sym) or (&sym).into().