Api Endpoint

Statistics Calculator

Statistics calculator for a numeric array in one call: count, sum, mean, median, mode, variance and standard deviation honouring ddof (default 1, the sample form; 0 gives the population form) plus always-population *_population fields, min, max, range, the quartiles and interquartile range, skewness, kurtosis, and any requested percentiles. Percentiles use a named interpolation method so the result is reproducible rather than implementation-defined.

Open interactive test console

Offering

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

Endpoint context

URL
https://api.duoleads.com/v1/num/stats
MIME type
application/json
First seen
2026-10-16T01:50:38.788Z
Last seen
Tags
statistics, mean, median, numbers, num

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
48 ms
Average latency
659 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": {
        "values": {
          "type": "string",
          "description": "Comma-separated finite numbers, at most 500 values.",
          "maxLength": 4096
        },
        "percentiles": {
          "type": "string",
          "description": "Comma-separated percentiles 0-100, at most 20. Default 25,50,75.",
          "maxLength": 256,
          "default": "25,50,75"
        },
        "method": {
          "type": "string",
          "description": "Percentile interpolation (NumPy/R names): linear (default), nearest, lower, higher, midpoint.",
          "enum": [
            "linear",
            "nearest",
            "lower",
            "higher",
            "midpoint"
          ],
          "maxLength": 64,
          "default": "linear"
        },
        "ddof": {
          "type": "string",
          "description": "Delta degrees of freedom for variance/stdev: 1 (default, sample, n-1) or 0 (population, n). The *_population fields are always population.",
          "pattern": "^[+-]?\\d+$",
          "maxLength": 64,
          "default": "1"
        }
      },
      "required": [
        "values"
      ]
    }
  },
  "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": {
            "ddof": {
              "default": "1",
              "description": "Delta degrees of freedom for variance/stdev: 1 (default, sample, n-1) or 0 (population, n). The *_population fields are always population.",
              "maxLength": 64,
              "pattern": "^[+-]?\\d+$",
              "type": "string"
            },
            "method": {
              "default": "linear",
              "description": "Percentile interpolation (NumPy/R names): linear (default), nearest, lower, higher, midpoint.",
              "enum": [
                "linear",
                "nearest",
                "lower",
                "higher",
                "midpoint"
              ],
              "maxLength": 64,
              "type": "string"
            },
            "percentiles": {
              "default": "25,50,75",
              "description": "Comma-separated percentiles 0-100, at most 20. Default 25,50,75.",
              "maxLength": 256,
              "type": "string"
            },
            "values": {
              "description": "Comma-separated finite numbers, at most 500 values.",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "required": [
            "values"
          ],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "properties": {
            "data": {
              "properties": {
                "ddof": {
                  "type": "integer"
                },
                "iqr": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "kurtosis_excess": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "max": {
                  "type": "number"
                },
                "mean": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "median": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "method": {
                  "type": "string"
                },
                "min": {
                  "type": "number"
                },
                "mode": {
                  "items": {
                    "type": "number"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                },
                "n": {
                  "type": "integer"
                },
                "outliers_tukey": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "percentiles": {
                  "additionalProperties": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "description": "keyed by caller-chosen names",
                  "type": "object"
                },
                "q1": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "q3": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "range": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "skewness": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "stdev": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "stdev_population": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "sum": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "variance": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "variance_population": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "n",
                "sum",
                "mean",
                "median",
                "mode",
                "ddof",
                "variance",
                "stdev",
                "variance_population",
                "stdev_population",
                "min",
                "max",
                "range",
                "q1",
                "q3",
                "iqr",
                "skewness",
                "kurtosis_excess",
                "percentiles",
                "method",
                "outliers_tukey"
              ],
              "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/stats"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "route",
            "version",
            "data",
            "meta"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}