GetPriceBarsBeforeDate

Description

Get historic price bars for the specified market in OHLC (open, high, low, close) format, suitable for plotting in candlestick charts. Returns price bars in ascending order from before the user given toTimestampUTC.

When there are no prices for a particular time period, no price bar is returned. Thus, it can appear that the array of price bars has "gaps", i.e. the gap between the date & time of each price bar might not be equal to interval x span.

 

Sample Urls:

 

Service Info

target market
uriTemplate /{MarketId}/barhistorybefore
transport GET
envelope URL
contentType application/json

 

Parameters

Name Type Description
MarketId string

The ID of the market.

interval string

The pricebar interval.

span integer

The number of each interval per pricebar.

toTimestampUTC long integer The end date and time in UNIX time format.
maxResults

integer

nullable true
maxValue 4000
The maximum number of pricebars to return. Default value is 1000.
priceType string The price type being requested. If left blank then the default setting returns the MID price. Possible values are: ASK, MID, BID.

 

Return Value

GetPriceBarResponseDTO

 

Last updated: 07 November 2025

 

 

 

Copyright © 2026 StoneX