API
Welcome to the Babylon API documentation.
The API provides programmatic access to five core areas:
- Segments — records of transactions in publicly traded securities, including equities, bonds, and unit trusts.
- Ladders — records of fixed-rate term deposits, often structured into cash ladders for managing maturities.
- Listings — reference information on publicly traded securities.
- Compute — calculations applied to segment ledgers and ladders, such as realised capital gains and projected cashflows.
- Extract — extraction of segments and ladders from sources such as CSV files, Excel files, PDF files and natural language entries.
Many endpoints return results in a tabular format: either columnar JSON (arrays of values aligned by index) or CSV, making the API a natural fit for data pipelines, reporting, and analytics.
Global rules
- All requests require Authorization: Bearer <api_key> (omitted in examples).
- Requests are JSON unless noted.
- Responses are JSON by default; use explicit parameter format e.g. ?format=csv or the header Accept: text/csv for CSV.
- Query parameter columns controls subset and order of returned fields for both JSON and CSV.
- For create/replace, the request body is wrapped as { "data": <columnar JSON | CSV string> }.
The two key concepts of ladder and segment ledger get their own detailed specification here.
Note on names: JSON requests use camelCase field names (e.g. ladderId, couponRate).
CSV uploads use PascalCase (UpperCamelCase) headers (e.g. LadderId, CouponRate), as defined in the CSV specification.
The two map one-to-one.
The API is continually evolving, and this documentation will grow as new endpoints and features are added.
Endpoints
- /compute/capital-gains — Compute realised capital gains over a Babylon segment ledger.
- /compute/cashflows — Computes a schedule of bond, deposit and dividend cashflows over a segment and/or ladder.
- /compute/position — Compute current positions over a Babylon segment.
- /extract/segments/from-quick-entry — Extracts a segment entry from a natural language sentence.
- /extract/segments/from-file — Extracts one or segment entries from a file of type CSV, Excel or PDF.
- /ladders — Create, read, replace, and delete Babylon ladders.
- /listings — The listings of securities on supported exchanges.
- /segments — Create, read, replace, and delete Babylon segment ledgers.