{"uid":"cap_NZIe6-Rl2lhHgpo_6-9VU","slug":"curvecall-buy-quote-e35c7fc3","name":"CurveCall Buy Quote","description":"Pay-per-call market math and token intel for AI agents, via x402.","url":"https://curvecall.onrender.com/v1/quote/buy?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DVodVxYao3lkEWdxQhlAh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the output token amount, average price, fee, and updated reserves for a bonding-curve buy trade given virtual reserves and input amount.","exampleAgentPrompt":"Using a bonding curve with 30 quote-asset reserves and 1,072,521 token reserves, how many tokens would I get if I buy with 1 unit of the quote asset, assuming a 100 basis-point fee?","exampleUseCases":[{"title":"Estimate token output before trading","prompt":"I want to buy meme tokens on a bonding curve that currently has 30 quote reserves and 1,072,521 token reserves. How many tokens will I receive if I put in 5 quote-asset units with a 100 bps fee?"},{"title":"Check price impact of large buy","prompt":"What is the average price per token and how much does the price move if I spend 50 quote units buying into a bonding curve with 1000 quote reserves and 500,000 token reserves at the default 100 bps fee?"},{"title":"Compare fee scenarios for a trade","prompt":"For a bonding curve with 20 quote reserves and 800,000 token reserves, calculate my buy quote for 2 quote units at both 50 bps and 200 bps fees so I can compare how the fee affects my token output."}],"resultDescription":"Returns the number of tokens received (amount_out), the fee charged, the average price paid per token, the new token spot price after the trade, and the updated virtual quote and token reserves reflecting the post-trade state.","failureModes":["Missing required fields (amount_in, quote_reserves, or token_reserves) returns a 4xx validation error","Zero or negative reserve values may cause division-by-zero or invalid math errors","amount_in larger than available liquidity may return zero or nonsensical output_out","Payment not sent or incorrect x402 payment header returns 402 Payment Required","Service temporarily unavailable on Render cold-start returns 5xx"],"whenToPreferThis":"Use this endpoint when you need fast, pay-per-call bonding-curve buy-side math without running your own AMM simulation — ideal for AI agents that need real-time trade quotes, slippage estimates, or post-trade reserve projections on constant-product curves before executing or recommending a trade.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T00:35:58.649Z","isFirstParty":false,"canonicalSlug":"curvecall-buy-quote-e35c7fc3"}