pub fn bar_request_segments(
segments: Vec<(Timestamp, Duration)>,
is_continuous_future: bool,
) -> Vec<(Option<Timestamp>, Duration)>Expand description
Adapt duration segments for an IB historical bars request.
For continuous futures the end date is dropped and only the first segment is kept (IB rejects an explicit end date with error 10339), logging a warning when the requested range cannot be honored.