Skip to content
Fourohtwo

agents.writerslogic.com/api/v1/proration

Computes the year fraction of up to 100 half-open date ranges [start, end) under a named ISDA day-count convention, and optionally the prorated charge, for an agent billing a partial period or accruing interest. Conventions follow Section 4.16 of the 2006 ISDA Definitions: 30/360, 30E/360, 30E/360 (ISDA), Actual/365 (Fixed), Actual/360, Actual/Actual (ISDA), 1/1. `end` is the day immediately follo

BaseAnswering
POSThttps://agents.writerslogic.com/api/v1/proration

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.writerslogic.com/api/v1/proration", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"items":[{"end":"2004-05-01","start":"2003-11-01","amount":"1000.00","currency":"USD","convention":"ACT/ACT-ISDA"}]}),
});
console.log(await res.json());

Example input

{
  "items": [
    {
      "end": "2004-05-01",
      "start": "2003-11-01",
      "amount": "1000.00",
      "currency": "USD",
      "convention": "ACT/ACT-ISDA"
    }
  ]
}