{"uid":"cap_5aahYG40TwHQUlcoUl9D_","slug":"api-quantoracle-dev-0568fecd","name":"QuantOracle Barrier Option Pricer","description":"QuantOracle: derivatives/barrier-option","url":"https://api.quantoracle.dev/v1/derivatives/barrier-option","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"H":{"type":"number","title":"H","description":"Barrier level","exclusiveMinimum":0},"K":{"type":"number","title":"K","description":"Strike price","exclusiveMinimum":0},"S":{"type":"number","title":"S","description":"Spot price of the underlying asset","exclusiveMinimum":0},"T":{"type":"number","title":"T","maximum":30,"description":"Time to expiration in years","exclusiveMinimum":0},"q":{"type":"number","title":"Q","default":0,"description":"Continuous dividend yield"},"r":{"type":"number","title":"R","default":0.05,"description":"Risk-free interest rate (annualized)"},"type":{"enum":["call","put"],"type":"string","title":"Type","default":"call","description":"Option type"},"sigma":{"type":"number","title":"Sigma","description":"Volatility (annualized)","exclusiveMinimum":0},"rebate":{"type":"number","title":"Rebate","default":0,"description":"Rebate paid if barrier is hit (for out) or not hit (for in)"},"barrier_type":{"enum":["up-in","up-out","down-in","down-out"],"type":"string","title":"Barrier Type","default":"down-out","description":"Barrier type: up/down + in/out"}}},"responseSchema":null,"example":{"request":{"input":{"body":{"H":90,"K":105,"S":100,"T":0.5,"q":0,"r":0.05,"type":"call","sigma":0.2,"rebate":0,"barrier_type":"down-out"},"type":"http","method":"POST","bodyType":"json"}},"response":{"ms":9.02,"_meta":{"url":"https://quantoracle.dev","docs":"https://api.quantoracle.dev/docs","powered_by":"QuantOracle"},"price":3.6634,"barrier":90,"barrier_type":"down-out","vanilla_price":4.5817,"discount_vs_vanilla":0.9183}},"exampleRequest":{"H":90,"K":105,"S":100,"T":0.5,"q":0,"r":0.05,"type":"call","sigma":0.2,"rebate":0,"barrier_type":"down-out"},"tags":["x402"],"displayCostAmount":"0.008","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.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_W1niEZ9nE_yCjfxnLsQKt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Prices barrier options (knock-in/knock-out) with full Greeks, comparing against vanilla option price and computing the discount","exampleAgentPrompt":"Price a down-and-out call barrier option where the spot is 100, strike is 105, barrier is 90, 6 months to expiry, 5% risk-free rate, 0% dividend yield, and 20% volatility — and tell me how much cheaper it is versus the plain vanilla equivalent.","exampleUseCases":null,"resultDescription":"Returns the fair value price of the barrier option, the equivalent vanilla option price, the discount versus vanilla (as a ratio), barrier level, barrier type, and server computation time in milliseconds.","failureModes":["Invalid barrier_type enum value returns a 400 error","Barrier level placed beyond spot in invalid direction for the selected barrier type","Zero or negative time to expiry (T <= 0) causes computation error","Missing required fields (S, K, H, T, sigma) returns validation error","Extreme volatility or rate values may cause numerical instability","Payment not attached or insufficient USDC balance returns 402"],"whenToPreferThis":"Use this endpoint when you need to price a single European-style barrier option (knock-in or knock-out, call or put) and want both the barrier price and a comparison against the vanilla equivalent. Ideal for structured product valuation, exotic derivatives desks, or risk analysis workflows that need fast, on-demand barrier pricing without running a local quant library.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:46:12.044Z","isFirstParty":false}