Other endpoints
All endpoints are under https://calc.dev.emrgex.com/v1.
POST /v1/carry
Daily carry (effective-interest) for a pool of ad-hoc and/or stored instruments — batch. Each
carries item references an instrument and gives an input and (optionally) a carry_to horizon
(empty = next coupon date).
curl -s https://calc.dev.emrgex.com/v1/carry -H 'content-type: application/json' -d '{
"carries": [
{ "instrument_id": "MH12034", "input_kind": "yield", "input_value": 0.10,
"settlement_date": "2026-06-09", "carry_to": "2026-09-09" }
]
}'
POST /v1/generate_cash_flows
Generate cashflow schedules for a pool of ad-hoc and/or stored instruments — batch.
curl -s https://calc.dev.emrgex.com/v1/generate_cash_flows -H 'content-type: application/json' -d '{
"schedules": [ { "instrument_id": "MH12034" } ]
}'
GET /v1/admin/conventions
Discovery: every rate_type and day_count the engine supports, each with a description, plus the
calculation_code format. See Conventions.
curl https://calc.dev.emrgex.com/v1/admin/conventions
GET /v1/admin/instruments
List stored instruments' characteristics (no cashflow arrays unless with_cashflows=true;
cashflow_count is always included). All filters are optional and AND-combined.
| Query param | Match |
|---|---|
rate_type, day_count, calculation_code, currency, period_name | exact |
issuer, rate_kind, name | substring (case-insensitive) |
q | substring across id / nemo / isin / issuer / name |
amortizing, callable | boolean |
maturity_from, maturity_to | inclusive date range |
coupon_min, coupon_max | range |
sort | id · nemo · issuer · maturity · coupon |
order | asc · desc |
limit (≤ 1000), offset | pagination; limit=0 returns only the total |
with_cashflows | include each instrument's stored schedule |
curl "https://calc.dev.emrgex.com/v1/admin/instruments?callable=true&sort=maturity&limit=10"
PATCH /v1/admin/instruments/{id}
Update a stored instrument's coupon_rate and/or coupon_type in place — e.g. a floating-rate
reset or repactuação. The change is an in-memory override (a catalog reload restores the file
view) and invalidates the cache so the next calculation reflects it.
curl -s -X PATCH https://calc.dev.emrgex.com/v1/admin/instruments/MH12034 \
-H 'content-type: application/json' -d '{ "coupon_rate": 0.12 }'
POST /v1/admin/cache/reload
Reload the instrument repository (atomic swap, non-fatal).
Health probes
| Endpoint | Purpose |
|---|---|
GET /v1/health/livez | liveness (process only) |
GET /v1/health/readyz | readiness (fails while draining) |
GET /v1/health/startupz | startup (warm-load complete) |
curl https://calc.dev.emrgex.com/v1/health/livez # {"status":"alive"}
Errors
Errors use RFC 7807 application/problem+json with
type, title, status, and detail. In a batch, per-item failures appear as that item's
error while the rest succeed.