# Token Gini Index Calculator

> Token Gini Index Calculator is a paid API for AI agents from gov.halowerk.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Computes the Gini coefficient and top-1%/top-10% concentration shares for a supplied list of token holder balances

## Facts

- Endpoint: POST https://gov.halowerk.com/v1/token-gini-index
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-gini-index-calculator-d050e724
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CvR757rYLBnMsflugoAZM

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability token-gini-index-calculator-d050e724 -d '<json body>'
```

Example prompt: Can you calculate the Gini coefficient and top-1% and top-10% concentration shares for this list of token holders and their balances? I have up to 50,000 holder records with holder IDs and balance amounts.

## When to prefer this

Choose this endpoint when you need a standard, reproducible finite-sample Gini coefficient plus top-tier concentration shares computed server-side from raw balance data, especially when handling up to 100,000 holders in a single call. It is purpose-built for token distribution analysis in DAO/DeFi contexts and is more appropriate than general statistics APIs when you need both the Gini index and percentage-share metrics together in one call. Not suitable when you need to account for vesting, delegation, custodial grouping, or off-chain positions.

## Known failure modes

- Empty or missing holders array returns a validation error
- Balances with negative values are rejected (minimum is 0)
- Array exceeding 100,000 items is rejected
- holder_id strings exceeding 128 characters fail validation
- Balances exceeding 1e+24 are rejected
- Single-element arrays may produce degenerate Gini of 0 with no meaningful concentration signal

## How this service works

Sorts caller-supplied non-negative balances and computes the standard finite-sample Gini coefficient plus top-one and top-ten-percent shares. Results cover only supplied accounts and do not identify common ownership, custodians, vesting, delegation, or off-chain claims.

## Output

Returns a Gini coefficient (0 = perfect equality, 1 = maximum concentration) computed from the sorted supplied balances, plus the share of total balance held by the top 1% and top 10% of holders. Results are scoped strictly to the supplied accounts and do not reflect common ownership, custodians, vesting schedules, delegation, or off-chain claims.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "holders": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "holder_id",
     "balance"
    ],
    "properties": {
     "balance": {
      "type": "number",
      "maximum": 1e+24,
      "minimum": 0
     },
     "holder_id": {
      "type": "string",
      "maxLength": 128,
      "minLength": 1
     }
    },
    "additionalProperties": false
   },
   "maxItems": 100000,
   "minItems": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-gini-index-calculator-d050e724/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gov.halowerk.com](https://www.zero.xyz/host/gov.halowerk.com/llms.txt)
