{"uid":"cap_dvqsmQ15YVew1mpi5u4on","slug":"api-quantoracle-dev-1907e2da","name":"QuantOracle FX Carry Trade Calculator","description":"QuantOracle: fx/carry-trade","url":"https://api.quantoracle.dev/v1/fx/carry-trade","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"leverage":{"type":"number","title":"Leverage","default":1,"description":"Leverage multiplier"},"notional":{"type":"number","title":"Notional","default":100000,"description":"Notional trade amount"},"spot_exit":{"type":"number","title":"Spot Exit","description":"Spot rate at exit"},"spot_entry":{"type":"number","title":"Spot Entry","description":"Spot rate at entry"},"holding_period_days":{"type":"integer","title":"Holding Period Days","description":"Holding period in days"},"borrow_currency_rate":{"type":"number","title":"Borrow Currency Rate","description":"Interest rate of the funding (borrow) currency"},"invest_currency_rate":{"type":"number","title":"Invest Currency Rate","description":"Interest rate of the investment currency"}}},"responseSchema":null,"example":{"request":{"leverage":2,"notional":50000,"spot_exit":1.26,"spot_entry":1.25,"holding_period_days":30,"borrow_currency_rate":0.02,"invest_currency_rate":0.05},"response":{"ms":13.58,"_meta":{"url":"https://quantoracle.dev","docs":"https://api.quantoracle.dev/docs","powered_by":"QuantOracle"},"pnl_amount":1046.58,"spot_return_pct":0.8,"carry_return_pct":0.2466,"total_return_pct":1.0466,"levered_return_pct":2.0932,"annualized_total_return":12.7333,"breakeven_depreciation_pct":0.2466}},"exampleRequest":{"leverage":2,"notional":50000,"spot_exit":1.26,"spot_entry":1.25,"holding_period_days":30,"borrow_currency_rate":0.02,"invest_currency_rate":0.05},"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__A56e-TTJO9iYI70Z3T7y","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes FX carry trade P&L, spot/carry returns, levered returns, annualized total return, and breakeven depreciation for a currency position given entry/exit prices and interest rate differentials.","exampleAgentPrompt":"I entered a EUR/USD carry trade at 1.25 and plan to exit at 1.26 with a $50,000 notional and 2x leverage held for 30 days — the borrow rate is 2% and the invest rate is 5%. Can you break down the spot return, carry return, total return, levered return, annualized return, and the breakeven depreciation for me?","exampleUseCases":null,"resultDescription":"Returns a JSON object with: P&L in dollar amount, spot return percentage, carry return percentage, total return percentage, levered return percentage, annualized total return, and the breakeven depreciation percentage — decomposing exactly how much of the trade's performance came from spot movement vs the interest rate differential.","failureModes":["Missing required fields (leverage, notional, spot_entry, spot_exit, holding_period_days, borrow/invest rates) returns validation error","Leverage or notional of zero or negative may cause division errors or unexpected results","Invalid rate values (e.g. rates > 1 if interpreted as decimals vs percent) may yield nonsensical annualized returns","Network timeout or service unavailability returns 5xx","Insufficient USDC balance for x402 payment results in 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a full decomposition of an FX carry trade's return profile — separating spot and carry contributions, computing leverage effect, and annualizing returns — rather than a simple spot FX gain/loss calculator. Ideal for quantitative traders, portfolio analysts, or AI agents modeling currency strategies with interest rate differentials.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:31:55.621Z","isFirstParty":false}