Historical price series
curl --request GET \
--url https://api.ngnmarket.com/v1/companies/{symbol}/chart \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ngnmarket.com/v1/companies/{symbol}/chart"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ngnmarket.com/v1/companies/{symbol}/chart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ngnmarket.com/v1/companies/{symbol}/chart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ngnmarket.com/v1/companies/{symbol}/chart"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ngnmarket.com/v1/companies/{symbol}/chart")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ngnmarket.com/v1/companies/{symbol}/chart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"symbol": "DANGCEM",
"company_name": "Dangote Cement Plc",
"format": "detailed",
"period": "30d",
"count": 2,
"data": [
{
"timestamp": 1744243200000,
"date": "2026-04-10",
"price": 295,
"open": 293,
"high": 297.5,
"low": 292,
"close": 295,
"volume": 3821000,
"value_traded": 1128270500,
"vwap": 295.28,
"trade_count": 289,
"change": -1.5,
"change_percent": -0.5063,
"source": "historical"
},
{
"timestamp": 1744502400000,
"date": "2026-04-13",
"price": 302.5,
"open": 296,
"high": 303,
"low": 295.5,
"close": 302.5,
"volume": 5143000,
"value_traded": 1556300000,
"vwap": 302.54,
"trade_count": 412,
"change": 7.5,
"change_percent": 2.5423,
"source": "historical"
}
],
"statistics": {
"first_price": 295,
"last_price": 302.5,
"min_price": 295,
"max_price": 302.5,
"price_change": 7.5,
"price_change_percent": 2.5423,
"start_date": "2026-04-10",
"end_date": "2026-04-13"
}
},
"meta": {
"plan": "starter",
"calls_used": 4822,
"calls_remaining": 95178,
"reset_at": "2026-05-15T23:57:00.000Z"
}
}Company Endpoints
Price Chart
Retrieve historical price series for an NGX-listed company.
GET
/
companies
/
{symbol}
/
chart
Historical price series
curl --request GET \
--url https://api.ngnmarket.com/v1/companies/{symbol}/chart \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ngnmarket.com/v1/companies/{symbol}/chart"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ngnmarket.com/v1/companies/{symbol}/chart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ngnmarket.com/v1/companies/{symbol}/chart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ngnmarket.com/v1/companies/{symbol}/chart"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ngnmarket.com/v1/companies/{symbol}/chart")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ngnmarket.com/v1/companies/{symbol}/chart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"symbol": "DANGCEM",
"company_name": "Dangote Cement Plc",
"format": "detailed",
"period": "30d",
"count": 2,
"data": [
{
"timestamp": 1744243200000,
"date": "2026-04-10",
"price": 295,
"open": 293,
"high": 297.5,
"low": 292,
"close": 295,
"volume": 3821000,
"value_traded": 1128270500,
"vwap": 295.28,
"trade_count": 289,
"change": -1.5,
"change_percent": -0.5063,
"source": "historical"
},
{
"timestamp": 1744502400000,
"date": "2026-04-13",
"price": 302.5,
"open": 296,
"high": 303,
"low": 295.5,
"close": 302.5,
"volume": 5143000,
"value_traded": 1556300000,
"vwap": 302.54,
"trade_count": 412,
"change": 7.5,
"change_percent": 2.5423,
"source": "historical"
}
],
"statistics": {
"first_price": 295,
"last_price": 302.5,
"min_price": 295,
"max_price": 302.5,
"price_change": 7.5,
"price_change_percent": 2.5423,
"start_date": "2026-04-10",
"end_date": "2026-04-13"
}
},
"meta": {
"plan": "starter",
"calls_used": 4822,
"calls_remaining": 95178,
"reset_at": "2026-05-15T23:57:00.000Z"
}
}The chart endpoint returns daily price history for a company. Each data point includes a timestamp and date, plus close price. Where available, it also includes the full OHLCV fields, VWAP (volume-weighted average price), trade count, and daily change.
How far back you can go depends on your plan. Hobby gets 2 years, Starter gets 5, and Pro, Business, and Enterprise get the full record, which for some companies goes back to the 1990s. If your
A statistics block summarises the full range (first and last price, min, max, and total change) so you can render a summary card without extra computation.
For example, to fetch one year of DANGCEM data in candlestick format:
from date reaches further back than your plan allows, the response doesn’t error, it just returns data starting from the earliest date your plan permits. Check start_date in the statistics block if you need to confirm what you actually got back.
Use from and to (YYYY-MM-DD) to narrow results to a specific date range, or use the period parameter to request a named time window (7d, 30d, 90d, 1y, 5y, all). Three format options let you pick the shape that fits your charting library:
detailed(default): full objects per day. Includespriceas an alias forclosefor backward compatibility, plusopen,high,low,close,volume,value_traded,vwap,trade_count,change,change_percent.chart: compact[timestamp, close]arrays. Backward-compatible with the previous API behaviour, suited for line charts.ohlcv: compact[timestamp, open, high, low, close, volume]arrays. Pass this directly to TradingView Lightweight Charts, ApexCharts, or Highcharts candlestick series.
close is the only field guaranteed to be present on every data point. Depending on the company and date, open, high, low, volume, value_traded, vwap, trade_count, change, and change_percent may come back as null.This means no intraday range data is available for that specific day. It does not mean the day itself is missing or that the value is zero. This applies in both detailed (named fields) and ohlcv (positional array, where a null appears in place of the missing element) formats.When rendering a candlestick chart, check for null before drawing the candle body and fall back to a marker or line segment on the close price for those points. See the candlestick chart guide to understand better.curl "https://api.ngnmarket.com/v1/companies/DANGCEM/chart?period=1y&format=ohlcv" \
-H "Authorization: Bearer ngm_live_YOUR_KEY"
const url = new URL('https://api.ngnmarket.com/v1/companies/DANGCEM/chart');
url.searchParams.set('period', '1y');
url.searchParams.set('format', 'ohlcv');
const res = await fetch(url, {
headers: { Authorization: 'Bearer ngm_live_YOUR_KEY' },
});
const { data } = await res.json();
import requests
res = requests.get(
'https://api.ngnmarket.com/v1/companies/DANGCEM/chart',
params={'period': '1y', 'format': 'ohlcv'},
headers={'Authorization': 'Bearer ngm_live_YOUR_KEY'},
)
data = res.json()['data']
Build a candlestick chart
Step-by-step guide showing how to fetch OHLCV data and render it as an interactive candlestick chart with TradingView Lightweight Charts. Includes a live demo, vanilla JS, and a React component.
Authorizations
Pass your API key as a Bearer token: Authorization: Bearer ngm_live_YOUR_KEY.
Generate keys at ngnmarket.com/dashboard/developer.
Path Parameters
NGX ticker symbol (e.g. DANGCEM). Case-insensitive.
Example:
"DANGCEM"
Query Parameters
Preset lookback window. Ignored when from/to are supplied.
Available options:
7d, 30d, 90d, 1y, 5y, all Start date in YYYY-MM-DD format (inclusive). Takes priority over period.
Example:
"2026-01-01"
End date in YYYY-MM-DD format (inclusive). Use with from.
Example:
"2026-04-17"
Response shape for data points.
detailed(default): full objects with OHLCV, VWAP, and change fields. Includespriceas an alias forclosefor backward compatibility.chart: compact[timestamp, close]arrays — backward-compatible line chart format.ohlcv: compact[timestamp, open, high, low, close, volume]arrays — use this for candlestick charts.
Available options:
detailed, chart, ohlcv