{"uid":"cap_le2l21mFGbg7Boy2y0aFs","slug":"api-quantoracle-dev-f0d3f537","name":"QuantOracle ATR (Average True Range) Indicator","description":"QuantOracle: indicators/atr","url":"https://api.quantoracle.dev/v1/indicators/atr","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"low":{"type":"array","items":{"type":"number"},"title":"Low","description":"Array of low prices"},"high":{"type":"array","items":{"type":"number"},"title":"High","description":"Array of high prices"},"close":{"type":"array","items":{"type":"number"},"title":"Close","description":"Array of closing prices"},"period":{"type":"integer","title":"Period","default":14,"description":"ATR lookback period"}}},"responseSchema":null,"example":{"request":{"input":{"body":{"low":[149.8,150.2,149.5,151.5,150.8,151.2,151.9,151.5,152.8,152.1,153.2,153.9,153.5,154.8,154.2],"high":[152.3,153.1,151.8,154.2,152.9,153.5,154.1,153.8,155.2,154.6,155.8,156.2,155.9,157.1,156.5],"close":[151.5,152,150.9,153.5,152.1,152.8,153.2,152.9,154.5,153.8,154.9,155.6,155.2,156.4,155.8],"period":14},"type":"http","method":"POST","bodyType":"json"}},"response":{"ms":7.46,"_meta":{"url":"https://quantoracle.dev","docs":"https://api.quantoracle.dev/docs","powered_by":"QuantOracle"},"period":14,"atr_pct":1.6046,"atr_series":[2.5],"current_atr":2.5,"volatility_regime":"MEDIUM"}},"exampleRequest":{"low":[149.8,150.2,149.5,151.5,150.8,151.2,151.9,151.5,152.8,152.1,153.2,153.9,153.5,154.8,154.2],"high":[152.3,153.1,151.8,154.2,152.9,153.5,154.1,153.8,155.2,154.6,155.8,156.2,155.9,157.1,156.5],"close":[151.5,152,150.9,153.5,152.1,152.8,153.2,152.9,154.5,153.8,154.9,155.6,155.2,156.4,155.8],"period":14},"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_K6dkrFFZ-ZrBokHX94KPv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the Average True Range (ATR) volatility indicator for a given price series, returning current ATR value, ATR percentage, ATR series, and volatility regime classification.","exampleAgentPrompt":"Calculate the 14-period ATR for this stock using the last 5 bars — highs were [152.3, 153.1, 151.8, 154.2, 152.9], lows were [149.8, 150.2, 149.5, 151.5, 150.8], and closes were [151.5, 152.0, 150.9, 153.5, 152.1] — and tell me what volatility regime it's in right now.","exampleUseCases":null,"resultDescription":"Returns the current ATR value (e.g. 2.85), ATR as a percentage of price (e.g. 1.87%), the ATR time series array, the period used, and a volatility regime label (e.g. 'MEDIUM', 'HIGH', 'LOW'), plus response latency in milliseconds.","failureModes":["Mismatched array lengths for high/low/close series returns a validation error","Insufficient data points for the requested period (need at least period+1 bars)","Invalid or non-numeric price values cause computation failure","Period value of zero or negative returns an error","Empty price arrays return an error"],"whenToPreferThis":"Use this endpoint when you need a fast, pay-per-call ATR calculation without spinning up your own quant infrastructure. Ideal for agents that need real-time volatility regime classification alongside raw ATR values for position sizing, stop-loss placement, or risk management decisions. Prefer this over general-purpose math APIs when you need the volatility regime label ('LOW'/'MEDIUM'/'HIGH') as part of the response.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:51:32.025Z","isFirstParty":false}