Overview
Pro API uses secret bearer API keys for authentication. Each key is tied to your user account and has configurable permission scopes.API Keys
Generating Keys
API keys are 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
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
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: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 and treasury automation: Use Trade scope only for systems allowed to place orders and initiate withdrawals
- Webhook management: Contact support to configure Pro webhook setup and 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