财税精算与风控模型 · fin.loan.irr
商业贷款/融资租赁真实年化 IRR 精算
使用牛顿迭代法穿透“等本等息/月息X厘”话术,还原真实年化内部收益率(IRR)。
请求地址(支持 GET / POST)
POST https://www.xntou.cn/api/open/v1/fin/loan-irr
单次计费
¥0.02 / 2 点沙箱体验
免费 20 次/日⚡ 在线调试台(Sandbox Debugger)
实时返回结果
{
"error_code": 0,
"reason": "Success",
"api_code": "fin.loan.irr",
"result": {
"annualIrrPct": 14.57,
"totalInterest": 32160
}
}
请求参数与返回字段说明
1. 请求参数
| 参数名 | 类型 | 必填 | 示例默认值 | 说明 |
|---|---|---|---|---|
principal |
number | 必填 | 200000 |
借款本金(元) |
months |
number | 必填 | 24 |
分期月数 |
monthlyPayment |
number | 选填 | 9666.67 |
每期实还金额(元),与 flatMonthlyRate 二选一 |
flatMonthlyRate |
number | 选填 | 0.0067 |
名义月费率(如 0.0067 代表月息 6.7 厘) |
2. 核心返回字段(result)
| 字段路径 | 类型 | 说明 |
|---|---|---|
result.annualIrrPct |
number | 真实年化利率 IRR(%) |
result.totalInterest |
number | 累计总利息(元) |
result.trapWarning |
string | 是否超出开店 10% 融资红线提示 |
多语言接入代码示例
curl -s -X POST "https://www.xntou.cn/api/open/v1/fin/loan-irr" \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_APP_KEY" \
-d '{"principal":200000,"months":24,"flatMonthlyRate":0.0067}'