API key authentication
Send your developer API key on every authenticated request using either header:Common scopes
| Scope | Typical use |
|---|---|
read:agents / write:agents | Agent CRUD, webhook provisioning |
read:strategies / write:strategies | Strategy configuration |
read:wallet / write:wallet | Balances, virtual mode |
read:trades | Trade and signal history |
read:earn | Earnings and claims |
Optional REST HMAC signing
For server-to-server integrations, sign requests with the API secret returned when the key was created. HMAC is opt-in: whenx-signature is omitted, verification is skipped.
| Header | Description |
|---|---|
x-api-key | Your API key id (ez_live_...) |
x-signature | HMAC-SHA256(secretKey, stringToSign) as lowercase hex |
x-timestamp | Epoch milliseconds; rejected if drift exceeds 5 minutes |
String to sign
METHOD- uppercase HTTP verb (GET,POST, …)path- full request path including query string (e.g./api/v1/developers/earnings)body- raw JSON string for POST/PUT/PATCH, or empty string when there is no body
curl example (GET)
curl example (POST)
Python (echozero-sdk)
hmac=True on each request to sign it, or omit when HMAC is not needed.
TypeScript (echozero-sdk)
signRestRequest:
HMAC error responses
| Condition | HTTP | Message |
|---|---|---|
x-signature present, no x-timestamp | 401 | Missing x-timestamp header |
| Non-numeric timestamp | 401 | Invalid x-timestamp value |
| Timestamp > 5 min drift | 401 | Request timestamp expired |
| Wrong signature | 401 | Invalid HMAC signature |
| Key has no secret | 401 | API key does not support HMAC signing |
MCP authentication
API keys (with optional HMAC) work onPOST https://mcp.echozero.app/mcp the same way as REST. Send x-api-key or Authorization: Bearer on every MCP call, including initialize. See the MCP Server guide.