Skip to content
Fourohtwo

Split a money amount into shares without losing or inventing a cent

api.duoleads.com/v1/num/allocate

Split a money amount into shares without losing or inventing a cent. Divide evenly into N parts, or by a list of ratios, and the remainder is distributed one minor unit at a time by a named, deterministic rule — largest-remainder, first-wins or last-wins — so the parts always sum exactly to the original. Uses Unicode CLDR minor-unit digits, so zero- and three-decimal currencies work (CLDR differs

BaseAnswering
GEThttps://api.duoleads.com/v1/num/allocate

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://api.duoleads.com/v1/num/allocate?parts=3&amount=100.00&currency=EUR");
console.log(await res.json());

Example input

{
  "parts": "3",
  "amount": "100.00",
  "currency": "EUR"
}

More from Duo Data UtilitiesProvider status