question

Upvotes
Accepted
1 0 0 0

How to Use RDMS CurveValues endpoint in Python R

Appreciate to help with Script for below Endpoint in Python R.

GET' \ 'https://sprod1.rdms.refinitiv.com/api/v1/CurveValues/102436709?MinValueDate=2024-06-01'

#technologyrdmspoint-connect
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
27k 65 17 14

Hello @vinaya.shetty

I am not sure if you need the Python or R, and I am not the RDMS expert, but based on the Point Connect Data Retrieval via RDMS API article, the Python Code should be something like:

import requests
headers = {
    'accept': 'text/plain',
    'Authorization': '## YOUR API KEY ##'
}
date = '2024-06-01'
try:
    url = f'https://sprod1.rdms.refinitiv.com/api/v1/102436709?MinValueDate={date}'
    response = requests.get(base_url, headers=headers)
except requests.exceptions.RequestException as exp:
    print(f'Caught exception: {exp}')
if response.status_code == 200:  # HTTP Status 'OK'
    print('Receive Data Success')
    print(response.json())
else:
    print(f'Data request failure: {response.status_code} {response.reason}')
    print(f'Text: {response.text}')

The code is quite straightforward for the Python Requests library.

It seems you lack the basic Python knowledge; I strongly suggest you take a step back to learn Python and the Requests library basic usage from the following resources:

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.