{"uid":"cap_3aBVxIm8HN-txfYXWPylX","slug":"apr-apy-converter-with-deposit-projection-25ecbf43","name":"APR ↔ APY Converter with Deposit Projection","description":"Convert APR to APY or APY to APR for any compounding frequency (continuous, daily, hourly, per block...) and optionally project the final value and gain of a deposit over N days. Useful to compare DeFi yields.","url":"https://api.vextorium.com/v1/apr-apy?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"days":{"type":"integer","description":"Days to project (default 365)"},"from":{"enum":["apr","apy"],"type":"string","description":"What the rate is"},"capital":{"type":"number","description":"Deposit to project (optional)"},"rate_pct":{"type":"number","description":"Rate in %"},"market_caps_by_year":{"type":"integer","description":"Compounding periods per year (0 = continuous, 365 = daily)"}}},"responseSchema":{"type":"json","example":{"days":365,"gain":105.155782,"apr_pct":10,"apy_pct":10.515578,"capital":1000,"frequency":"diaria","final_value":1105.155782,"market_caps_by_year":365}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pkPX4frhFCxZb8ECyzAS1","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts APR to APY or APY to APR for any compounding frequency, and optionally projects the final value and gain of a deposit over N days.","exampleAgentPrompt":"Convert an APR of 10% compounded daily (365 times a year) to APY, and project how much I'd end up with if I deposited $1000 for 365 days.","exampleUseCases":[{"title":"Compare DeFi yield pool returns","prompt":"I'm looking at two DeFi pools — one quotes 15% APR compounded hourly (8760 times a year) and another quotes 14.8% APY. Convert the APR to APY so I can see which one actually pays more."},{"title":"Project staking earnings over 90 days","prompt":"If I stake $5000 at 20% APY with daily compounding, how much will I have after 90 days and what's my total gain?"},{"title":"Convert continuous compounding yield","prompt":"A protocol advertises 8% APR with continuous compounding — what's the equivalent APY? Use 0 for compounding periods per year to indicate continuous."}],"resultDescription":"Returns the converted rate (both apr_pct and apy_pct), the compounding frequency label, and optionally the number of days, deposited capital, projected final_value, and gain in the same currency units as the input capital.","failureModes":["Missing required rate_pct field returns validation error","Invalid 'from' enum value (not 'apr' or 'apy') causes rejection","Negative or zero rate_pct may produce unexpected results","market_caps_by_year value of 0 is treated as continuous compounding — non-zero values indicate discrete periods","Extremely large compounding periods per year may hit floating-point precision limits"],"whenToPreferThis":"Use this endpoint when you need to compare DeFi, staking, or lending yields quoted in different formats (APR vs APY) or at different compounding frequencies. It is the right choice when you want a fast, single-call computation that also projects deposit growth over time, avoiding the need to implement compounding math manually.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-15T12:37:06.761Z","isFirstParty":false,"canonicalSlug":"apr-apy-converter-with-deposit-projection-25ecbf43"}