question

Upvotes
1 0 0 0

How to pull whole list of active bonds for an issuer in python

In python, I need to download the full list of bonds that are currently active on the italian BTP curve. For each bond, I would like this information:


-Cusip

-ISIN

-Dirty Price

-Coupon

-Last coupon date

-Next coupon date

-Issue date

-Maturity

-Description

-yield to maturity


For something else, I'm currently using the following code setup, from one of the examples online, which works:


import requests
import json
import rdpToken
RDP_version = "/v1"
base_URL = "https://api.refinitiv.com"
category_URL = "/data/historical-pricing"
endpoint_URL = "/views/interday-summaries"
universe_parameter_URL = "/"

def rt_downloader(RIC, RESOURCE_ENDPOINT, accessToken, start_date, end_date, fields):

requestData = {
"interval": "P1D",
"start": "2023-10-01",
"end": "2024-03-01",
"adjustments": "exchangeCorrection,manualCorrection,CCH,CRE,RPO,RTS",
"maxpoints": 20,
"fields": "B_YLD_1"
}

dResp = requests.get(RESOURCE_ENDPOINT, headers={"Authorization": "Bearer " + accessToken}, params=requestData)


How can the above be done please for the whole list of bonds for that issuer?

Thank you

#contentdatabonds
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.

0 Answers

· Write an Answer

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.