I’m building a broker-agnostic system. Initially, I integrated with Dhan, and while merging Upstox, I noticed some inconsistencies.
For example:
-
Dhan:
ohlc.close = 1040.95,last_price = 1055.4 -
Upstox:
ohlc.close = 1055.35,last_price = 1055.35
As per Dhan’s documentation, ohlc.close represents the market closing price of the day. However, at 9:39 AM, the market hasn’t closed yet, so Dhan appears to return the previous session’s close as a placeholder.
In contrast, Upstox seems to return the current LTP (Last Traded Price) in the ohlc.close field during market hours.
This discrepancy is causing issues while normalizing data across brokers.