API to Get the CAC 40 (FCHI) Price
To chart the CAC 40 or alert when it moves, you need a current FCHI quote, a clear understanding of its units, and a way to tell whether the data is fresh. This guide shows how to request the latest value, read the returned JSON in Python, and prepare the result for a dashboard or historical series.
Get the latest FCHI quote
Indices-API’s latest endpoint returns a set of rates relative to a base currency. The response shown below includes FCHI and USDFCHI, so you can extract the CAC 40 quote without assuming that the API returns a single index value by itself.
First, get an API key and replace YOUR_API_KEY in this request:
curl 'https://indices-api.com/api/latest?access_key=YOUR_API_KEY'
The key is passed in the access_key query parameter. Keep it on the server rather than embedding it in browser code, and avoid recording full request URLs in logs where the key could be exposed.
The following is a real response. A later request will return its own values and timestamp:
{"data":{"success":true,"timestamp":1795480860,"date":"2026-11-24","base":"USD","rates":{"FCHI":0.00011396584643076,"USD":1,"USDFCHI":8774.558618380028}}}
The fields to extract are inside the outer data object:
successindicates whether the API reports a successful result.ratescontains the returned quotes. ReadFCHIorUSDFCHIaccording to the direction your application needs.baseisUSDin this response. Preserve it alongside the quote so downstream users know its reference currency.dateis the date associated with the returned data. Check the documentation before treating it as a particular exchange’s session date.timestampis a Unix timestamp in seconds. Convert it to UTC for storage and freshness checks, then format it in the viewer’s preferred timezone.
FCHI is the ticker used in this response; the display name can still be “CAC 40” in your product. For the current symbol listing and specifications, see Symbols.
Interpret the quote before plotting it
The response uses USD as its base. In the example, FCHI is the base-relative rate, while USDFCHI is its reciprocal: the former expresses index units per USD, and the latter expresses USD per index unit. The two numbers therefore move in opposite directions.
For a chart or alert, choose one direction and label it explicitly. A rise in the base-relative FCHI rate is not the same event as a rise in USDFCHI. Comparing values from opposite directions without converting them can reverse the meaning of an alert.
Do not automatically label either number as the CAC 40’s native-currency index level or as an executable market price. The response identifies a USD base, but an application that needs a specific native-index convention should verify the quote methodology and units in the Documentation before using it for research or trading decisions.
Store the original rate as well as any derived value. That makes it possible to change chart conventions later without losing the API’s original quote direction. If you calculate a reciprocal yourself, reject zero or invalid rates and retain enough precision for your use case.
Read the response in Python
This example calls the same latest endpoint as the curl request. Set the INDICES_API_KEY environment variable before running it. It uses Python’s standard library and reads both FCHI quote directions, the base, the date, and the timestamp.
import json
import math
import os
from datetime import datetime, timezone
from urllib.parse import urlencode
from urllib.request import urlopen
api_key = os.environ["INDICES_API_KEY"]
query = urlencode({"access_key": api_key})
url = "https://indices-api.com/api/latest?" + query
with urlopen(url) as response:
payload = json.load(response)
data = payload["data"]
if data.get("success") is not True:
raise RuntimeError("Indices-API did not report a successful result")
rates = data["rates"]
fchi = rates["FCHI"]
usd_fchi = rates["USDFCHI"]
if not all(
isinstance(value, (int, float))
and math.isfinite(value)
and value > 0
for value in (fchi, usd_fchi)
):
raise ValueError("FCHI rates must be finite, positive numbers")
observed_at = datetime.fromtimestamp(data["timestamp"], timezone.utc)
print("Base:", data["base"])
print("Data date:", data["date"])
print("Timestamp UTC:", observed_at.isoformat())
print("FCHI per USD:", fchi)
print("USD per FCHI:", usd_fchi)
The example deliberately fails if expected fields are missing instead of silently displaying a zero. In production, catch network, JSON parsing, and validation errors at your application boundary. Keep the last valid observation if appropriate, but mark it as stale rather than presenting it as a fresh quote.
Do not log the constructed url: it contains the API key. Also distinguish a successful request from a fresh market observation. The API can respond successfully while returning the same timestamp or quote as an earlier request.
Build a chart, backfill, or alert
Backfill a daily series
For a chart that extends beyond the latest observation, use the time-series endpoint for daily historical rates. Choose a start date and an end_date before today; end_date cannot be today. Check the documentation for the request syntax, permitted date ranges, and availability under your plan.
Time-series responses organize rates by date, rather than presenting the single latest observation. Extract the FCHI rate consistently for each returned day and preserve the base and quote direction with the series. Use the latest endpoint separately for the current observation rather than assuming today can be included in a historical request.
Trading calendars matter. The CAC 40 generally trades on weekdays, but exchange holidays and other closures can interrupt the schedule. A weekend or holiday should not be treated as a zero-price day, and an absent date should not automatically be filled with an invented value.
Decide how your chart should display gaps. A line connecting available observations is different from explicitly carrying a prior value forward; if you use the latter, label it as an application-generated carry-forward. For research pipelines, retaining the raw returned dates makes that distinction easier to audit.
Alert on a move
For a move alert, compare two valid observations in the same quote direction and with the same base. Store both timestamps with the calculation. Before sending a notification, check that the newer observation is genuinely newer and that the previous observation is the comparison point your product intends to use.
An alert on USDFCHI and one on FCHI will have opposite directional interpretations. Name the metric in the alert configuration and message, rather than using an ambiguous label such as “CAC 40 price changed.” Repeated polls returning the same timestamp should not generate repeated alerts for the same observation.
Convert an amount
The convert endpoint is relevant when the job is to convert an amount rather than display a rate. Its response includes the conversion query, rate information, and result. Consult the documentation for the supported request syntax and confirm the FCHI quote direction before presenting a converted amount; a conversion result is not automatically a native CAC 40 index level or a tradable execution price.
Operate the integration reliably
Latest-rate update frequency depends on the subscription plan; the supplied plan descriptions include updates every 60 minutes or every 10 minutes. Check the current plan details before choosing a polling interval. Polling more often than the underlying update schedule does not guarantee a newer observation.
Cache the latest successful result for an interval appropriate to the plan and the product’s freshness requirements. Include the base and the relevant quote direction in your cache design, and retain the API timestamp with the cached value. Display an “as of” time so users can distinguish the observation time from the time your application served it.
Use UTC internally for Unix timestamps. Convert to a local timezone only for presentation, and do not infer a session close or market timezone solely from the date field. Around weekends, holidays, or delayed updates, a prior timestamp may be expected; your interface should still make its age visible.
Before scheduling a large backfill, check the documentation for date-range constraints, historical coverage, and any pagination or request limits that apply to your plan. Do not assume that every calendar date will be returned or that a single request can cover your entire history. Record completed ranges and validate returned dates so an interrupted backfill can be resumed without silently duplicating observations.
If you are integrating the data into a tool that uses a model context protocol, the MCP page provides the relevant integration information. The same checks on symbol, units, and freshness still apply to any displayed result.
FAQ
Which field contains the CAC 40 quote?
The example response contains data.rates.FCHI and data.rates.USDFCHI. They express reciprocal quote directions, so select the field that matches the units your application displays.
Is the latest FCHI value always real-time?
Not necessarily. Update frequency depends on your subscription plan, and markets also have non-trading periods. Use the returned timestamp to show when the observation was last updated.
Can I request a time series ending today?
No. Set end_date to a date before today, and use the latest endpoint separately when you need the current observation.
Should I fill weekends with the last quote?
Only if that is an explicit display or analysis choice. A carried-forward value is not a new market observation; retain the original date and identify the value as carried forward.
Ready to try the request? Visit Register to get a free API key, then use the latest endpoint to inspect the current FCHI response.