Authentication
Authentication
Section titled “Authentication”All TradeX APIs require authentication using API keys.
API Key Authentication
Section titled “API Key Authentication”Getting Your API Keys
Section titled “Getting Your API Keys”- Log in to your TradeX account
- Navigate to API Settings
- Generate a new API key pair
- Save your API key and secret securely
Important: Your API secret is only shown once. Store it securely.
Using API Keys
Section titled “Using API Keys”Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEYOr use API key authentication:
X-API-Key: YOUR_API_KEYX-API-Secret: YOUR_API_SECRETJWT Tokens
Section titled “JWT Tokens”Some services use JWT (JSON Web Tokens) for authentication:
- Authenticate with the Auth Service to get a JWT token
- Include the token in subsequent requests:
Authorization: Bearer YOUR_JWT_TOKENSecurity Best Practices
Section titled “Security Best Practices”- Never share your API keys: Keep them confidential
- Use HTTPS only: Never send API keys over unencrypted connections
- Rotate keys regularly: Update your API keys periodically
- Use IP whitelisting: Restrict API key usage to specific IP addresses
- Monitor usage: Regularly check your API key usage logs
Rate Limiting
Section titled “Rate Limiting”Authenticated requests are subject to rate limits. See the Rate Limiting guide for details.