Api Endpoint

Money Split (No Rounding Loss)

Money split: 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.

Open interactive test console

Offering

Provider
api.duoleads.com
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Financial Analysis
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://api.duoleads.com/v1/num/allocate
MIME type
application/json
First seen
2026-10-16T01:50:38.788Z
Last seen
Tags
money-split, allocate, allocation, Finance, money

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.05 USDC
Atomic price: 50000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "50000",
    "payTo": "0xCD673f7e1daD254347AEab6be0DEFe8b9C6b3A39"
  }
]

Observed health

Status
Healthy
Latest latency
34 ms
Average latency
821 ms
HTTP status
402
Last checked
Reachability
100% over 13 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "string",
          "description": "Decimal amount, absolute value below 1e12.",
          "maxLength": 24
        },
        "currency": {
          "type": "string",
          "description": "ISO 4217 alpha-3 code.",
          "maxLength": 16
        },
        "parts": {
          "type": "string",
          "description": "Number of equal parts, 1-1000. One of parts or ratios.",
          "pattern": "^[+-]?\\d+$",
          "maxLength": 64
        },
        "ratios": {
          "type": "string",
          "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.",
          "maxLength": 4096
        },
        "rule": {
          "type": "string",
          "description": "Remainder rule: largest-remainder (default), first, last or round-robin.",
          "enum": [
            "largest-remainder",
            "first",
            "last",
            "round-robin"
          ],
          "maxLength": 64,
          "default": "largest-remainder"
        }
      },
      "required": [
        "amount",
        "currency"
      ]
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "properties": {
            "amount": {
              "description": "Decimal amount, absolute value below 1e12.",
              "maxLength": 24,
              "type": "string"
            },
            "currency": {
              "description": "ISO 4217 alpha-3 code.",
              "maxLength": 16,
              "type": "string"
            },
            "parts": {
              "description": "Number of equal parts, 1-1000. One of parts or ratios.",
              "maxLength": 64,
              "pattern": "^[+-]?\\d+$",
              "type": "string"
            },
            "ratios": {
              "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.",
              "maxLength": 4096,
              "type": "string"
            },
            "rule": {
              "default": "largest-remainder",
              "description": "Remainder rule: largest-remainder (default), first, last or round-robin.",
              "enum": [
                "largest-remainder",
                "first",
                "last",
                "round-robin"
              ],
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "amount",
            "currency"
          ],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "properties": {
            "data": {
              "properties": {
                "currency": {
                  "type": "string"
                },
                "minor_units": {
                  "type": "integer"
                },
                "remainder_distributed": {
                  "type": "integer"
                },
                "rule": {
                  "type": "string"
                },
                "shares": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "shares_minor": {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                "total": {
                  "type": "string"
                }
              },
              "required": [
                "shares",
                "shares_minor",
                "total",
                "currency",
                "minor_units",
                "remainder_distributed",
                "rule"
              ],
              "type": "object"
            },
            "meta": {
              "properties": {
                "computed_at": {
                  "description": "RFC 3339 UTC with milliseconds",
                  "type": "string"
                },
                "deterministic": {
                  "type": "boolean"
                },
                "disclaimer": {
                  "type": "string"
                },
                "price_usd": {
                  "type": "string"
                },
                "request_id": {
                  "type": "string"
                },
                "sources": {
                  "items": {
                    "required": [
                      "id",
                      "version",
                      "published"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "request_id",
                "computed_at",
                "price_usd",
                "deterministic",
                "disclaimer"
              ],
              "type": "object"
            },
            "ok": {
              "const": true
            },
            "route": {
              "const": "/v1/num/allocate"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "route",
            "version",
            "data",
            "meta"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}