Bond Pricer¶
Prices fixed income securities using mark-to-market (M2M) spreads provided by the user. The bond pricer applies the supplied credit spreads to discount cashflows and compute clean/dirty prices, yields, and sensitivities.
HTTP Request
POST /calculations/bond_pricer
HTTP Parameters
| Parameter | Description |
|---|---|
portfolio_id string |
optional The ID of an existing portfolio. When provided, the calculation uses the portfolio's securities, date, base currency, and NLV. The securities parameter is no longer required. |
securities array |
REQUIRED * An array of objects describing the fixed income securities in the portfolio. Each object includes a unique id, symbol, quantity, and label. For more details click here. * Not required if portfolio_id is provided. |
date string date |
optional, default is null (today) Pricing date in the format: YYYYMMDD. |
base_currency string |
optional, default is USD 3-letter ISO 4217 currency code. |
nlv float |
optional, default is null (calculated) Net liquidating value (NAV) of the portfolio. |
m2m_spreads object |
REQUIRED An object mapping security identifiers to their mark-to-market credit spreads (in basis points or decimal, depending on convention). Used to discount cashflows for pricing. |
To price bonds using M2M spreads, run the following:
curl https://api.everysk.com/v2/calculations/bond_pricer \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-d '{
"id": "port_123",
"nlv": 1234,
"date": "2025-04-07",
"securities": [
{
"instrument_class": "BrazilianFixedIncome",
"quantity": 1.0,
"id": "sec_123",
"symbol": "BRRF:KLBNA2 10405.8775",
"label": "KLBNA2"
}
],
"base_currency": "BRL",
"m2m_spreads": {
"BRRF:KLBNA2 10405.8775": 0.05
}
}' \
-X POST
The above call returns the following JSON object: