The latest CCI move is the last point minus the previous point for one ticker and the period you send.
The response file for this route is empty, so this article names the keys the handler writes and leaves the point values to the live series.
To access this endpoint, you must obtain an API key: Get your API key
Send the period with the ticker
One ticker fills the request. series_type is required here, and the accepted values are open, close, high, and low. Leaving time_period off uses 10, so the snippet sends the period from the docs example. The body is the latest 50 points, or fewer when the series is shorter. Another interval is a different series.
Method: GET
Endpoint: https://api.mboum.com/v1/markets/indicators/cci
Documentation: Commodity Channel Index
Subtract the previous CCI from the latest
Each point has timestamp and CCI. Meta echoes symbol, interval, series_type, time_period, and the indicator label Commodity Channel Index (CCI). Symbol is the ticker in uppercase. The script subtracts the previous CCI from the latest one.
import requests
url = "https://api.mboum.com/v1/markets/indicators/cci"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
"ticker": "AAPL",
"interval": "5m",
"series_type": "close",
"time_period": 50,
"limit": 50,
}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
payload = response.json()
points = payload.get("body") or []
if len(points) < 2:
raise RuntimeError("expected at least two CCI points")
latest = points[-1]
move = latest["CCI"] - points[-2]["CCI"]
print(payload["meta"]["indicator"], payload["meta"]["time_period"], latest["timestamp"], move)
High, low, and close drive the index
The index is calculated from each bar's high, low, and close for every series_type this route accepts. series_type is echoed in meta. Two series are comparable when they share an interval and a time_period.
Learn more or explore other endpoints: Mboum CCI indicator