Skip to main content
1

Get an API key

If you don’t already have one, sign up or log in at ngnmarket.com, go to your developer dashboard, and click Generate API key. The same key you use for REST calls works here too, so there’s no separate credential to generate.
Free accounts can hold 1 concurrent WebSocket connection. See Limits for the full breakdown by plan.
2

Connect to a channel

Start with /v1/ws/snapshot. It takes no parameters, so it’s the fastest way to see a message come through.
3

Read the first message

The moment you connect, you’ll get a snapshot message with the current data:
After that you won’t hear from it again until the data actually changes. When it does change, you get an update message with the same shape. Each channel’s own page explains exactly what’s in its payload. See the channel list.
4

Try a channel with parameters

/v1/ws/prices is the one channel that requires a query parameter: a comma-separated symbols list. A live feed of every NGX-listed company at once isn’t useful to most integrations, so you pick the tickers you want.
Node.js
Omit symbols, ask for an unknown ticker, or request more symbols than your plan allows, and the connection fails immediately with a specific error. See Prices and Errors.
Your API key is visible in the connection URL. In a production app, don’t connect to a WebSocket channel directly from browser code. Proxy the connection through your own backend instead, the same way you’d avoid shipping a REST API key in frontend code.See Proxy a WebSocket connection through your backend for a working example.

Next steps

Authentication

Why the key is a query parameter, and how rejections work

All channels

Prices, snapshot, indices, forex, disclosures, dividends

Limits

Concurrent connections and symbol caps by plan

Errors

Every WebSocket-specific error code, and how to fix it