Authentication & API Keys
All programmatic requests to protected TTX developer endpoints require a cryptographically generated API key with explicitly scoped permissions.
API Key Format
TTX API keys are generated using 16 cryptographically secure random bytes prefixed with ttx_live_:
The plaintext key secret is displayed strictly once upon creation in the Developer Console. The platform never exposes or logs this raw key again.
SHA-256 Storage Security
The TTX database never stores plaintext API secrets. Only the SHA-256 hash of the key is persisted:
Authentication Headers
Pass your API key using the X-TTX-API-KEY header on every request:
curl -X GET "https://api.ttx.trade/api/v1/developer/profile" \
-H "X-TTX-API-KEY: ttx_live_3f9a7c2b..." \
-H "Accept: application/json"
Developer Scopes
Each API key is assigned granular scopes that restrict its access to specific modules:
| Scope | Granted Operations | Restrictions |
|---|---|---|
| indicators:read | Query indicator catalogue, versions, and schemas | Read-only |
| indicators:validate | Validate parameters against data dependencies | Validation only |
| scripts:compile | Compile TTX-IR AST and run sandbox execution | Max 3,000ms execution limit |
| scripts:read | Inspect personal custom indicator source code | Tenant-isolated |
| webhooks:manage | Register, test, and manage outbound webhooks | Requires HTTPS endpoint |
| analytics:read | Retrieve developer API usage and error logs | Tenant-isolated |
⚠️ Zero Trading Permissions Guarantee
Developer API keys are strictly partitioned from all financial execution layers. A developer key cannot place orders, modify positions, withdraw funds, or access broker execution APIs. Any request containing an X-TTX-API-KEY on trading routes is rejected with HTTP 403 Forbidden.
