{
  "format": "delx/intent-card/v1",
  "id": "amm-out-given-in-api",
  "intent": "AMM Out Given In for an agent workflow",
  "title": "AMM Out Given In API for agents",
  "description": "Constant-product AMM output amount for a given input size. Call when simulating x*y=k swaps offline from reserves you already know. Returns amount out and new reserves as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.",
  "keywords": [
    "AMM Out Given In API",
    "AMM Out Given In for agents",
    "pay per result API",
    "x402 API",
    "no API key"
  ],
  "updated_at": "2026-08-23",
  "canonical_url": "https://commerce.delx.ai/intents/amm-out-given-in-api",
  "machine_url": "https://commerce.delx.ai/intents/amm-out-given-in-api.json",
  "recommendation": {
    "tool_name": "util_amm_out_given_in",
    "service_name": "AMM Out Given In",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/amm-out-given-in",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "reserve_in": {
          "description": "Input field: reserve in.",
          "type": "integer"
        },
        "reserve_out": {
          "description": "Input field: reserve out.",
          "type": "integer"
        },
        "amount_in": {
          "description": "Input field: amount in.",
          "type": "integer"
        },
        "fee_bps": {
          "description": "Input field: fee bps.",
          "type": "integer"
        }
      },
      "required": [
        "reserve_in",
        "reserve_out",
        "amount_in",
        "fee_bps"
      ],
      "additionalProperties": true
    },
    "example_input": {
      "reserve_in": 1000,
      "reserve_out": 1000,
      "amount_in": 10,
      "fee_bps": 30
    },
    "example_output": {
      "schema": "delx/util-amm-out-given-in/v1",
      "amount_in": 10,
      "amount_out": 9.871580343970614,
      "fee_bps": 30
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/amm-out-given-in -m POST -H 'x-delx-source: intent-card-amm-out-given-in-api' --max-amount 0.001 -b '{\"reserve_in\":1000,\"reserve_out\":1000,\"amount_in\":10,\"fee_bps\":30}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-amm-out-given-in-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/amm-out-given-in"
  }
}
