> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ngnmarket.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get your API key and make your first NGN Market API request in under five minutes.

<Steps>
  <Step title="Get an API key">
    Sign up or log in at [ngnmarket.com](https://ngnmarket.com), then go to your [developer dashboard](https://ngnmarket.com/developer) and click **Generate API key**.

    Your key starts with `ngm_live_` and is shown only once. Copy it somewhere safe before leaving the page.

    <Note>
      Free accounts include **10,000 API calls per month**. You can upgrade at any time from the dashboard.
    </Note>
  </Step>

  <Step title="Make your first request">
    Call the market snapshot endpoint to get today's NGX summary. This includes ASI, volume, value traded, and market cap.

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.ngnmarket.com/v1/market/snapshot \
        -H "Authorization: Bearer ngm_live_YOUR_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch('https://api.ngnmarket.com/v1/market/snapshot', {
        headers: { 'Authorization': 'Bearer ngm_live_YOUR_KEY' }
      });
      const data = await res.json();
      console.log(data);
      ```

      ```typescript TypeScript theme={null}
      const res = await fetch('https://api.ngnmarket.com/v1/market/snapshot', {
        headers: { 'Authorization': 'Bearer ngm_live_YOUR_KEY' }
      });
      const data: Record<string, unknown> = await res.json();
      console.log(data);
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          'https://api.ngnmarket.com/v1/market/snapshot',
          headers={'Authorization': 'Bearer ngm_live_YOUR_KEY'}
      )
      print(res.json())
      ```
    </CodeGroup>
  </Step>

  <Step title="Read the response">
    A successful call returns HTTP `200` with this structure:

    ```json theme={null}
    {
      "success": true,
      "data": {
        "date": "2026-04-17",
        "asi": 105432.18,
        "volume": 412850000,
        "value_traded": 6213400000,
        "market_cap": 58920000000000
      },
      "meta": {
        "plan": "free",
        "calls_used": 1,
        "calls_remaining": 9999,
        "reset_at": "2026-05-01T00:00:00.000Z"
      }
    }
    ```

    Every response wraps the payload in `data` and includes a `meta` object with your live quota usage. See [Response format](/response-format) for the full spec.
  </Step>
</Steps>

<Warning>
  **Company endpoints are `/v1/companies/:symbol`, not `/v1/stocks/:symbol`.**

  The NGN Market website uses `ngnmarket.com/stocks/SYMBOL` as the URL for company pages, but the API path is `/v1/companies/:symbol`. If you copy the URL pattern from the website, your requests will return `404`.

  Similarly, historical forex data is at `/v1/forex/history` — not `/v1/forex/rates`.

  The API will automatically redirect wrong paths to the correct ones, but you should update your code to call the right URLs directly.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    API key formats, security best practices, and error handling
  </Card>

  <Card title="Plans & Limits" icon="credit-card" href="/plans">
    Endpoint access and monthly call quotas by plan
  </Card>

  <Card title="Market endpoints" icon="chart-line" href="/api-reference/market/snapshot">
    Snapshots, ASI history, top trades, and sector data
  </Card>

  <Card title="Company data" icon="building" href="/api-reference/companies/list">
    Profiles, price charts, and financial statements
  </Card>
</CardGroup>
