CSI 1000 Index (CSI1000) OHLC API: Daily and Intraday Endpoints for Time-Series Data
To chart the CSI 1000, you need more than a current quote: a daily view needs historical candles, an intraday view needs interval candles, and a live display needs a way to detect fresh data. This guide shows how to retrieve and interpret the latest CSI1000 response, then explains how to build a candle pipeline without confusing quote units, trading dates, or stale values.
Choose the data for each part of the chart
Use the latest endpoint for the current available quote, the OHLC endpoint for a date’s open, high, low, and close, and the intraday endpoint for interval-based candles on a specific date. They serve different jobs: a single latest value cannot reconstruct a candle, and a daily candle cannot show the sequence of moves within a session.
The OHLC endpoint is described by the path open-high-low-close/YYYY-MM-DD. The intraday endpoint supplies interval-based candles for a specific date. Before implementing either request, check the supported request options, interval choices, response structure, and availability in the Documentation.
The response below uses CSI1000 and USDCSI1000 as keys in rates. Confirm the current symbol listing and its specifications on the Symbols page before configuring a production pipeline.
Fetch and read the latest CSI1000 quote
Replace YOUR_API_KEY with your key and run this request. The latest endpoint can return multiple rates; the application selects the CSI1000 fields from the response rather than assuming that every returned key belongs on the chart.
curl "https://indices-api.com/api/latest?access_key=YOUR_API_KEY"
The following is the supplied real response. It is a snapshot, not a promise that a new request will return the same values.
{"data":{"success":true,"timestamp":1795740060,"date":"2026-11-27","base":"USD","rates":{"CSI1000":0.0012047383872274,"USD":1,"USDCSI1000":830.0557287805965}}}
The response wraps the result in data. Inside that object, success indicates whether the request succeeded, and rates contains the available quote values. base is USD, while date identifies the date associated with the response.
timestamp is a Unix timestamp in seconds. Store it as an instant in UTC and convert it to a display timezone only at the edge of your application. Do not assume that the response’s date is itself a timestamp or that it defines the candle’s session boundary; check the endpoint documentation for the relevant date and timezone conventions.
Call the same endpoint from Python
This example uses Python’s standard library. Set INDICES_API_KEY in the environment before running it; the code extracts both CSI1000 quote keys and retains the metadata needed to assess freshness.
import json
import os
from urllib.parse import urlencode
from urllib.request import urlopen
api_key = os.environ["INDICES_API_KEY"]
url = "https://indices-api.com/api/latest?" + urlencode({
"access_key": api_key
})
with urlopen(url, timeout=10) as response:
payload = json.load(response)
data = payload.get("data")
if not isinstance(data, dict) or not data.get("success"):
raise RuntimeError("Indices-API request did not return successful data")
rates = data.get("rates")
if not isinstance(rates, dict):
raise RuntimeError("The response has no rates object")
required_rates = ("CSI1000", "USDCSI1000")
if any(key not in rates for key in required_rates):
raise RuntimeError("The response is missing a CSI1000 rate")
quote = {
"base": data["base"],
"date": data["date"],
"timestamp": data["timestamp"],
"csi1000_per_usd": rates["CSI1000"],
"usd_per_csi1000": rates["USDCSI1000"],
}
print(json.dumps(quote, indent=2))
For a service, keep the key in a secret store or environment variable and avoid logging the full request URL: the key is part of its query string. Handle network failures, invalid JSON, unsuccessful API responses, and missing fields separately from a valid quote. A missing rate is not a zero price.
Get the quote direction right
The API describes its rates as relative to USD by default. In the supplied response, rates.CSI1000 expresses CSI1000 units per USD, while rates.USDCSI1000 is the reciprocal direction, USD per CSI1000 unit. The rates.USD entry is the base’s rate to itself.
Label the direction and unit wherever the value appears: in a chart axis, an alert, a database column, or an export. Do not silently label either rate as the index’s native points value. Confirm the meaning and units of the OHLC and intraday fields independently before combining them with this latest quote.
Quote direction matters for candles as well as single values. If you invert a positive series, its high and low reverse roles: the reciprocal of the original low becomes the inverted high, and the reciprocal of the original high becomes the inverted low. Open and close are inverted individually. Only perform that transformation when the provider’s field definitions and your intended display unit support it.
Keep the original response alongside any normalized value, including its base, symbol key, and timestamp. That makes it possible to audit whether a chart change came from the market data or from a change in your own quote conversion.
Build daily and intraday series
For a daily candle chart, request the relevant OHLC date and store the returned open, high, low, and close together with the date, symbol, and quote basis. The OHLC response format described by Indices-API places these candle fields under rates; verify the actual response envelope for the endpoint before writing the parser.
For an intraday chart, use the intraday endpoint’s interval-based candles for the date you need. Check the documentation for the supported intervals and the candle timestamp conventions. A candle’s timestamp may represent an interval boundary rather than the time at which your application received it, so store retrieval time separately.
To backfill, work through the dates your application needs and persist each validated result. Keep daily and intraday records distinct, and make writes idempotent so that rerunning a request updates the intended candle instead of creating duplicates. Use the documented request options and any applicable plan restrictions to decide how to schedule the work.
For a date-range time-series request, end_date cannot be today. End a historical range before today and use an appropriate current-data request separately. Check the documentation for request date limits and how to split longer ranges; do not assume that one request covers your entire history or that a requested date necessarily has data.
Handle gaps without manufacturing candles
Trading calendars include weekends and market holidays. A requested date may therefore have no trading candle, and an incomplete or unavailable response should not automatically become an all-zero candle or a copy of the prior close. Preserve the distinction between “no session,” “not yet retrieved,” and “retrieval failed” in your storage and charting logic.
Do not infer the calendar solely from missing data: a gap can also be caused by a request failure, coverage, or a plan restriction. Check the relevant market calendar and endpoint behavior, then decide whether your chart should omit the interval or display an explicit gap. For research pipelines, retain that status so that downstream return calculations do not mistake a missing observation for an unchanged market.
Intraday candles need similar care around session boundaries and partial intervals. Confirm whether the endpoint returns an in-progress candle and whether historical candles can be revised before deciding when a bar is final. If that behavior is important to an alert or a trading decision, validate it against the documentation and observed responses.
Keep dashboards and alerts fresh
Latest-data update frequency depends on the subscription plan; the service describes updates at intervals including every 60 minutes and every 10 minutes. Polling more often than the available update frequency does not necessarily produce newer market data. Check your plan and the documentation for the applicable cadence before setting a refresh schedule.
Cache a successful response with its provider timestamp and your own retrieval time. Use the provider timestamp to assess the age of the data and the retrieval time to diagnose your integration. A successful fetch can still contain data older than your application’s freshness threshold.
For a move alert, compare values expressed in the same direction and base, and evaluate only when your freshness checks pass. Record the observation used to trigger the alert so a later response or a cache refresh does not obscure the calculation. If the data is stale or absent, surface that state instead of reporting that no move occurred.
For a daily or intraday chart, cache by the attributes that define the requested series, including the symbol, date, interval where applicable, and quote basis. Historical data and an in-progress session may need different refresh policies. Confirm the provider’s revision behavior before treating a cached candle as permanently final.
When exploring integration options, the MCP page provides a separate starting point; use the endpoint documentation as the reference for the REST requests and fields in your application.
FAQ
Can I create CSI1000 OHLC candles from the latest response?
Not from one latest quote. A candle requires observations over a defined period, including its open, high, low, and close. Use the OHLC or intraday endpoint for the corresponding candle data.
Does a weekend date always return a candle?
Do not assume it does. Weekends and market holidays can be non-trading days; check the relevant calendar and handle missing data without filling it with invented values.
Can a historical time-series request end today?
No. end_date cannot be today for that request. Use a completed end date and retrieve current data separately when needed.
Is the timestamp the same as the candle date?
Not necessarily. The latest response provides a Unix timestamp and a separate date. Candle dates and interval timestamps have endpoint-specific meanings, so confirm their timezone and boundary conventions before aligning series.
Ready to test the integration? Visit Register to get a free Indices-API key, then run the latest request and verify the CSI1000 fields before building your candle backfill.