Skip to main content
Every response from the NGN Market API follows the same JSON structure whether the request succeeds or fails. This means you can write one response-handling layer in your application and rely on the same fields being present for every endpoint.

Successful response

Top-level fields

The meta object

Check meta.calls_remaining in your app so you can detect when you are close to your limit before hitting it.

Error response

When a request fails, success is false and the response includes an error object instead of data.

Error object fields

The QUOTA_EXCEEDED error (429) includes both an error object and a meta object so you can still read your quota state when you are over the limit. See Rate limits for the full example.

Handling responses in code

Check success first, then branch on error.code for specific handling:
For a full list of error codes and how to resolve each one, see Errors.