API Access
Pull C-Trade Analytics data straight into your own models, spreadsheets and systems. Included with the Institutional plan.
Your API keys
{{activeCount()}} of {{state.limits.max_active_keys}} active| Name | Key | Created | Last used | Requests (30d) | |
|---|---|---|---|---|---|
| {{k.name}} | {{k.key_prefix}}… | {{k.created_at | apiDate | date:'d MMM yyyy'}} | {{k.last_used_at ? (k.last_used_at | apiDate | date:'d MMM yyyy, HH:mm') : 'Never'}} | {{k.requests_30d | number}} | Revoked {{k.revoked_at | apiDate | date:'d MMM'}} |
Usage
How to use the API
Base URL
Authentication
Send your key in a header on every request. Never put it in the URL, a web page or a shared spreadsheet; requests with the key in the URL are refused.
Authorization: Bearer era_your_key_here
X-API-Key: era_your_key_here also works. All requests are GET. Responses are JSON ({ "data": [...], "meta": {...} }); add &format=csv for CSV.
Endpoints
| Endpoint | Returns | Parameters |
|---|---|---|
catalog.php | Every dataset and indicator (with date range and number of observations), price symbols and statements | none |
series.php | One indicator over time: [{date, value}] | dataset, indicator (name or id from the catalog), optional from, to (YYYY-MM-DD) |
prices.php | Daily closing prices of a ZSE or VFEX security: [{date, close}] | symbol (e.g. DLTA.ZW, AXIA.VX), optional from, to |
companies.php | Listed companies and their profiles | optional sector, exchange (ZSE, VFEX), company |
financials.php | Income statement, balance sheet or cash flow by year | company, statement (income, balance, cashflow), optional year |
Datasets: {{d}}{{$last ? '' : ', '}}. Call catalog.php for their indicators.
Examples
{{currentExample().code}}
{{currentExample().note}}
Errors and limits
| Status | Meaning |
|---|---|
| 400 | A parameter is missing or invalid (the message says which), or the key was sent in the URL. |
| 401 | The key is missing, wrong or revoked. |
| 403 | The key's owner has no active Institutional plan (plan_required, plan_expired). |
| 404 | Unknown dataset, indicator, symbol or company. |
| 429 | Rate limit reached: {{state.limits.per_minute || 60}} requests a minute or {{(state.limits.per_day || 5000) | number}} a day per key. Wait for the number of seconds in the Retry-After header. Every response reports what's left in X-RateLimit-Remaining-Minute and X-RateLimit-Remaining-Day. |
About the data
- Dates are ISO (
YYYY-MM-DD). Annual figures are dated 31 December of their year. - Financial statements are in full units of the reporting currency, shown per year. Only approved filings are returned.
- ZSE prices are in ZWG from 5 April 2024 and ZWL before that; VFEX prices are in USD.
- Data is updated as it is in the portal. Where stored periods can't be read as dates, they are left out and counted in
meta.skipped_rows.
