Getting started
Base URL & conventions
| Base URL | https://calc.dev.emrgex.com |
| Prefix | every endpoint is under /v1 |
| Rates & yields | decimals — 0.06 means 6% |
| Prices | per 100 of face value |
| Dates | ISO YYYY-MM-DD |
| Content type | application/json |
Your first request
Price a stored instrument — reference it by instrument_id and give a yield:
curl -s https://calc.dev.emrgex.com/v1/quotes \
-H 'content-type: application/json' \
-d '{
"quotes": [
{ "instrument_id": "MH12034", "input_kind": "yield", "input_value": 0.10,
"settlement_date": "2026-06-09", "options": { "round": 6 } }
]
}'
The response is a batch envelope — one entry per quote, each with its own status:
{
"data": [
{
"index": 0,
"id": "MH12034",
"status": "ok",
"data": {
"instrument_id": "MH12034",
"convention": "NOMINAL · ACT/ACT.DRMH",
"calculation_code": "ACT/ACT.DRMH|NOMINAL",
"metrics": {
"yield": 0.1,
"dirty_price": 112.547645,
"clean_price": 107.853124,
"accrued_interest": 4.694521,
"modified_duration": 5.12,
"convexity": 33.7,
"dv01": 0.0576
}
}
}
]
}
Price by price instead of yield
Set input_kind to clean_price or dirty_price and emrgex solves the yield for you:
{ "instrument_id": "MH12034", "input_kind": "clean_price", "input_value": 107.85,
"settlement_date": "2026-06-09", "options": { "round": 6 } }
Define your own bond (ad-hoc)
Put the instrument inline in instruments, then reference its id from quotes:
curl -s https://calc.dev.emrgex.com/v1/quotes \
-H 'content-type: application/json' \
-d '{
"instruments": [
{ "id": "B1", "rate_type": "NOMINAL", "day_count": "ACT/ACT.ICMA",
"coupon_type": "FIXED", "frequency": 2,
"start": "2020-01-15", "maturity": "2030-01-15",
"coupon_rate": 0.06, "face_value": 100 }
],
"quotes": [
{ "instrument_id": "B1", "input_kind": "clean_price", "input_value": 95.5,
"settlement_date": "2024-06-18", "options": { "round": 6 } }
]
}'
Add a trade size
Supply an amount to get money figures (settlement amounts) alongside the per-100 prices:
{ "instrument_id": "MH12034", "input_kind": "yield", "input_value": 0.10,
"amount_kind": "nominal", "amount_value": 1000000,
"settlement_date": "2026-06-09", "options": { "round": 6 } }
Health check
curl https://calc.dev.emrgex.com/v1/health/livez
# {"status":"alive"}
:::tip Performance
To price in bulk, send many quotes in one /v1/quotes request (a batch). Leave
with_cashflows off unless you need each bond's schedule — it makes responses much smaller
and faster.
:::
:::note Authentication The development service is currently open (no API key). Production deployments can enable HMAC request signing. :::