# QuantOracle: Statistical Distribution Fitting

> QuantOracle: Statistical Distribution Fitting is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-10-13).

Fits a dataset to multiple statistical distributions (uniform, normal, lognormal, etc.) and returns the best-fit distribution along with parameters, KS statistics, log-likelihood, and descriptive statistics.

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/stats/distribution-fit?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-a577bf1a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_52sbtAKaxH0Iavdxwg3ew

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 api-quantoracle-dev-a577bf1a -d '<json body>'
```

Example prompt: Can you fit a statistical distribution to this dataset and tell me which one fits best — uniform, normal, or lognormal? Here are my 20 data points: [1.2, 2.5, 1.8, 3.1, 2.2, 1.9, 2.8, 3.5, 2.1, 1.5, 2.9, 3.2, 2.4, 1.7, 2.6, 3.0, 2.3, 1.6, 2.7, 3.3]. I also want the KS statistic, log-likelihood, and descriptive stats like mean, median, and skewness.

## When to prefer this

Use this endpoint when you need to identify which statistical distribution best describes a numerical dataset — especially in quantitative finance contexts where knowing if returns follow a normal, lognormal, or uniform distribution matters for downstream risk modeling. Prefer this over manual fitting when you want multiple distributions compared simultaneously with KS statistics and log-likelihood scores in a single call.

## Known failure modes

- Empty or too-small data array returns an error or unreliable fit
- Non-numeric values in the data array cause a parsing error
- Extremely skewed or heavy-tailed data may yield poor fits across all candidate distributions
- Network timeout if payload is unusually large
- Payment failure via x402 if USDC balance is insufficient

## How this service works

Free, fast quant finance calculators powered by a deterministic, multi-chain API. Black-Scholes, options profit, Kelly, VaR, crypto liquidation, and more.

## Output

Returns the best-fit distribution name, a ranked list of fitted distributions each with their parameters (e.g. mean/std for normal, min/max for uniform), KS statistic, log-likelihood score, and full descriptive statistics including mean, median, standard deviation, skewness, and kurtosis for the input dataset.

## Example request

```json
{
 "input": {
  "body": {
   "data": [
    1.2,
    2.5,
    1.8,
    3.1,
    2.2,
    1.9,
    2.8,
    3.5,
    2.1,
    1.5,
    2.9,
    3.2,
    2.4,
    1.7,
    2.6,
    3,
    2.3,
    1.6,
    2.7,
    3.3
   ]
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "title": "Data",
   "minItems": 10,
   "description": "Array of data to fit distributions to"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-a577bf1a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.quantoracle.dev](https://www.zero.xyz/host/api.quantoracle.dev/llms.txt)
