Key Management
Never Expose Private Keys
Bad:Use Environment Variables
.env
Separate API Keys
Create different API keys for different purposes:- Trading: Limited to order placement
- Withdrawals: Separate key for withdrawals
- Read-only: For monitoring only
Operational Security
Validate Inputs
Implement Rate Limiting
Monitor Margin Health
Network Security
Use HTTPS Endpoints
Always use HTTPS for API endpoints:Verify TLS Certificates
Ensure your environment verifies TLS certificates (enabled by default in Node.js).Related
Error Handling
Handle errors gracefully
Wallets Guide
Secure wallet management