spread_bps

Function spread_bps 

Source
pub fn spread_bps(best_bid: Option<f64>, best_ask: Option<f64>) -> Option<f64>
Expand description

Calculate spread in basis points.

§Arguments

  • best_bid - Best bid price
  • best_ask - Best ask price

§Returns

Spread in basis points, or None if either price is missing