{"uid":"cap_3Bp80huA-kjASwx1KRc4K","slug":"duo-data-utilities-money-allocation-split-77649818","name":"Duo Data Utilities – Money Allocation / Split","description":"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 the ISO 4217 minor-unit exponent of the currency, so zero- and three-decimal currencies work (JPY 0, KWD 3); metals and XXX are rejected.","url":"https://api.duoleads.com/v1/num/allocate?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["amount","currency"],"properties":{"rule":{"enum":["largest-remainder","first","last","round-robin"],"type":"string","default":"largest-remainder","maxLength":64,"description":"Remainder rule: largest-remainder (default), first, last or round-robin."},"parts":{"type":"string","pattern":"^[+-]?\\d+$","maxLength":64,"description":"Number of equal parts, 1-1000. One of parts or ratios."},"amount":{"type":"string","maxLength":24,"description":"Decimal amount, absolute value below 1e12."},"ratios":{"type":"string","maxLength":4096,"description":"Comma-separated non-negative ratios, at most 1000, each with at most 15 integer digits and 15 decimal places. One of parts or ratios."},"currency":{"type":"string","maxLength":16,"description":"ISO 4217 alpha-3 code."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","route","version","data","meta"],"properties":{"ok":{"const":true},"data":{"type":"object","required":["shares","shares_minor","total","currency","minor_units","remainder_distributed","rule"],"properties":{"rule":{"type":"string"},"total":{"type":"string"},"shares":{"type":"array","items":{"type":"string"}},"currency":{"type":"string"},"minor_units":{"type":"integer"},"shares_minor":{"type":"array","items":{"type":"integer"}},"remainder_distributed":{"type":"integer"}}},"meta":{"type":"object","required":["request_id","computed_at","price_usd","deterministic","disclaimer"],"properties":{"sources":{"type":"array","items":{"type":"object","required":["id","version","published"]}},"price_usd":{"type":"string"},"disclaimer":{"type":"string"},"request_id":{"type":"string"},"computed_at":{"type":"string","description":"RFC 3339 UTC with milliseconds"},"deterministic":{"type":"boolean"}}},"route":{"const":"/v1/num/allocate"},"version":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"rule":"largest-remainder","total":"100.00","shares":["33.34","33.33","33.33"],"currency":"EUR","minor_units":2,"shares_minor":[3334,3333,3333],"remainder_distributed":1},"meta":{"sources":[{"id":"iso-4217","licence":"Public data (owner decision 2026-09-29)","version":"SIX list one 2026-09-17, list three 2026-01-01","published":"2026-09-17","attribution":"ISO 4217 currency and funds code lists, published by SIX Group as secretariat of the ISO 4217 Maintenance Agency (public data)"}],"price_usd":"0.05","disclaimer":"Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms","request_id":"01K6B7Q4ZC8H3F2M9WXR5TYN0D","computed_at":"2026-09-28T12:00:00.000Z","deterministic":true},"route":"/v1/num/allocate","version":"1.0.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PFZbE804qAFHw_EuUgsA9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Splits a monetary amount into N equal parts or by custom ratios, distributing any remainder cent-by-cent using a deterministic rule so parts always sum exactly to the original.","exampleAgentPrompt":"Split $100.00 USD equally among 3 people — make sure the parts add up exactly to the total and use the largest-remainder rule for any leftover cents.","exampleUseCases":[{"title":"Split restaurant bill evenly","prompt":"We have a restaurant bill of €87.50 EUR to split equally among 5 people — can you divide it so every share is exact and the cents add up correctly, using the largest-remainder rule?"},{"title":"Allocate revenue by ownership ratios","prompt":"I need to distribute $1,250.00 USD among three partners with ownership ratios of 2, 3, and 5 — split the amount by those ratios and make sure it totals exactly, with any leftover cents going to the first partner using the first-wins rule."},{"title":"Divide subscription cost into monthly installments","prompt":"Break an annual software fee of ¥127,000 JPY into 12 monthly installments that add up to exactly the full amount, with any remainder assigned last using the last-wins rule."}],"resultDescription":"Returns a JSON object with an array of share amounts in decimal and in minor units, the applied remainder rule, total, currency code, minor unit precision, and the number of minor units redistributed. Also includes metadata: request ID, computation timestamp, CLDR data source attribution, and a deterministic flag confirming the result is reproducible.","failureModes":["Missing required 'amount' or 'currency' parameter returns a validation error","Neither 'parts' nor 'ratios' supplied causes an error","'parts' value outside 1-1000 range rejected","'ratios' list exceeding 1000 entries or individual ratio exceeding precision limits rejected","Amount absolute value ≥ 1e12 rejected","Invalid ISO 4217 currency code returns an error","All-zero ratios list is invalid","Network or server errors may return non-200 HTTP status"],"whenToPreferThis":"Choose this endpoint when you need mathematically guaranteed exact allocation of a money amount — where the sum of shares must equal the original to the last minor unit. Ideal for bill splitting, revenue sharing, installment schedules, or any financial distribution where floating-point rounding errors are unacceptable. The deterministic remainder rules (largest-remainder, first, last) make results auditable and reproducible. Prefer over general-purpose division when currency-aware minor-unit handling is required, especially for zero- or three-decimal currencies like JPY or KWD.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T00:44:25.834Z","isFirstParty":false,"canonicalSlug":"duo-data-utilities-money-allocation-split-77649818"}