Developer API

Security

How access to market data through SAHMK is protected: key handling, AI assistant connections, rate limits, and how to report a vulnerability.

Our principles

  • A key is shown once

    After creation, only its prefix and last four characters are shown.

  • Revocation is immediate

    Revoke a key and requests made with it stop at once.

  • One set of limits

    REST, WebSocket and the hosted MCP pass the same rate limits and logging.

  • Testing off production

    Test suites run on a separate staging environment.

Source and licensing

SAHMK is a licensed information provider of the Saudi Exchange and is listed in its information providers directory. The data served through the API comes from the market feed under that license.

Check the listing in the Tadawul directory

API keys

A key is shown in full once, when you create it, so store it somewhere safe right away. After that, the dashboard shows only its prefix and last four characters, and so do our internal admin tools.

You can revoke any key at any time from API Keys, and requests made with it stop immediately. The number of active keys depends on your plan.

Use a separate key for each integration or environment, and never put a key in browser-side code or a public repository.

Manage API keys

AI assistant connections (MCP)

AI assistants connect to the hosted MCP server through a consent screen on sahmk.sa, where you choose the key used for requests and see what the assistant can do.

Revoke that key to disconnect at any time. Hosted MCP requests pass the same rate limits and logging as direct API calls.

Rate limits and logging

Each key has rate limits set by its plan, across REST and WebSocket. Requests over the limit get HTTP 429, and WebSocket connections close with code 4429.

Every request is logged against the key that made it, and the dashboard shows usage per key, so unexpected use is easy to spot.

Account protection

The site and developer sign-up are behind an automated bot check that limits scripted accounts and flooding.

If an account is restricted, its existing keys are revoked and new keys can't be created until it has been reviewed.

Operations and changes

Test suites run on a separate staging environment, never on production servers.

API-visible changes are recorded in the changelog, and the daily share of requests without server errors is published on the status page.

Report a vulnerability

Send a description, steps to reproduce, and the affected route or endpoint. Please don't access other accounts' data or disrupt the service while testing. We reply within 3 business days.

If a key has leaked, revoke it from API Keys right away and create a new one.

Report a security issue