API Key Authentication
All Wallbit API endpoints require authentication using an API key. You must include your API key in theX-API-Key header with every request.
Getting your API Key
- Log in to your Wallbit account (in the app or in the Wallbit Dashboard)
- Navigate to Settings → API Keys
- Click Create New API Key
- Copy and securely store your API key
Using your API Key
Include theX-API-Key header in all requests:
API Key Permissions
When creating an API key, you can configure the following permissions:| Permission | Description |
|---|---|
read | Query balances, transactions, and account details |
trade | Execute buy and sell orders for stocks |
Start with the minimum permissions you need. You can always create additional keys with different permission sets for different use cases.
Security Best Practices
Environment Variables
Environment Variables
Store your API key in environment variables, not in your code:Then access it in your application:
Key Rotation
Key Rotation
Rotate your API keys periodically. You can have multiple active keys to enable zero-downtime rotation:
- Create a new API key
- Update your applications to use the new key
- Verify everything works
- Revoke the old key
Separate Keys per Environment
Separate Keys per Environment
Use different API keys for development, staging, and production environments. This limits the blast radius if a key is compromised.
Authentication Errors
If your API key is invalid or missing, you’ll receive a401 Unauthorized response:
View Error Codes
See all possible error responses and how to handle them.

