The purpose of this document is to provide a broad overview of Empirasign's technical capabilities and links to related in-house and external resources.
The Empirasign Market Data API (commonly referred to as the API) is a REST-based interface to our BWIC (price talk and trade color) and runs-related market data. Some publicly available third-party data such as N-PORT filings are also retrievable via API call. API calls return data in either CSV or JSON formats.
Demo Excel Spreadsheet
The latest version our API Demo Spreadsheet can be found on the main API docs page: empirasign.com/api-mbs/. Click on the Excel icon to retrieve this workbook. All the VBA code you need is included in the spreadsheet, and linked to via various macro calling buttons. In general, each API endpoint's use is illustrated on its own worksheet. There are no add-ins to download or install. VBA-based API calls retrieve data in CSV format, and then split the results (text to columns) so the results fit in the spreadsheet.
Most banks and many funds use a proxy server to filter all outgoing HTTP requests. If your shop uses a proxy server, no API calls will work until the proxy server is located. The fastest way to find your proxy server is via the proxy_finder tab on the demo spreadsheet. A variety of proxy finding methods are discussed at the following link: www.empirasign.com/proxy-help/
Using Python for API Access
We have made two Python modules available on GitHub illustrating how to query the Empirasign Market Data API. The links are below:
Functional Query Methods Example Code
Object-Oriented Query Methods Example Code
Use Case Examples
Sending BWIC Data Directly to INTEXCalc
Empirasign BWIC Market Data can be pumped directly to INTEXCalc. The example script below,
bwics_to_intex.py queries our API, saves the BWIC data for selected sectors(s) into a directory INTEXcalc is watching. When the INTEXcalc user clicks the Refresh button in BWIC viewer area, this data is loaded and ready to work with.
Sending Market Data Directly to INTEXCalc
intex_mktd.py script leverages the
/api/bonds/ endpoints to emit INTEX compatible data files to the
market_data/market_color directory for client-specified sector(s).
EOD Data Capture
/all-bonds/ endpoint, API users can ensure they never miss a market observation. This use-case is illustrated on the following page: www.empirasign.com/eod-poll/. It includes a use-case summary, pseudo-code, and a GitHub link to Python code.
We have put together an example application that uses various API endpoints to keep track of all BWIC activity and related market data (trade color, price talk and runs). The extracted data is then stored in a local database using SQLite. This write-up is a great jumping off point for creating your own data warehouse. The pseudo-code and GitHub link to Python code can be found at the following page: www.empirasign.com/bwic-watcher/
Defintions and Other Resources
Abbreviations used for dealer names can be found here: www.empirasign.com/dealers/.
Commonly used curve definitions can be found here: www.empirasign.com/curve-definitions/.
TBA CUSIP Calculator: www.empirasign.com/tba-cusip/
BMA Settlment Dates: www.sifma.org/resources/general/mbs-notification-and-settlement-dates/
Holiday Calendars (US, UK, and Japan): www.sifma.org/resources/general/holiday-schedule/
Parser as a Service
This is also commonly referred to as the Parser API. By utilizing this service, all those offer sheets and benchmark runs perpetually overwhelming your company's inboxes can now be professionally transformed into structured data that's ready for uploading into your own database via simple API call. The endpoint(s) accept messages in Outlook/msg or RFC format. Docs for these and related service endpoints can be found here: www.empirasign.com/api-docs/
- Parse a single Run email saved on disk (RFC or msg format):
- Parse a BWIC email saved on disk (RFC or msg format):
- Parse all runs messages in an IMAP INBOX:
- Parse all runs messages in an Outlook INBOX:
Market Data is most commonly contributed via an email forwarding process leveraging Outlook Forwarding Rules or the Bloomberg MRUL function. Docs for both methods can be found at www.empirasign.com/mrul-tutorial/ and www.empirasign.com/outlook-tutorial/.
API Call (Stop Forwarding and Start POSTing)
A more sophisticated data contribution method is to POST messages directly to our
/submit-email/ endpoint. Docs for these and related service endpoints can be found here: www.empirasign.com/api-docs/. Below are example scripts for doing this under IMAP and Outlook.
IMAP Data Contribution
Outlook Data Contribution
We currently only publish code examples in VBA and Python. We have in-house expertise in
R. Further assistance with API integration in these languages can be provided.