API to Get the CBOE Volatility Index (VIX) Price
You need to put the CBOE Volatility Index (VIX) on a live dashboard, backfill a clean historical series for your model, and alert your users when it spikes. In this guide you’ll fetch the current VIX level, load a date range suitable for charting, and interpret the response fields you’ll actually use—so you can ship your VIX feature today.
What you’ll build: a VIX card, a backfilled chart, and a spike alert
We’ll do three concrete jobs:
- Render a “VIX now” card using the Latest endpoint (with the correct field to display the index value in points).
- Backfill a daily time series suitable for a line chart using the Time-series endpoint (with notes on weekends and end dates).
- Add one additional call with the Convert endpoint to illustrate on-demand point ↔ USD conversions for VIX-specific tooling.
If you need the precise symbol code for an index, confirm it on the Indices-API Supported Symbols page. For VIX, the symbol is VIX in the examples below.
How VIX is expressed in Indices-API responses
Indices-API returns data with a base currency of USD. For indices, this yields two useful fields in the Latest response for VIX:
- rates.USDVIX: the VIX level in index points. Use this for display and alerts. Example: 20.83 means “VIX is 20.83.”
- rates.VIX: the inverse (index units per USD). Most apps will not display this, but it is useful for conversions.
Shortcut: VIX latest uses rates.USDVIX (analogous to “GSPC latest uses rates.USDGSPC”).
Get the live VIX reading
The Latest endpoint returns the current snapshot. Update cadence depends on your plan (e.g., data refreshed every 60 or 10 minutes). Cache responses in your UI according to your refresh needs; a short client cache avoids jitter while keeping the card responsive.
cURL: Latest VIX
curl -s "https://indices-api.com/api/latest?access_key=YOUR_API_KEY"
Example of a real response (copy-pasteable for local testing and JSON parsing):
{"data":{"success":true,"timestamp":1793752860,"date":"2026-11-04","base":"USD","rates":{"VIX":0.048007681228997,"USD":1,"USDVIX":20.829999999999846}}}
What to read from this payload:
- data.success: boolean success flag for quick checks.
- data.timestamp: Unix epoch (seconds). Good for staleness checks and cache keys.
- data.date: ISO date for the price snapshot’s trading day.
- data.base: the base currency (always “USD” here).
- data.rates.USDVIX: the VIX level in index points (use this for “VIX now”).
- data.rates.VIX: inverse relation (index-per-USD), useful when using the Convert endpoint programmatically.
Python: fetch and display VIX now
import os
import requests
import datetime
API_KEY = os.getenv("INDICES_API_KEY", "YOUR_API_KEY")
url = "https://indices-api.com/api/latest"
params = {"access_key": API_KEY}
r = requests.get(url, params=params, timeout=10)
r.raise_for_status()
payload = r.json()
# Basic validation
if not payload.get("data", {}).get("success"):
raise RuntimeError("Latest endpoint did not return success=true")
data = payload["data"]
timestamp = data["timestamp"] # Unix epoch seconds
asof_date = data["date"] # ISO date string
base = data["base"] # "USD"
rates = data["rates"]
# For display, use the VIX level in index points:
vix_points = rates.get("USDVIX")
# Optionally, the inverse (index-per-USD):
vix_per_usd = rates.get("VIX")
print(f"As of {asof_date} ({datetime.datetime.utcfromtimestamp(timestamp)} UTC):")
print(f"VIX = {vix_points:.2f} points")
print(f"(inverse units for conversion: VIX per 1 {base} = {vix_per_usd})")
Tip: display the formatted VIX value with a fixed precision (e.g., two decimals) and show the snapshot date/time in UTC. For app-level caching, align your refresh interval to your plan’s update frequency. If your plan updates every 10 minutes, polling the Latest endpoint more frequently won’t yield fresher prints.
Backfill a chart-ready VIX series
Use the Time-series endpoint to obtain daily data between two dates for your chart. Note that markets rest on weekends and some holidays—expect gaps. The API’s end_date cannot be today; set end_date to the most recent completed trading day to avoid partials.
Steps
- Pick a date range that matches your dashboard (e.g., last 1M or YTD).
- Ensure end_date is not today. Use yesterday or the most recent business day.
- Handle missing dates on weekends/holidays in your visualization by either:
- Forward-filling the last value for continuous scales, or
- Using a business-day axis scale with gaps hidden.
cURL: Time-series for VIX
The query uses start_date and end_date parameters. If you want only VIX, filter on the symbol you confirmed from the Symbols page. If a symbols parameter is not specified in your plan/docs, parse VIX from the returned set.
curl -s "https://indices-api.com/api/timeseries?access_key=YOUR_API_KEY&start_date=2026-10-01&end_date=2026-11-03"
Parse each day’s rates.USDVIX value (if present) for the plotted point. As with Latest, the base remains USD, and you should rely on the provided date keys to build the x-axis.
For the endpoint’s response structure and optional parameters, see the Indices-API Documentation.
Fire an alert when VIX spikes
There are a few ways to detect a spike using the data you’re already pulling:
- Compare the latest rates.USDVIX to your alert threshold (e.g., 20 or 30 points).
- Compute a day-over-day percent change from two adjacent daily closes using Time-series data.
- Poll at your plan cadence and trigger if the new print exceeds a relative delta from the previous cached print.
Because updates post on a schedule (e.g., every 60 or 10 minutes depending on plan), schedule your alert workers accordingly and avoid over-polling. When an alert fires, include the timestamp and date to help recipients interpret the context.
One extra call: Convert VIX points on demand
The Convert endpoint can be useful if you want to translate a dollar-denominated amount into VIX “units” (or vice versa) for position sizing, scenario tools, or education within your app. The inverse rate in Latest (rates.VIX) underpins such conversions, but the Convert endpoint eliminates manual math.
Example request (review the Documentation for the full parameter set available to your plan):
curl -s "https://indices-api.com/api/convert?access_key=YOUR_API_KEY&from=USD&to=VIX&amount=1000"
If your UI needs to show the index value itself, keep using rates.USDVIX from the Latest or Time-series endpoints. Use Convert when you’re explicitly turning an amount from one unit to another.
Operational details you’ll want to know
- Base currency and units: Responses are USD-based. For indices, use rates.USD{SYMBOL} for the index value in points. For VIX that is rates.USDVIX. The inverse (rates.VIX) represents index-per-USD.
- Update frequency: Latest updates depend on your plan (e.g., every 60 or 10 minutes). Poll at or slightly below that cadence and cache between polls.
- Trading days: Daily series will skip weekends and certain holidays. Align your chart axis or forward-fill consciously.
- Time-series end date: end_date cannot be today. Use the most recent completed trading day to avoid partial data.
- Timestamp: Use the Unix epoch in timestamp for staleness checks and UI “as of” messaging. Use the ISO date for daily indexing.
- Caching: Short client-side caching (e.g., to your plan’s refresh window) reduces jitter. Pin server-side caches to the plan’s update frequency to avoid serving stale prints.
Pricing and access
The PRO plan is $49.99/mo with a 7-day trial. Get your key and try the requests above in minutes: Register.
For complete parameter details, response fields, and endpoint coverage, read the Documentation. Confirm symbols for indices you plan to support from the Symbols page. If you need managed connectivity options, see MCP.
Context for working with VIX
Developers commonly supplement raw VIX levels with context links to help users interpret moves and build trust in the figures they see:
- Cboe VIX overview for methodology and contract details.
- Cboe VIX White Paper for the computation approach and caveats.
- VIX explanation and use cases for non-expert stakeholders on your team.
In your product copy, clarify whether a displayed value is the spot index level (from rates.USDVIX) versus a futures price or a derived metric to avoid confusion.
Implementation checklist
- Get an API key and test the Latest endpoint with curl in your terminal.
- Implement your backend fetch with retries and a short cache keyed by timestamp and date.
- In the UI, display the VIX value from rates.USDVIX with a small “as of” line using date and timestamp.
- Backfill the chart via Time-series and fill gaps sensibly.
- Set an alert rule (absolute threshold or percent move) with polling aligned to your plan’s refresh rate.
- Optionally, wire the Convert endpoint for USD ↔ VIX unit conversions in calculators or analysis tools.
Troubleshooting
- I see a value but it looks inverted. Use rates.USDVIX to display the VIX level in index points. The rates.VIX field is the inverse and usually not for display.
- My chart stops before today. The Time-series end_date cannot be today. Use the last completed trading day.
- Why are there gaps on weekends? VIX is an index with non-trading days. Keep gaps, forward-fill, or use a business-day axis.
- When should I refresh? Refresh at your plan’s update cadence (e.g., every 60 or 10 minutes). Caching between polls reduces redundant calls.
FAQ
Which field is the VIX level to show on my dashboard?
Use rates.USDVIX from the Latest or Time-series response. That is the VIX value in index points.
How do I backfill for the last 30 days?
Call the Time-series endpoint with a 30-day window and set end_date to the most recent completed trading day. Parse each day’s rates.USDVIX into your chart.
Can I convert between USD and VIX units?
Yes. Use the Convert endpoint (e.g., from=USD&to=VIX) for unit conversions. For display of the index itself, stick to rates.USDVIX.
Why does the latest value not change when I poll every second?
The Latest endpoint is updated on a schedule (e.g., every 60 or 10 minutes depending on your plan). Polling more frequently won’t produce fresher prints and can be rate-inefficient.
Where do I confirm the symbol code?
Check the Symbols page to confirm “VIX” and to find other indices you plan to support.
Ready to add VIX to your app? Start your 7-day trial on the PRO plan ($49.99/mo) and ship your dashboard feature today: Register.