GET /companies(Free plan) — fetch prices for all or filtered stocksGET /companies/:symbol(Starter plan) — fetch a single stock’s full quote
How it works
- Fetch current prices on page load
- Re-fetch on a fixed interval (5 minutes recommended)
- Display the updated values — highlight the change direction if you like
- Stop polling when the user leaves or the page unmounts
last_updated field in every response tells you exactly when the price was last written, so you can show users how fresh the data is.
Fetch prices for a watchlist
UseGET /companies with a search or sector filter, or just fetch the full list and filter client-side.
Sample response (trimmed)
Poll on an interval (vanilla JavaScript)
JavaScript
React component
React
Tips
Choose the right polling interval. Data refreshes every 20 minutes during trading hours, so polling more frequently than every 5 minutes won’t give you fresher prices — it just uses quota. Outside trading hours you can stop polling entirely. Checklast_updated before re-rendering. If the timestamp hasn’t changed since your last poll, the price hasn’t moved and you can skip the DOM/state update.
Only poll during trading hours. NGX trades Monday–Friday, 09:00–16:00 WAT. You can detect this client-side and pause the interval outside those windows:
JavaScript
Companies list reference
All parameters for
GET /companiesCompany detail reference
Full quote fields from
GET /companies/:symbol