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

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
start_date
string<date>
required

Start date of the period in ISO format (YYYY-MM-DD)

Example:

"2024-01-15"

end_date
string<date>
required

End date of the period in ISO format (YYYY-MM-DD)

Example:

"2024-07-15"

convention
enum<string>
default:ACT/360

Day count convention to use. Common conventions: ACT/360 (money markets), ACT/365 (UK gilts), 30/360 (US corporate bonds), ACT/ACT ISDA (US Treasury)

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:

"ACT/360"

Response

Successful Response

success
boolean
Example:

true

data
object