How to get list of active government bonds for specific country?

I tried to get a list of government bonds for a given country using Eikon and Python.
For example, in the case of Denmark, Eikon returns the following list of bonds.
But I get a longer list when I use Python code.
Bonds with IDs 0,4,5,6,9 from the Python list do not appear in the previous list...
Why is this difference between lists?
Best Answer
-
Hi @student0111 ,
Thank you for your question. Are you using the same filtering criteria in the Eikon app as the ones used in API call? If not the same then the results can be different.
Additionally, I would advise using the GOVSRCH app from Workspace, where you can specify your filters and then export python query for API search. That would guarantee the same results:
Hope this helps.
Best regards,
Haykaz
0
Answers
-
To get the same list as Eikon, you need to use this query.
df = rd.discovery.search(
view=rd.discovery.Views.FIXED_INCOME_QUOTES,
select="BusinessEntity, DocumentTitle, RIC, IssuerCountryName,AssetStatus,PriceSource",
filter="IssuerCountryName eq 'Denmark' and AssetStatus eq 'RPN' and PriceSource xeq 'REFINITIV'",
top=10000
)
dfThe output is:
0 -
0
-
Hi Jirapongse,
thank you for your help as well.
The first difference between your query and mine is that I used Views.FIXED_INCOME_INSTRUMENTS while you used Views.FIXED_INCOME_QUOTES, so please let me know if there is any documentation of various views categories because I could not find any of it.
Also, with get_history function it is possible to get historical data for following bond properties:
['YLDTOMAT', 'HIGH_1', 'OPEN_PRC', 'LOW_1', 'HIGH_YLD', 'LOW_YLD',
'MID_PRICE', 'A_YLD_1', 'ACCR_INT', 'ISMA_A_YLD', 'MID_YLD_1',
'CONVEXITY', 'MOD_DURTN', 'ASK_HIGH_1', 'ASK_LOW_1', 'OPEN_ASK',
'OPEN_YLD', 'ISMA_B_YLD', 'AST_SWPSPD', 'BPV', 'BMK_SPD', 'B_YLD_1',
'SWAP_SPRDB', 'BID', 'ASK', 'OAS_BID', 'ZSPREAD', 'INT_BASIS',
'INT_CDS', 'TRTN_PRICE', 'OIS_SPREAD', 'TED_SPREAD', 'INT_GV_SPD',
'REDEM_DATE', 'ASP6M', 'ASP3M', 'ASP1M', 'DIRTY_PRC', 'CLEAN_PRC']
Do you know maybe if there is any documentation for those properties?
Additionally, I tried to implement your filters within GOVSRCH but I could not find RPN value for Asset status. I'm actually not shure what RPN means in sense of asset status?
Sorry if my questions are basic, but I'm quite new in this area.
Once again, thank you for your help.
Best regards
0 -
You can run the help(search.Views) Python command to get the list of available views. Then, you can call search.metadata.Definition method to get the list of available fields in each view. For example:
response = search.metadata.Definition(
view = search.Views.GOV_CORP_INSTRUMENTS
).get_data()
response.data.dfI checked the daily historical fields of DK10YT=RR and the historical-pricing endpoint can provide the following fields.
"headers": [
{
"name": "DATE",
"type": "string"
},
{
"name": "B_YLD_1",
"type": "number",
"decimalChar": "."
},
{
"name": "ASP6M",
"type": "number",
"decimalChar": "."
},
{
"name": "HIGH_1",
"type": "number",
"decimalChar": "."
},
{
"name": "OPEN_PRC",
"type": "number",
"decimalChar": "."
},
{
"name": "LOW_1",
"type": "number",
"decimalChar": "."
},
{
"name": "HIGH_YLD",
"type": "number",
"decimalChar": "."
},
{
"name": "LOW_YLD",
"type": "number",
"decimalChar": "."
},
{
"name": "A_YLD_1",
"type": "number",
"decimalChar": "."
},
{
"name": "BID",
"type": "number",
"decimalChar": "."
},
{
"name": "MID_PRICE",
"type": "number",
"decimalChar": "."
},
{
"name": "MID_YLD_1",
"type": "number",
"decimalChar": "."
},
{
"name": "CONVEXITY",
"type": "number",
"decimalChar": "."
},
{
"name": "MOD_DURTN",
"type": "number",
"decimalChar": "."
},
{
"name": "ASK_HIGH_1",
"type": "number",
"decimalChar": "."
},
{
"name": "ASK_LOW_1",
"type": "number",
"decimalChar": "."
},
{
"name": "OPEN_ASK",
"type": "number",
"decimalChar": "."
},
{
"name": "OPEN_YLD",
"type": "number",
"decimalChar": "."
},
{
"name": "AST_SWPSPD",
"type": "number",
"decimalChar": "."
},
{
"name": "BPV",
"type": "number",
"decimalChar": "."
},
{
"name": "BMK_SPD",
"type": "number",
"decimalChar": "."
},
{
"name": "ISMA_A_YLD",
"type": "number",
"decimalChar": "."
},
{
"name": "ISMA_B_YLD",
"type": "number",
"decimalChar": "."
},
{
"name": "SWAP_SPRDB",
"type": "number",
"decimalChar": "."
},
{
"name": "ASK",
"type": "number",
"decimalChar": "."
},
{
"name": "ASP3M",
"type": "number",
"decimalChar": "."
},
{
"name": "OAS_BID",
"type": "number",
"decimalChar": "."
},
{
"name": "ZSPREAD",
"type": "number",
"decimalChar": "."
},
{
"name": "INT_BASIS",
"type": "number",
"decimalChar": "."
},
{
"name": "INT_CDS",
"type": "number",
"decimalChar": "."
},
{
"name": "TRTN_PRICE",
"type": "number",
"decimalChar": "."
},
{
"name": "OIS_SPREAD",
"type": "number",
"decimalChar": "."
},
{
"name": "TED_SPREAD",
"type": "number",
"decimalChar": "."
},
{
"name": "ASP1M",
"type": "number",
"decimalChar": "."
}
]You can find more information regarding the /discovery/search/v1/ and /data/historical-pricing/v1/ endpoints from the Reference page in the API Document.
Regarding RPN, it should mean Re-Opening. It can use AssetStateName or AssetState instead.
{
"RIC": "DK10YT=RR",
"AssetStateName": "Active",
"AssetStatus": "RPN",
"AssetState": "AC"
}0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 651 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛