Skip to main content

bar_spec_to_period_id

Function bar_spec_to_period_id 

Source
pub fn bar_spec_to_period_id(spec: BarSpecification) -> Result<Ustr>
Expand description

Returns the CoinAPI streaming period_id for a last-price bar specification.

CoinAPI streams OHLCV periods from one second to one day.

ยงErrors

Returns an error if the price type is not last or CoinAPI has no matching period.