Example inputPOST /api/v1/x402/amm-out-given-in
{
"reserve_in": 1000,
"reserve_out": 1000,
"amount_in": 10,
"fee_bps": 30
}
Portable intent card · commercial-operations
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.
Intent to transaction
The source header follows this discovery route through challenge, payment and delivery without exposing the buyer or request body.
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}'
{
"reserve_in": 1000,
"reserve_out": 1000,
"amount_in": 10,
"fee_bps": 30
}
{
"intent": "AMM Out Given In for an agent workflow",
"tool_name": "util_amm_out_given_in",
"price_usdc": "0.001",
"machine_url": "https://commerce.delx.ai/intents/amm-out-given-in-api.json"
}
Portable and inspectable