Candles
This API disseminates aggregated data on different time resolutions. It supports retrieving data for a given period or as a continuous stream. Updates are disseminated every 3 seconds (only in case of a change) or when the candle is closed.
Response description
For real time updates qualifier:
to
is ignoredWhen
from
was not sent: only new streaming messages will be sentWhen only
from
was sent - candles from that point will be returned, stream will remain open for the new streamed messages to come
For historical data qualifier: from & to must be sent
from
&to
must be sent: candles from that period will be returned, stream will be closed after last message.In case there are no candles in range, system will return 1 candle which is the last candle prior to range (just before the “from”)
This API is non real-time but close to real-time.
below fields of the response are adjusted for Corporate Actions:
open
close
high
low
volume
vwa
Request
symbol
String
Symbol to retrieve the candles
from
optional
Int or Unix timestamp
Candles start from
format: if timespan=DAY
: yyyyMMdd else epoch time in seconds
to
optional
Int or Unix timestamp
Candles to
Same format as from
, refer description of from
for more details.
timespan
eNum
One of below values:
MINUTE - flat min (from 00 seconds to 59.999 seconds)
HOUR- based on minute candle and equal to 60 min
DAY - Based on trade date (starts on calendar time zone midnight)
multiplier optional
Int
Timespan multiplier, if not sent: 1 is default value. Allowed intervals:
1 MINUTE
5 MINUTE
15 MINUTE
1 HOUR
4 HOUR
1 DAY
caAdjustments
Boolean
Optional
If not exist, caAdjustments=false
Whether historical prices should be adjusted for corporate actions. Refer Admin API to create adjustment factors.
Applicable only to history API (exchange.marketdata.history/candles
)
Available values:
true
- apply caAdjustments on datafalse
- do not apply caAdjustments on data
Response
symbol
String
Instrument symbol
open
Decimal
First order book execution price of the interval
close
Decimal
Last order book execution price of the interval
high
Decimal
Highest order book execution price of the interval
low
Decimal
Lowest order book execution price of the interval
volume
Decimal
Total volume of order book execution price of the interval
vwa
Decimal
Volume weighted average price of order book executions of the interval
timeStamp
Int or Unix timestamp
Starting timestamp of the interval
format: if timespan=DAY
: yyyyMMdd else epoch time in sec
Error Codes
1
System is unavailable
2
Missing or invalid parameter: [FieldName]
3
Wrong symbol [symbol]
Samples
Last updated