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"
}
}Year-to-date stock returns
Ranks NGX-listed stocks by their year-to-date return, from the first available trading day of the year through the most recent session. Request the best performers, worst performers, or both. Historical years are supported via the year parameter.
Plan required: Pro
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"
}
}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