Querying Historical Data
Historical data applies only if your organization has access to historical data. You also need access to the prices you are querying:
- Spot history (symbols such as
bx-sgsin-mgo-spot-stable) requires access to spot prices. - Fixed forward history (symbols such as
bx-sgsin-mgo-ffp-stable) requires access to fixed forward prices.
Without the required access, queries for prices or historicalPrices return a Forbidden error. Contact team@tideform.io to request access.
Historical data is retrieved through a priceSymbol, which represents a single port + fuel grade + price type combination (for example, bx-sgsin-mgo-spot-stable is Singapore MGO spot prices):
priceSymbol(symbolId: ID!): PriceSymbol
If you don't know the symbol ID, get it from a fuel port profile: fuelPortProfile(portId: "sgsin", fuelGradeId: "mgo") { spot { id } fixedForward { id } }. Each field needs access to its price type: without fixed forward access, fixedForward returns null with a Forbidden error, so request only spot in that case.
A price symbol offers two kinds of history:
Price history (prices) | Daily candles (historicalPrices) | |
|---|---|---|
| What you get | Every price as it was published | One summary per day (24 per day for fixed forward, one per forward month) |
| Fields | publishedDate, price, effectiveDate, relativeDate | Open, high, low, close, mean and median price |
| Use it for | Full detail, or how the forward curve changed over time | Charts, one value per day, long date ranges |
Price History
The prices field returns every published price for the symbol:
prices(
first: Int
last: Int
after: String
before: String
filter: PriceFilter
): SymbolPriceConnection!
filter accepts startDateTime / endDateTime, which bound the publish date. A date without a time means midnight, so use 2026-10-31T23:59:59 rather than 2026-10-31 to include the whole of 31 October. Both bounds are inclusive. All times are UTC: send values without an offset, because any offset is ignored (see Dates and Times).
- Spot prices return one price per publish.
- Fixed forward prices return 24 prices per publish, one per forward month. Each carries its
effectiveDate(the month the price applies to) andrelativeDate(1 to 24 months after the publish month), so a page offirst: 48covers two publishes.
Prices are returned newest first. For fixed forward prices, the 24 months of each publish come from month 24 down to month 1.
For a constant-tenor forward history, add relativeDate to the filter. Only that forward month is returned, one price per publish, so first: 48 covers 48 publishes. For example, the 3-month price:
prices(first: 48, filter: { relativeDate: { count: 3, unit: Month } }) {
edges {
node {
publishedDate
effectiveDate
price
}
}
}
relativeDate is ignored for spot symbols.
Daily Candles
The historicalPrices field returns a paginated connection of price points summarized per time window:
historicalPrices(
granularity: HistoricalPriceGranularity!
first: Int
last: Int
after: String
before: String
filter: HistoricalPriceFilter
): HistoricalPriceConnection!
granularity currently supports DAY. filter accepts startDateTime / endDateTime to bound the range.
Candles are returned oldest first, starting from the first day with data. For spot symbols, last: 30 returns the 30 most recent days. For fixed forward symbols, set startDateTime instead, and sort each day's candles by relativeDate.count.
Candlestick vs. Summary Statistics
Each HistoricalPrice data point is summarized over its time window (a day, for DAY granularity) and exposes two different ways of reading that window:
- Candlestick (OHLC) -
openPrice,highPrice,lowPrice, andclosePrice. These describe the first, highest, lowest, and last price observed in the window, and are what you'd plug into a candlestick chart to visualize price movement and volatility within the day. - Summary Statistics -
meanPriceandmedianPrice. These describe the average and median price across the window, which is usually what you want for a simple line chart, a single "price for that day" value, or statistical analysis that shouldn't be skewed by a single outlier tick.
Use OHLC fields when you need to show intraday movement; use meanPrice / medianPrice when you just need one representative value per day.
Each data point also exposes finalized (whether the time window is closed, e.g. not today).
Spot and Fixed Forward Candles
Each edge in historicalPrices is one day, and its node is a list of candles for that day:
- Spot symbols have one candle per day.
- Fixed forward symbols have 24 candles per day, one per forward month. Each candle's
effectiveDate(the delivery month, given as the first day of that month) andrelativeDate(1 to 24 months ahead) tell you which forward month it belongs to.
Candles with different relativeDate values are different delivery months, so do not combine them into one series. Group them by relativeDate for a constant-tenor series (for example, always 3 months ahead), or by effectiveDate to follow one delivery month over time:
historicalPrices(
granularity: DAY
first: 744
filter: { startDateTime: "2026-10-01", endDateTime: "2026-10-31" }
) {
edges {
node {
timeWindowStart
effectiveDate
relativeDate {
count
unit
}
closePrice
}
}
}
For fixed forward symbols, first counts individual candles rather than days, so request 24 per day (first: 744 covers the 31 days of October) and choose the range with the date filter.
Pagination
Both fields are cursor-paginated: pass the previous page's endCursor in after to fetch the next page. For fixed forward daily candles, choose the range with the date filter instead of after, before or last: those count individual candles, so a page can end partway through a day.
See the samples page for ready-to-run queries.