# Token Pool Quote Relative Difference — Before and After Comparison

> Token Pool Quote Relative Difference — Before and After Comparison is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Computes the relative difference (gap) between a token pool price and a reference price, comparing a 'before' snapshot and an 'after' snapshot to show how the price gap changed.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-bx-token-pool-price-gap-compare?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-pool-quote-relative-difference-before-and-after-comparison-206b6b90
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R-iMIh9-ZeL5uUPUK5Ty9

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-pool-quote-relative-difference-before-and-after-comparison-206b6b90 -d '<json body>'
```

Example prompt: Can you run a before-and-after price gap comparison for a token pool? Before the trade the pool price was 1.10 and the reference price was 1.00; after the trade the pool price is 1.21 and the reference price is 1.10. I want to see how the relative price difference changed between those two states.

## When to prefer this

Use this endpoint when you need a deterministic, cheap ($0.01 USDC) before-and-after calculation of the relative price gap between a token pool quote and a reference price. It is ideal for post-trade analysis, slippage audits, or tracking how liquidity events affect pool pricing — without needing a live market feed or a full trading system. Prefer it over a single-snapshot endpoint when you specifically need to compare two distinct states (before and after).

## Known failure modes

- Missing required fields (pool_price or reference_price in either before or after object) returns a validation error
- Zero or negative values for pool_price or reference_price are rejected (exclusiveMinimum: 0)
- Values exceeding the maximum bound (1e16) are rejected
- Malformed JSON body returns a 400-level error
- Payment failure or insufficient USDC balance prevents the call from completing

## How this service works

Token pool quote relative difference — Before and after comparison: Before and after comparison for Token pool quote relative difference. Supplied token observations only. Deterministic calculation or caller-threshold verdict, not a live scan, safety proof or trade recommendation. Specialised preset in a shared 50-profile, 20-operation engine. 0.01 USDC includes one bounded before and after comparison report.

## Output

A bounded report containing the computed relative price difference (pool price vs reference price) for both the 'before' and 'after' input observations, along with a comparison showing how the gap changed between the two states. The result is deterministic and based solely on the supplied numeric inputs — it is not a live market scan or a trade recommendation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "after": {
   "type": "object",
   "default": {
    "pool_price": 1.2100000000000002,
    "reference_price": 1.1
   },
   "required": [
    "pool_price",
    "reference_price"
   ],
   "properties": {
    "pool_price": {
     "type": "number",
     "default": 1.1,
     "maximum": 10000000000000000,
     "minimum": 0,
     "exclusiveMinimum": 0
    },
    "reference_price": {
     "type": "number",
     "default": 1,
     "maximum": 10000000000000000,
     "minimum": 0,
     "exclusiveMinimum": 0
    }
   },
   "additionalProperties": false
  },
  "before": {
   "type": "object",
   "default": {
    "pool_price": 1.1,
    "reference_price": 1
   },
   "required": [
    "pool_price",
    "reference_price"
   ],
   "properties": {
    "pool_price": {
     "type": "number",
     "default": 1.1,
     "maximum": 10000000000000000,
     "minimum": 0,
     "exclusiveMinimum": 0
    },
    "reference_price": {
     "type": "number",
     "default": 1,
     "maximum": 10000000000000000,
     "minimum": 0,
     "exclusiveMinimum": 0
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-pool-quote-relative-difference-before-and-after-comparison-206b6b90/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
