How to get RSI, MACD or Bollinger Bands for BTC or NVDA in an AI agent
How do I get RSI, MACD or Bollinger Bands for BTC or NVDA from an AI agent?
Call GET /v1/markets/indicator on Octio with symbol (such as BTC or NVDA) and indicator (rsi, macd, bbands, ema, sma, atr or stoch). It returns the latest value, or a series of up to 200, computed from 15m to 1w candles, and your agent pays per successful call with no subscription.
Example: daily RSI for NVDA
One call returns the 14-period Wilder RSI of NVIDIA on daily candles. Swap indicator for macd or bbands, or symbol for BTC, and the call shape stays the same.
Example call: markets-indicator
Parameters
| Param | Values | Default |
|---|---|---|
| symbol | Crypto: BTC, ETH, SOL, XRP, HYPE, BNB, DOGE. US stocks: NVDA, AAPL, MSFT, GOOGL, AMZN, META, TSLA, AMD, MU, COIN, MSTR, HOOD, PLTR. Indexes: SP500, XYZ100. Commodities: GOLD, SILVER, CL (WTI crude), BRENTOIL (Brent crude). | required |
| indicator | rsi (Wilder), ema, sma, macd (12/26/9), bbands (Bollinger, 2 standard deviations), atr (Wilder), stoch (%K and its 3-period %D) | required |
| interval | 15m, 1h, 4h, 1d, 1w | 4h |
| period | Look-back length, 2 to 200; at most 100 for rsi, bbands, atr and stoch. Not used by macd. | rsi 14, ema 20, sma 20, bbands 20, atr 14, stoch 14 |
| limit | 1 for the latest value, up to 200 for a series (newest last) | 1 |
| closed_only | true computes from closed candles only; the default includes the candle still forming, as charts do | false |
What each indicator returns
Every point has time (the candle open time) and forming. The value keys depend on the indicator, and outputs lists them:
- rsi, ema, sma, atr: value.
- macd: macd, signal and histogram.
- bbands: upper, middle, lower, percent_b and bandwidth_pct.
- stoch: k and d.
A value is null where there is not enough history for the period. stale: true means the venue could not be read and older cached data was served; such a call is not charged.
Several indicators in one call
If the agent needs RSI, MACD, EMA 20/50/200, SMA 20/50, Bollinger Bands and ATR together, GET /v1/markets/snapshot returns all of them for one symbol, with price, 24 h change, volume, open interest, funding and plain flags such as price_above_ema200. To compare many symbols at once, see how to screen every market by RSI.
Where the prices come from
Prices come from Hyperliquid perpetuals: crypto from the main Hyperliquid market, stocks, indexes and commodities from trade.xyz markets on Hyperliquid. They trade 24/7 and track the asset, but they are not exchange quotes, so a stock value can differ from the last Nasdaq or NYSE print, most of all outside US market hours.
FAQ
Which RSI formula does Octio use?
Wilder's RSI with a 14-period look-back by default. Set period (2 to 100) to change it.
Can I get RSI for a stock like NVDA outside market hours?
Yes. The stock values come from Hyperliquid perpetuals that trade 24/7, so the RSI keeps updating. They track the stock but are not exchange quotes.
Does the latest value include the candle that is still open?
By default, yes, as charts do, and forming says so. Send closed_only=true to compute from closed candles only.
Is this trading advice?
No. The endpoint returns computed values from market data. What to do with them is up to you and your agent.
Updated 2026-11-16.