Skip to main content
POST
/
quantlib
/
scheduling
/
daycount
/
batch-year-fraction
Batch Year Fraction
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/scheduling/daycount/batch-year-fraction \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "date_pairs": [
    [
      "2024-01-01",
      "2024-07-01"
    ],
    [
      "2024-07-01",
      "2025-01-01"
    ],
    [
      "2025-01-01",
      "2025-07-01"
    ]
  ],
  "convention": "30/360"
}
'
{
  "success": true,
  "data": {
    "convention": "30/360",
    "results": [
      {
        "start_date": "2024-01-01",
        "end_date": "2024-07-01",
        "year_fraction": 0.5
      },
      {
        "start_date": "2024-07-01",
        "end_date": "2025-01-01",
        "year_fraction": 0.5
      },
      {
        "start_date": "2025-01-01",
        "end_date": "2025-07-01",
        "year_fraction": 0.5
      }
    ]
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
date_pairs
string<date>[][]
required

Array of date pairs [[start1, end1], [start2, end2], ...] in ISO format

Required array length: 2 elements
Example:
[
["2024-01-01", "2024-07-01"],
["2024-07-01", "2025-01-01"],
["2025-01-01", "2025-07-01"]
]
convention
enum<string>
default:ACT/360

Day count convention to apply to all date pairs

Available options:
ACT/360,
ACT/365,
ACT/365 Actual,
ACT/ACT ISDA,
30/360,
30E/360,
30E/360 ISDA,
30/360 European,
Business/252
Example:

"30/360"

Response

Successful Response

success
boolean
Example:

true

data
object