Authentication
Create an API key, configure environment variables, choose read-only or trade mode, and understand which tools need credentials.
The server authenticates to Delta's API with an API key + secret, signed locally with HMAC-SHA256. You never paste credentials into the AI model. They live in your client's config and are read at startup.
Which tools need what
| Group | Key required | Trade mode | Examples |
|---|---|---|---|
| Market data (14 tools) | No | No | get_ticker, get_orderbook, get_candles, get_options_chain |
| Account data (13 tools) | Yes, Read Data | No | get_positions, get_wallet_balances, get_fills, bulk_fills_export |
| Trading (13 tools) | Yes, Trading | Yes, DELTA_MCP_MODE=trade | place_order, cancel_order, place_bracket_order, close_all_positions |
If you only want market data, skip key creation entirely. For account reads, a Read Data key is enough. Only create a Trading key if you intend to enable trade mode.
Create your API key
Open API key management
Go to delta.exchange → Account → Manage API Keys.
Choose permissions for your use
For data only, enable Read Data and nothing else — this also limits the blast radius if the key ever leaks. To place orders, enable Trading (a Read Data key cannot trade even in trade mode). Grant only what you need.
(Recommended) Whitelist your IP
Add an IP whitelist so the key only works from your machine. This is required for a Trading key to work. You can revoke the key anytime from the same page; revocation is immediate.
Put the key in your client config
Set the credentials as environment variables in your MCP client config (see Quickstart).
Enabling trade mode
Trading tools register only when you set DELTA_MCP_MODE=trade and your
key has Trading permission. Both turns of the key are required — see
Security. Leave
DELTA_MCP_MODE unset (or read) and the server is read-only no matter what the
key can do.
When trade mode is on, every mutation is dry-runnable and written to an audit log
at ~/.delta-exchange-mcp/audit/ (disable with DELTA_MCP_AUDIT=off).
Environment variables
| Variable | Required | Description |
|---|---|---|
DELTA_API_KEY | For account / trading tools | Your API key (Read Data, or Trading for trade mode). |
DELTA_API_SECRET | For account / trading tools | The matching secret. |
DELTA_MCP_ENV | Yes | Target environment: india_prod (production) or india_testnet (testnet). |
DELTA_MCP_MODE | For trading | trade registers the trading tools (needs a Trading key). Default read is read-only. |
DELTA_MCP_AUDIT | No | Set off to disable the trading audit log. On by default in trade mode. |
DELTA_MCP_AUDIT_FILE | No | Override the audit log path (default ~/.delta-exchange-mcp/audit/). |
Match the key to the environment
A production key only works with india_prod; a testnet key only with
india_testnet. Mixing them produces signature/auth errors. Test trading on
testnet first.
Where your keys live
- Stored only in your local client config file (e.g.
claude_desktop_config.json). - Read into the server subprocess as environment variables at launch.
- Used to sign requests sent directly from your machine to Delta's API.
- Never sent to the AI model or any Delta server beyond the trading API.
More on the security model in Security.
Keep secrets out of shared files
Do not commit a config file containing real credentials to git. Treat the API secret like a password.