success to false and returns an error object with a machine-readable code and a human-readable message. All error responses follow the same envelope described in Response format.
Error code reference
| Error code | Status | Meaning |
|---|---|---|
MISSING_API_KEY | 401 | Authorization header is missing or malformed |
INVALID_API_KEY | 401 | API key not found or has been revoked |
PLAN_REQUIRED | 403 | Endpoint requires a higher-tier plan |
QUOTA_EXCEEDED | 429 | Monthly call limit reached |
NOT_FOUND | 404 | Route or resource does not exist |
SERVER_ERROR | 500 | Unexpected error on the server |
Troubleshooting
MISSING_API_KEY — 401
MISSING_API_KEY — 401
What it means: Your request did not include an All endpoints except
Authorization header, so the API cannot identify your account.How to fix it: Add your API key to every request using the Authorization header with the Bearer scheme:/health require authentication. If you are using an HTTP client or library, check that it is not stripping the Authorization header on redirects. Some clients drop headers by default when following a 301 or 302 response.INVALID_API_KEY — 401
INVALID_API_KEY — 401
What it means: The key in your
Authorization header was not recognised. This happens when the key does not exist, has been deleted, or has been revoked.How to fix it:- Open your developer dashboard and confirm the key is still active.
- Copy the key value directly from the dashboard to rule out a typo or truncation.
- Check that you are using the full key, including the
ngm_live_prefix. - If you recently rotated or deleted a key, update all integrations that used the old one.
PLAN_REQUIRED — 403
PLAN_REQUIRED — 403
What it means: The endpoint you called requires a higher plan than your current one. The error response includes How to fix it:
required_plan and current_plan so you know exactly what is needed:- Check the Plans page to see which endpoints each tier unlocks.
- Upgrade to at least the plan named in
required_planfrom your developer dashboard. - If you think you are already on the required plan, confirm your plan tier in the dashboard.
QUOTA_EXCEEDED — 429
QUOTA_EXCEEDED — 429
What it means: Your account has used all of its monthly API calls. No further requests will succeed until your quota resets or you upgrade. This error includes a How to fix it:
meta object so you can confirm the reset date:- Wait for the reset. Your quota resets on the 1st of the next month at midnight UTC. The exact time is in
meta.reset_at. - Upgrade your plan. Log in to your developer dashboard and select a higher plan. Upgrades take effect immediately. See Plans for limits and pricing.
meta.calls_remaining and reduce usage or upgrade before you hit zero.NOT_FOUND — 404
NOT_FOUND — 404
What it means: The URL path you requested does not match any route on the API.How to fix it:
- Check the API Reference to confirm the correct path and HTTP method.
- Make sure any path parameters like
:symbolare substituted correctly, for example/v1/companies/DANGCEMnot/v1/companies/:symbol. - Confirm you are using the correct base URL:
https://api.ngnmarket.com. - Check for trailing slashes or typos. Paths are case-sensitive.
SERVER_ERROR — 500
SERVER_ERROR — 500
What it means: An unexpected error occurred on the NGN Market servers. This is not caused by your request and does not count against your quota.How to fix it:
- Retry the request after a short delay. Most server errors are transient.
- If the error persists for several minutes, check the NGN Market status page for any active incidents.
- If you can reliably reproduce the error, report it to support with the endpoint, request details, and approximate time of the failure.
Frequently asked questions
Will I be charged for failed requests?
Will I be charged for failed requests?
It depends on the error. Requests that fail authentication (
MISSING_API_KEY or INVALID_API_KEY) and requests blocked for exceeding your quota (QUOTA_EXCEEDED) do not count against your limit. Requests that pass authentication and quota checks but return PLAN_REQUIRED, NOT_FOUND, or SERVER_ERROR are counted because they were already validated.Can I get notified before I run out of calls?
Can I get notified before I run out of calls?
The API does not send proactive notifications, but you can build your own alerting by reading
meta.calls_remaining in every response. When it falls below a threshold you define, trigger an alert in your application or monitoring system.I'm getting 401 even though my key looks correct. What should I try?
I'm getting 401 even though my key looks correct. What should I try?
Confirm the header is formatted exactly as
Authorization: Bearer ngm_live_YOUR_KEY with a single space after Bearer. Some HTTP clients modify or strip headers. Log the outgoing request headers to verify they are sent correctly, and check that no whitespace or newline characters were introduced when copying the key.