Batch Request for Historical Pricing | RDP

Hi Team,

Since the client encountered problems using the RDP Python library for their solution, particularly with accessing historical prices, they have opted to use the Python requests library (with examples provided in the API Playground) to retrieve data. Here is a sample request for historical prices:

url = f"https://api.refinitiv.com/data/historical-pricing/v1/views/interday-summaries/{ticker}"

response = requests.get(
    url,
    headers=headers,
    params={
        'start': start_date,
        'end': end_date,
        'adjustments': 'exchangeCorrection,RPO',
        'qos': 'delayed'
    }
)


I am wondering if it is possible to retrieve batch data using the requests library for Historical Pricing. I came across this article: https://community.developers.refinitiv.com/questions/90817/requesting-large-data-amounts-in-batches-via-rdp-a.html, but it appears to use the RDP Python library.

Additionally, is there a way to parallelize the requests for historical pricing data retrieval?

Thanks!

Best Answer

  • Jirapongse
    Answer ✓

    @mohamed.noohaboo

    Thank you for reaching out to us.

    These questions look similar to the questions on this dicussion. Are you posting questions on behalf of that client?

    The client can use the /views/interday-summaries with the HTTP POST method and specify multiple items in the request's body. Please check the API docs of the historical pricing for more inforamation.

    1720687426639.png

    Yes, in Python, the client can send concurrent HTTP requests by using ThreadPoolExecutor. However, the number of requests should not exceed the limit mentioned on the Reference page of the historical pricing endpoint.

Answers