Year-to-date stock returns
curl --request GET \
--url https://api.ngnmarket.com/v1/market/ytd-performers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ngnmarket.com/v1/market/ytd-performers"
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/market/ytd-performers', 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/market/ytd-performers",
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/market/ytd-performers"
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/market/ytd-performers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ngnmarket.com/v1/market/ytd-performers")
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": {
"type": "best",
"year": 2026,
"is_past_year": false,
"year_start_date": "2026-01-02",
"total": 2,
"data": [
{
"symbol": "OKOMUOIL",
"company_name": "Okomu Oil Palm",
"sector": "Agriculture",
"year_start_price": 275,
"year_start_date": "2026-01-02",
"current_price": 400.7,
"end_date": "2026-04-17",
"ytd_pct": 45.71
},
{
"symbol": "DANGCEM",
"company_name": "Dangote Cement",
"sector": "Industrial Goods",
"year_start_price": 210,
"year_start_date": "2026-01-02",
"current_price": 302.5,
"end_date": "2026-04-17",
"ytd_pct": 44.05
}
]
},
"meta": {
"plan": "pro",
"calls_used": 212,
"calls_remaining": 249788,
"reset_at": "2026-05-15T23:57:00.000Z"
}
}Market Endpoints
YTD Performers
Retrieve the best or worst performing NGX stocks year-to-date, with start price, current price, and percentage return.
GET
/
market
/
ytd-performers
Year-to-date stock returns
curl --request GET \
--url https://api.ngnmarket.com/v1/market/ytd-performers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ngnmarket.com/v1/market/ytd-performers"
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/market/ytd-performers', 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/market/ytd-performers",
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/market/ytd-performers"
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/market/ytd-performers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ngnmarket.com/v1/market/ytd-performers")
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": {
"type": "best",
"year": 2026,
"is_past_year": false,
"year_start_date": "2026-01-02",
"total": 2,
"data": [
{
"symbol": "OKOMUOIL",
"company_name": "Okomu Oil Palm",
"sector": "Agriculture",
"year_start_price": 275,
"year_start_date": "2026-01-02",
"current_price": 400.7,
"end_date": "2026-04-17",
"ytd_pct": 45.71
},
{
"symbol": "DANGCEM",
"company_name": "Dangote Cement",
"sector": "Industrial Goods",
"year_start_price": 210,
"year_start_date": "2026-01-02",
"current_price": 302.5,
"end_date": "2026-04-17",
"ytd_pct": 44.05
}
]
},
"meta": {
"plan": "pro",
"calls_used": 212,
"calls_remaining": 249788,
"reset_at": "2026-05-15T23:57:00.000Z"
}
}The YTD performers endpoint ranks NGX-listed stocks by their year-to-date return, calculated from the first available trading day of the year through to the most recent session.
You can request the best performers, the worst performers, or both together. Each entry includes the year-start price and date, the current closing price, and the total percentage return for the year so far. Historical years are also supported via the
year parameter, making this endpoint useful for annual reviews as well as live tracking.
For example, to pull the 20 worst performers of 2025:
curl "https://api.ngnmarket.com/v1/market/ytd-performers?type=worst&year=2025&limit=20" \
-H "Authorization: Bearer ngm_live_YOUR_KEY"
const url = new URL('https://api.ngnmarket.com/v1/market/ytd-performers');
url.searchParams.set('type', 'worst');
url.searchParams.set('year', '2025');
url.searchParams.set('limit', '20');
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/market/ytd-performers',
params={'type': 'worst', 'year': 2025, 'limit': 20},
headers={'Authorization': 'Bearer ngm_live_YOUR_KEY'},
)
data = res.json()['data']
Authorizations
Pass your API key as a Bearer token: Authorization: Bearer ngm_live_YOUR_KEY.
Generate keys at ngnmarket.com/dashboard/developer.
Query Parameters
Performance direction to return. Defaults to best.
Available options:
best, worst Number of stocks to return. Maximum 30.
Required range:
1 <= x <= 30Calendar year to evaluate (e.g. 2025). Defaults to the current year. Provide a past year to query historical annual performance.
Example:
2026