Overview
Pro API uses API keys for authentication. Each key is tied to your user account and has configurable permission scopes.API Keys
Generating Keys
Self-service key management coming soon. API keys are currently generated by the Daya team. Contact support@daya.co to request API access and specify the scopes you need.
Key Format
All Pro API keys use this format:daya_sk_xK9mN2pL8qR4sT6vW0yZaBcDeFgHiJkLmNoPqRsTuV
The daya_sk_ prefix helps identify Daya keys in code scanning and secret detection tools.
Permission Scopes
| Scope | Permissions | Use Case |
|---|---|---|
| Read | View orders, trades, account data | Dashboards, analytics, monitoring |
| Trade | Place and cancel orders (includes Read) | Trading bots, automated strategies |
| Write | Manage webhooks (includes Read) | Webhook configuration |
Trade scope automatically includes Read permissions. You don’t need to select both.
Key Limits
- Maximum 10 API keys per user
- Keys can be revoked immediately
Key Status
| Status | Description |
|---|---|
active | Key is valid and operational |
revoked | Key was manually revoked by user |
Revoked keys cannot be reactivated. Create a new key if needed.
Base URL
All Pro API requests use:Making Authenticated Requests
Include your API key in theX-Api-Key header:
Public Endpoints
Some endpoints don’t require authentication:| Endpoint | Description |
|---|---|
GET /public/v1/markets | List all trading markets |
GET /public/v1/markets/{symbol} | Get a specific market |
GET /public/v1/orderbook/{symbol} | Get orderbook snapshot |
GET /public/v1/last-price/{symbol} | Get latest price and 24h change |
GET /public/v1/market-trades/{symbol} | List recent market trades |
Security Best Practices
Store keys securely
Store keys securely
Use environment variables or secret management systems:Never hardcode keys in source code or commit them to Git.
.env
Use minimum required scopes
Use minimum required scopes
Only grant the permissions your application needs:
- Read-only applications (dashboards, analytics): Use Read scope only
- Trading bots: Use Trade scope
- Webhook management: Use Write scope
Error Responses
401 Unauthorized
Missing or invalid API key:- Missing
X-Api-Keyheader - Invalid key format (must start with
daya_sk_) - Key has been revoked
403 Forbidden
Insufficient permissions:- Using Read-only key to place orders (requires Trade scope)
- Using non-Write key to manage webhooks (requires Write scope)
- User account is suspended
Testing Authentication
Verify your API key works:Next Steps
Quick Start
Place your first order
API Reference
Explore all endpoints