Skip to main content
GET
/
companies
/
{symbol}
/
chart
Historical price series
curl --request GET \
  --url https://api.ngnmarket.com/v1/companies/{symbol}/chart \
  --header 'Authorization: Bearer <token>'
{
  "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-01T00:00:00.000Z"
  }
}
The chart endpoint returns the complete OHLCV (open, high, low, close, volume) history for a company sourced directly from daily exchange records. Each data point includes a timestamp, date, and full OHLCV fields alongside VWAP (volume-weighted average price), trade count, and daily change. 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. Includes price as an alias for close for backward compatibility, plus open, 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.
A statistics block summarises the full range — first/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:
curl "https://api.ngnmarket.com/v1/companies/DANGCEM/chart?period=1y&format=ohlcv" \
  -H "Authorization: Bearer ngm_live_YOUR_KEY"

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

Authorization
string
header
required

Pass your API key as a Bearer token: Authorization: Bearer ngm_live_YOUR_KEY. Generate keys at ngnmarket.com/dashboard/developer.

Path Parameters

symbol
string
required

NGX ticker symbol (e.g. DANGCEM). Case-insensitive.

Example:

"DANGCEM"

Query Parameters

period
enum<string>

Preset lookback window. Ignored when from/to are supplied.

Available options:
7d,
30d,
90d,
1y,
5y,
all
from
string<date>

Start date in YYYY-MM-DD format (inclusive). Takes priority over period.

Example:

"2026-01-01"

to
string<date>

End date in YYYY-MM-DD format (inclusive). Use with from.

Example:

"2026-04-17"

format
enum<string>
default:detailed

Response shape for data points.

  • detailed (default): full objects with OHLCV, VWAP, and change fields. Includes price as an alias for close for 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

Response

Price chart data retrieved successfully.

success
boolean
required
meta
object

Quota and plan metadata included on every authenticated response.

data
object