Understanding OHLC Data: What Each Price Field Tells You
A quotation API can deliver a compact record containing several price values. To display that record correctly, your application needs to understand what each field represents. OHLC stands for Open, High, Low and Close. Together, these four values describe price behaviour within a defined interval.
A quotation API can deliver a compact record containing several price values. To display that record correctly, your application needs to understand what each field represents.
OHLC stands for Open, High, Low and Close. Together, these four values describe price behaviour within a defined interval. They provide more context than a single price, but they do not describe every movement that occurred during that interval.
The four OHLC values
Open is the price at the beginning of the interval.
High is the highest price recorded within that interval.
Low is the lowest price recorded within that interval.
Close is the price at the end of the interval. For an interval that is still developing, the close value may represent the latest available price, depending on the API specification.
For example, an interval might contain these values:
{ "open": 1.09620, "high": 1.09685, "low": 1.09590, "close": 1.09660 }These illustrative values show that the interval ended above its opening price. They also show that the price moved both higher and lower than the opening value.
However, they do not reveal the exact sequence of those movements. The high could have occurred before or after the low.
How OHLC becomes a candlestick
Charting libraries commonly use OHLC values to draw candlesticks.
The candle’s body represents the distance between open and close. Its upper and lower wicks extend to the high and low.
A close above the open usually produces an upward candle, while a close below the open produces a downward candle. Colours depend on the chart’s settings.
The data source supplies the values. Your charting library controls their visual presentation.
Timestamps need careful interpretation
A price record is only useful when your application places it at the correct point in time.
Before connecting a feed, confirm:
Whether timestamps use seconds or milliseconds.
Whether the timestamp identifies the beginning, end or update time of an interval.
How interval boundaries are defined.
Whether incoming records create a new interval or update an existing one.
Do not infer these rules from the number of digits or from an example alone. Check the API documentation and test the behaviour.
Confusing seconds with milliseconds can place records on the wrong date. Treating every update as a new interval can create duplicate candles.
Volume requires its own definition
A field named volume does not have one universal meaning across data sources. It may describe traded quantity, the number of updates or another source-specific measure.
Its name alone is not enough to establish its unit or interpretation. Confirm the definition before displaying it or using it in calculations.
In particular, a volume field in generated quotation data must not be presented as actual exchange trading volume.
Generated OHLC is not a market record
QUOTC quotations are generated algorithmically. They are not official exchange prices and do not reflect actual market conditions.
An OHLC structure describes how the supplied data is organised. It does not establish that real transactions occurred at those prices.
Your interface should preserve this distinction. A familiar candlestick chart must not create the impression that generated data represents actual exchange activity.
Validate before displaying
Useful integration checks include confirming that the high is not below the low and that the open and close fall within the reported range.
Also check timestamp order, duplicate records and missing intervals. An unexpected record should trigger controlled handling rather than silently producing a misleading chart.
With clear field definitions and consistent validation, OHLC data becomes easier to display, store and troubleshoot. Start with the documentation, confirm the interval rules and keep the nature of the data visible to your users.
