# CurveCall Sell Quote

> CurveCall Sell Quote is a paid API for AI agents from curvecall.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Computes the output amount, average price, and post-trade reserves for a sell-side trade on an AMM constant-product bonding curve, given virtual reserves and input amount.

## Facts

- Endpoint: GET https://curvecall.onrender.com/v1/quote/sell?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/curvecall-sell-quote-1a6d3ae3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gW1NdGaFT9y7O6mYQFsll

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 curvecall-sell-quote-1a6d3ae3
```

Example prompt: I want to sell 500 tokens on a bonding curve where the virtual quote reserves are 30 and token reserves are 1,040,000 — can you calculate how much quote asset I'd receive, the average price, and where reserves land after the trade? Use a 100 bps fee.

## When to prefer this

Choose this endpoint when you need to mathematically price a sell-side swap on a constant-product AMM or bonding curve without executing an on-chain transaction. It is ideal for pre-trade simulation, slippage estimation, agent-driven best-execution routing, or building trading UIs that need real-time quote math. Prefer it over on-chain calls when you want instant, cheap ($0.001 USDC), deterministic computation without gas costs or latency.

## Known failure modes

- Missing required fields (amount_in, quote_reserves, token_reserves) returns a validation error
- Zero or negative reserve values may cause division-by-zero or nonsensical pricing
- amount_in larger than available token reserves may return invalid or extreme slippage values
- Service unavailable due to cold-start on Render free tier causing slow initial response
- Payment failure via x402 protocol blocks the call before computation occurs

## How this service works

Pay-per-call market math and token intel for AI agents, via x402.

## Output

Returns a JSON object containing: fee charged, side ('sell'), amount_in, amount_out (quote asset received), average_price paid, price_after (new spot price), new_quote_reserves, and new_token_reserves — fully describing the trade outcome and resulting pool state.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "queryParams": {
     "fee_bps": {
      "type": "number",
      "default": 100,
      "required": false,
      "description": "Curve fee in basis points"
     },
     "amount_in": {
      "type": "number",
      "required": true,
      "description": "Amount to trade"
     },
     "quote_reserves": {
      "type": "number",
      "required": true,
      "description": "Virtual quote-asset reserves (x)"
     },
     "token_reserves": {
      "type": "number",
      "required": true,
      "description": "Virtual token reserves (y)"
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "fee": 0.01,
     "side": "buy",
     "amount_in": 1,
     "amount_out": 34521.9,
     "price_after": 0.0000299,
     "average_price": 0.000029,
     "new_quote_reserves": 31,
     "new_token_reserves": 1038000
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/curvecall-sell-quote-1a6d3ae3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from curvecall.onrender.com](https://www.zero.xyz/host/curvecall.onrender.com/llms.txt)
