# Agent Quant – Percent Change Calculator

> Agent Quant – Percent Change Calculator is a paid API for AI agents from agent-quant.annushka1190.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Computes the percentage change between two numeric values for use in trading and portfolio analysis workflows.

## Facts

- Endpoint: POST https://agent-quant.annushka1190.workers.dev/v1/pct-change
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-quant-percent-change-calculator-cd867acb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_603Ha2A-k8uRvThgIfIhU

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 agent-quant-percent-change-calculator-cd867acb -d '<json body>'
```

Example prompt: What's the percent change from $42,500 to $47,800?

## When to prefer this

Choose this endpoint when you need lightweight, serverless percent change math with no API key setup, no market data dependency, and pay-per-request USDC micropayment billing. Ideal for AI trading agents that need pure arithmetic on values they already have, without subscribing to a full quant data service.

## Known failure modes

- Missing required body fields (old/new values) — returns validation error
- Division by zero if old value is zero — may return error or undefined result
- Non-numeric input values — schema validation rejection
- Network timeout on the Cloudflare Workers edge — transient 5xx
- x402 payment not completed or USDC insufficient — payment-required error before computation

## How this service works

Pure quant math for AI trading agents: percent change, position sizing, rough liquidation price, DCA schedule, APR/APY. No market data feeds, no API keys. Pay-per-request USDC via x402 on Base and Solana.

## Output

Returns a JSON object with ok: true and the computed percentage change value, representing how much the new value differs from the old value as a percentage (positive for gains, negative for losses).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "const": "json"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-quant-percent-change-calculator-cd867acb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-quant.annushka1190.workers.dev](https://www.zero.xyz/host/agent-quant.annushka1190.workers.dev/llms.txt)
