question

Upvotes
Accepted
21 0 2 8

ohlc values for an asset minute wise

Hi ,


I need to know the ohlc values of one US asset ( e.g. CLF24 ) for 08th december 2023 at IST time 15:30 i.e. need the ohlc values for this specific minute...i have got lots of US assets for which i need these values ..how to do that

#technologyapi#content
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
6.2k 18 2 8

Hi @peeush ,


You can use get_history function from RD libraries and provide value for intevnal parameter, eg tick to get all quotes within the minute or minute to get minute bars:

import refinitiv.data as rd
rd.open_session()


example with tick (please note tick level goes only 3 month back in time):

rd.get_history('CLF24', fields = ['HIGH_1', 'LOW_1', 'OPEN_PRC', 'TRDPRC_1'], start = '2023-12-08 10:00:00', end = '2023-12-08 10:01:00', interval = 'tick')

screenshot-2023-12-22-at-144044.png

example with minute:

rd.get_history('CLF24', fields = ['HIGH_1', 'LOW_1', 'OPEN_PRC', 'TRDPRC_1'], start = '2023-12-08 09:59:00', end = '2023-12-08 10:02:00', interval = 'minute')

screenshot-2023-12-22-at-144111.png


Please note that the timezone is returned in GMT and you need to convert these for IST separately.


Best regards,

Haykaz



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.