首页 文章

彭博API - 获取政府债券清单

提问于
浏览
2

当在Bloomberg终端上点击KENGB <Govt> <GO>时,我得到 list of all 肯尼亚 government bonds .

How do I get this list through Bloomberg API? Or list of their tickers?

(我定期下载各种证券的PX_LAST价格和历史价格,所以我非常熟悉服务“// blp / refdata”并请求“ReferenceDataRequest”......但无法弄清楚如何检索证券清单(及其代码)在程序上)

2 回答

  • 0

    试着看看这个:

    http://www.openbloomberg.com/content/uploads/sites/2/2013/04/blpapi-developers-guide.pdf

    在第77页,它解释了您必须拨打哪些服务才能拥有政府债券 .

    这是代码:

    Service govtService = session.getService("//blp/instruments");
     Request request = govtService.createRequest("govtListRequest");
     request.asElement().setElement("partialMatch", true);
     request.asElement().setElement("query", "T*");// this plus the previous line permits to retrieve all the thicker that begins with T
     request.asElement().setElement("ticker", "LANG_OVERRIDE_NONE");
     request.asElement().setElement("maxResults", 10);
     sendRequest(request, session);
    
  • 2

    我知道通过API v3获取证券列表的唯一方法是使用EQS API,您可以在其中设置EQS屏幕,然后使用API获取匹配的证券 . 不确定这是否可以让您获得与终端上的安全搜索相同的结果 .

相关问题