उदाहरण
https://calc.dev.emrgex.com के विरुद्ध कॉपी-पेस्ट करने योग्य रेसिपी। सभी दरें दशमलव में हैं (0.10 = 10%),
कीमतें प्रति 100 अंकित मूल्य (face) पर हैं, और तिथियाँ ISO प्रारूप में हैं।
yield द्वारा संग्रहित (stored) बॉन्ड की कीमत निकालना
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 } }
]
}'
clean price से yield हल करना
curl -s https://calc.dev.emrgex.com/v1/quotes -H 'content-type: application/json' -d '{
"quotes": [
{ "instrument_id": "MH12034", "input_kind": "clean_price", "input_value": 107.85,
"settlement_date": "2026-06-09", "options": { "round": 6 } }
]
}'
एड-हॉक (ad-hoc) बॉन्ड की कीमत निकालना
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 } }
]
}'
किसी ट्रेड आकार के लिए निपटान नकदी (settlement cash)
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,
"amount_kind": "nominal", "amount_value": 1000000,
"settlement_date": "2026-06-09", "options": { "round": 6 } }
]
}'
परिणाम में एक amounts ब्लॉक जुड़ता है (clean_amount, accrued_amount, dirty_amount = निपटान
नकदी, quantity)।
बैच — एक साथ कई की कीमत निकालना
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" },
{ "instrument_id": "MH12034", "input_kind": "yield", "input_value": 0.11, "settlement_date": "2026-06-09" },
{ "instrument_id": "MH12034", "input_kind": "clean_price", "input_value": 105.0, "settlement_date": "2026-06-09" }
]
}'
प्रत्येक quote अपना स्वयं का status लौटाता है; एक विफलता बाकी को कभी बाधित नहीं करती।
कॉल करने योग्य (callable) बॉन्ड — yield-to-worst
किसी callable बॉन्ड को कीमत द्वारा quote करें और सबसे खराब (worst) yield माँगें:
... "input_kind": "clean_price", "input_value": 101.5, "options": { "yield_worst": true } ...
परिणाम का metrics.yield_to_worst min(yield-to-maturity, प्रत्येक yield-to-call) होता है।
इंडेक्स-लिंक्ड बॉन्ड (Brazil NTN-B, Mexico UDIBONO)
मूल्यांकन के समय प्रकाशित इंडेक्स नॉमिनल (VNA) को index_ratio के माध्यम से प्रदान करें; प्रत्येक मौद्रिक आउटपुट को
index_ratio/100 से गुणा किया जाता है:
... "options": { "index_ratio": 4250.123456, "round": 6 } ...
शेप मेट्रिक्स (yield, duration, convexity) इकाई-रहित होते हैं और इससे अप्रभावित रहते हैं।
क्षेत्रीय परिपाटियाँ (conventions)
| बाज़ार | विशिष्ट परिपाटी |
|---|---|
| Brazil (LTN / NTN-F) | day_count: BUS/252 (व्यावसायिक दिन, ANBIMA कैलेंडर) |
| Mexico (Bonos M / CETES) | संबंधित ACT आधार के साथ NOMINAL / AT_MATURITY |
| Dominican Rep. (MoH bonds) | day_count: ACT/ACT.DRMH + discount_day_count: ACT/ACT.ICMA |
ये संग्रहित कैटलॉग पर पहले से सेट होती हैं; एड-हॉक बॉन्ड के लिए, इन्हें इंस्ट्रूमेंट पर सेट करें। देखें परिपाटियाँ।
:::tip Going fast
बड़े बैच के लिए, with_cashflows को छोड़ दें (बहुत छोटी, बहुत तेज़ प्रतिक्रियाएँ) और कई एकल अनुरोधों के बजाय एक बड़ा
बैच भेजें।
:::