{"uid":"cap_5EUbXlMelRmSl6D7xyzlJ","slug":"writerslogic-isda-day-count-year-fraction-proration-calculator-a823bbf6","name":"WritersLogic ISDA Day-Count Year Fraction & Proration Calculator","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/proration?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","required":["start","end","convention"],"properties":{"end":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Exclusive end: the day after the last day included. Must not precede start."},"start":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date YYYY-MM-DD."},"amount":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,12})?$","maxLength":30,"description":"Optional amount to prorate (annual amount without `period`; period amount with it)."},"period":{"type":"object","required":["start","end"],"properties":{"end":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date YYYY-MM-DD."},"start":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date YYYY-MM-DD."}},"description":"Full billing period [start, end); the charge is amount x fraction(range) / fraction(period).","additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 alphabetic code, upper case."},"exponent":{"type":"integer","maximum":8,"minimum":0},"rounding":{"enum":["half-up","half-down","half-even","up","down","ceiling","floor"],"type":"string","description":"Rounding of the charge to the currency's minor unit. Default half-up. half-up: ties away from zero. half-down: ties toward zero. half-even: ties to the even neighbour. up: away from zero. down: toward zero. ceiling: toward +infinity. floor: toward -infinity."},"convention":{"enum":["1/1","30/360","30E/360","30E/360-ISDA","ACT/365F","ACT/360","ACT/ACT-ISDA","ACT/ACT-ICMA"],"type":"string"},"terminationDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Termination date of the transaction; only used by 30E/360-ISDA."}},"additionalProperties":false},"maxItems":100,"minItems":1}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PbG_02_xQFo6LmjFnBSbH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes year fractions and optional prorated charges for up to 100 half-open date ranges using named ISDA day-count conventions (2006 ISDA Definitions Section 4.16).","exampleAgentPrompt":"Using ACT/ACT-ISDA convention, calculate the year fraction for the range 2024-03-15 to 2024-09-15, and prorate a $1200 annual charge — the billing period runs from 2024-01-01 to 2025-01-01, rounding half-up.","exampleUseCases":[{"title":"Mid-cycle SaaS subscription proration","prompt":"A customer joined our annual $1200 plan on 2024-04-10 and the billing period runs 2024-01-01 to 2025-01-01. Using 30/360 convention, what's the prorated charge they owe for the rest of the year, rounded half-even?"},{"title":"Bond accrued interest calculation","prompt":"Calculate the accrued interest year fraction for a bond with coupon from 2024-06-01 to 2024-09-01 using the ACT/ACT-ISDA day-count convention — I need the raw fraction to multiply against the annual coupon rate."},{"title":"Batch partial-period charges for multiple contracts","prompt":"I have three contracts that all ended early this quarter — ranges 2024-07-01 to 2024-08-15, 2024-07-01 to 2024-09-01, and 2024-07-01 to 2024-10-01 — each with a $6000 annual amount. Compute the prorated charges using ACT/365F with the full period 2024-07-01 to 2025-07-01, rounding ceiling."}],"resultDescription":"For each submitted item, the API returns the computed year fraction as a decimal under the specified ISDA convention, and if an amount and optionally a billing period were provided, the prorated monetary charge in the given currency rounded to the requested minor-unit precision. Results are returned in the same order as the input array.","failureModes":["Invalid date format (not YYYY-MM-DD) returns a validation error","end date preceding start date returns an error for that item","ACT/ACT-ICMA convention specified returns an unsupported-convention error","30E/360-ISDA with a range ending on the last day of February without terminationDate returns an indeterminate/unknown result or error","More than 100 items in the array returns a 400 validation error","Invalid convention enum value returns a validation error","Malformed amount string returns a validation error"],"whenToPreferThis":"Choose this endpoint when you need precise, standards-compliant ISDA day-count year fractions (2006 ISDA Definitions) for financial calculations such as interest accrual, bond coupon periods, or subscription proration — especially when you need to handle multiple date ranges in a single call and require specific conventions like 30E/360-ISDA or ACT/ACT-ISDA. Prefer it over generic date-arithmetic utilities when regulatory or contractual ISDA compliance matters, or when you need built-in proration arithmetic (amount × fraction(range) / fraction(period)).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T12:34:35.950Z","isFirstParty":false,"canonicalSlug":"writerslogic-isda-day-count-year-fraction-proration-calculator-a823bbf6"}