기타 엔드포인트
모든 엔드포인트는 https://calc.dev.emrgex.com/v1 하위에 있습니다.
POST /v1/carry
애드혹 및/또는 저장된 상품 풀에 대한 일별 캐리(유효이자 기준)를 일괄(batch) 계산합니다. 각
carries 항목은 하나의 상품을 참조하며, 입력값과 (선택적으로) carry_to 호라이즌을 지정합니다
(비워 두면 다음 쿠폰 지급일).
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
애드혹 및/또는 저장된 상품 풀에 대한 현금흐름 스케줄을 일괄(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
디스커버리: 엔진이 지원하는 모든 rate_type과 day_count을 각각의 설명과 함께 반환하며,
calculation_code 형식도 포함합니다. 컨벤션을 참고하세요.
curl https://calc.dev.emrgex.com/v1/admin/conventions
GET /v1/admin/instruments
저장된 상품의 특성을 조회합니다(with_cashflows=true가 아닌 한 현금흐름 배열은 제외되며,
cashflow_count는 항상 포함됩니다). 모든 필터는 선택 사항이며 AND 조건으로 결합됩니다.
| Query param | Match |
|---|---|
rate_type, day_count, calculation_code, currency, period_name | 정확히 일치 |
issuer, rate_kind, name | 부분 문자열(대소문자 구분 없음) |
q | id / nemo / isin / issuer / name 전반의 부분 문자열 |
amortizing, callable | 불리언 |
maturity_from, maturity_to | 날짜 범위(양 끝 포함) |
coupon_min, coupon_max | 범위 |
sort | id · nemo · issuer · maturity · coupon |
order | asc · desc |
limit (≤ 1000), offset | 페이지네이션; limit=0은 총 개수만 반환 |
with_cashflows | 각 상품의 저장된 스케줄 포함 |
curl "https://calc.dev.emrgex.com/v1/admin/instruments?callable=true&sort=maturity&limit=10"
PATCH /v1/admin/instruments/{id}
저장된 상품의 coupon_rate 및/또는 coupon_type을 제자리에서 업데이트합니다 — 예: 변동금리
리셋이나 repactuação. 이 변경은 메모리 내 오버라이드이며(카탈로그 리로드 시 파일
뷰가 복원됨), 캐시를 무효화하여 다음 계산에 반영되도록 합니다.
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
상품 리포지토리를 리로드합니다(원자적 교체, 비치명적).
헬스 프로브
| Endpoint | Purpose |
|---|---|
GET /v1/health/livez | 라이브니스(프로세스만 확인) |
GET /v1/health/readyz | 레디니스(드레이닝 중에는 실패) |
GET /v1/health/startupz | 스타트업(웜 로드 완료) |
curl https://calc.dev.emrgex.com/v1/health/livez # {"status":"alive"}
오류
오류는 RFC 7807 application/problem+json을 사용하며
type, title, status, detail 필드를 포함합니다. 일괄 처리에서 개별 항목의 실패는 해당 항목의
error로 나타나고 나머지 항목은 정상적으로 처리됩니다.