본문으로 건너뛰기

시작하기

기본 URL 및 규약

기본 URLhttps://calc.dev.emrgex.com
접두사모든 엔드포인트는 /v1 아래에 있습니다
금리 및 수익률소수 표기 — 0.06은 6%를 의미합니다
가격액면가 100 기준
날짜ISO YYYY-MM-DD
콘텐츠 유형application/json

첫 번째 요청

등록된(stored) 상품의 가격을 산정합니다 — instrument_id로 참조하고 수익률을 입력합니다:

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 } }
]
}'

응답은 배치 엔벨로프(batch envelope) 입니다 — 각 호가마다 하나의 항목이 있으며, 항목마다 자체 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
}
}
}
]
}

수익률 대신 가격으로 산정하기

input_kindclean_price 또는 dirty_price로 설정하면 emrgex가 수익률을 역산해 줍니다:

{ "instrument_id": "MH12034", "input_kind": "clean_price", "input_value": 107.85,
"settlement_date": "2026-06-09", "options": { "round": 6 } }

직접 채권 정의하기 (ad-hoc)

instruments에 상품을 인라인으로 넣은 다음, quotes에서 그 id를 참조합니다:

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 } }
]
}'

거래 규모 추가하기

amount를 제공하면 액면가 100 기준 가격과 함께 금액 수치(결제 금액)를 얻을 수 있습니다:

{ "instrument_id": "MH12034", "input_kind": "yield", "input_value": 0.10,
"amount_kind": "nominal", "amount_value": 1000000,
"settlement_date": "2026-06-09", "options": { "round": 6 } }

상태 확인

curl https://calc.dev.emrgex.com/v1/health/livez
# {"status":"alive"}

:::tip Performance 대량으로 가격을 산정하려면 여러 호가를 하나의 /v1/quotes 요청(배치)으로 보내세요. 각 채권의 현금흐름 스케줄이 필요한 경우가 아니라면 with_cashflows끄세요 — 응답이 훨씬 작아지고 빨라집니다. :::

:::note Authentication 개발 서비스는 현재 개방되어 있습니다(API 키 없음). 프로덕션 배포에서는 HMAC 요청 서명을 활성화할 수 있습니다. :::