# Pricing Math – Charm Price Rounding

> Pricing Math – Charm Price Rounding is a paid API for AI agents from pricing-math.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Rounds a raw price to a charm ending (e.g. .99, .95, .5) or step-based ending (e.g. 9 at end of tens), in the nearest, up, or down direction.

## Facts

- Endpoint: GET https://pricing-math.x402tookit.com/price-rounding?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pricing-math-charm-price-rounding-cb6bc46f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ah3D6Hwqc7OzRL2ZjSgR8

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 pricing-math-charm-price-rounding-cb6bc46f
```

Example prompt: Round $47.32 to the nearest .99 charm ending — what's the charm price I should display?

## When to prefer this

Use this endpoint when you need to snap a computed or raw price to a psychologically appealing charm ending (.99, .95, .5, or step-based endings like 9 in the tens digit). Prefer it over manual rounding logic when you need directional control (up/down/nearest) and want structured output including the nearby price points and change metrics for audit or display purposes.

## Known failure modes

- Missing required 'price' query parameter returns an error
- Invalid 'direction' value (not nearest/up/down) may cause bad request
- Non-numeric price value causes validation failure
- Extremely large or negative prices may produce unexpected results if not validated upstream

## How this service works

Round a price to a charm ending such as .99 or .95, or to steps like 9 at the end of tens, up, down or nearest.

## Output

Returns the rounded charm price, the price points immediately above and below, the absolute and percentage change from the input price, the step and ending used, the direction applied, and a human-readable summary of what was done.

## 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": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "price"
     ],
     "properties": {
      "step": {
       "type": "number",
       "description": "Size of each rounding cell (default 1; use 10 for endings like 49, 59, 69)"
      },
      "price": {
       "type": "number",
       "description": "Raw price to round"
      },
      "ending": {
       "type": "number",
       "description": "Ending to land on within each step (default 0.99; use 0.95, 0.5, 0, or 9 with step 10)"
      },
      "direction": {
       "type": "string",
       "description": "nearest (default, ties go down), down or up"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "step": {
       "type": [
        "null",
        "number"
       ]
      },
      "ending": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "changePct": {
       "type": [
        "null",
        "number"
       ]
      },
      "direction": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "inputPrice": {
       "type": [
        "null",
        "number"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pricing-math-charm-price-rounding-cb6bc46f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pricing-math.x402tookit.com](https://www.zero.xyz/host/pricing-math.x402tookit.com/llms.txt)
