question

Upvotes
Accepted
1 0 0 1

RD API Intraday Historical Prices

I am using historical_pricing.summaries.Definition RD API function and am trying to get intra-day prices at one minute intervals for a specific date. What should I set for the start and end dates ?

response = historical_pricing.summaries.Definition(

rics_list,

start=start_date_ts,

end=end_date_ts,

fields = fields_list,

interval= historical_pricing.Intervals.ONE_MINUTE).get_data()

resp = response.data.df

python#technologyhistorical
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
Upvotes
Accepted
10.5k 19 6 9

@navtej.riyait Pls try this:

rics_list = ['VOD.L','RR.L']
start_date_ts = '01-05-2024'
end_date_ts = '04-05-2024'
fields_list = ['OPEN_PRC','HIGH_1','LOW_1','TRDPRC_1']
response = historical_pricing.summaries.Definition(rics_list,
                                                   start=start_date_ts,
                                                   end=end_date_ts,
                                                   fields = fields_list,
                                                   interval= historical_pricing.Intervals.ONE_MINUTE).get_data()

response.data.df

1716402074562.png

Is this what you mean? I hope this can help.



1716402074562.png (179.0 KiB)
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.

If I want prices just for one date (daily rates or intraday rates) then what start and end dates do I set. When I set these two date the same I don't get any prices.

Hi @navtej.riyait, in that case, you might want to specify the time of day in the `start` and `end` arguments, e.g.:


rics_list = ['VOD.L','RR.L']
start_date_ts = '2024-05-01T01:00:00' # GMT time
end_date_ts = '2024-05-01T23:00:00' # GMT time
fields_list = ['OPEN_PRC','HIGH_1','LOW_1','TRDPRC_1']
response = rd.content.historical_pricing.summaries.Definition(
    rics_list,
    start=start_date_ts,
    end=end_date_ts,
    fields = fields_list,
    interval= rd.content.historical_pricing.Intervals.ONE_MINUTE).get_data()
 
response.data.df


1716972879684.png

1716972879684.png (38.6 KiB)
What would be the start/end dates for daily prices ?
Show more comments

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.