pub struct InstrumentCandlesQuery {
pub price: Option<PricingComponent>,
pub granularity: Option<CandlestickGranularity>,
pub count: Option<i64>,
pub from: Option<Timestamp>,
pub to: Option<Timestamp>,
pub smooth: Option<bool>,
pub include_first: Option<bool>,
pub daily_alignment: Option<i64>,
pub alignment_timezone: Option<String>,
pub weekly_alignment: Option<WeeklyAlignment>,
pub units: Option<Decimal>,
}Expand description
Query parameters for instrument_candles.
Fields§
§price: Option<PricingComponent>The Price component(s) to get candlestick data for. [default=M]
granularity: Option<CandlestickGranularity>The granularity of the candlesticks to fetch [default=S5]
count: Option<i64>The number of candlesticks to return in the response. Count should not be specified if both the start and end parameters are provided, as the time range combined with the granularity will determine the number of candlesticks to return. [default=500, maximum=5000]
from: Option<Timestamp>The start of the time range to fetch candlesticks for.
to: Option<Timestamp>The end of the time range to fetch candlesticks for.
smooth: Option<bool>A flag that controls whether the candlestick is “smoothed” or not. A smoothed candlestick uses the previous candle’s close price as its open price, while an unsmoothed candlestick uses the first price from its time range as its open price. [default=False]
include_first: Option<bool>A flag that controls whether the candlestick that is covered by the from time should be included in the results. This flag enables clients to use the timestamp of the last completed candlestick received to poll for future candlesticks but avoid receiving the previous candlestick repeatedly. [default=True]
daily_alignment: Option<i64>The hour of the day (in the specified timezone) to use for granularities that have daily alignments. [default=17, minimum=0, maximum=23]
alignment_timezone: Option<String>The timezone to use for the dailyAlignment parameter. Candlesticks with daily alignment will be aligned to the dailyAlignment hour within the alignmentTimezone. Note that the returned times will still be represented in UTC. [default=America/New_York]
weekly_alignment: Option<WeeklyAlignment>The day of the week used for granularities that have weekly alignment. [default=Friday]
units: Option<Decimal>The number of units used to calculate the volume-weighted average bid and ask prices in the returned candles. [default=1]