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"
}1
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛