Skip to main content

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 grant access to your Daya Pro account. Treat them like passwords: never expose them in client-side code, share them publicly, or commit them to version control.

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.
Store your API key securely. The full key is only shared once. If you lose it, you’ll need to request a new key.

Key Format

All Pro API keys use this format:
Example: 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.
Trade keys authorize fund movement. Only store Trade-scoped keys in trusted server-side systems that are allowed to place orders and initiate withdrawals from the account.

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 the X-Api-Key header:

Public Endpoints

Some endpoints don’t require authentication:

Security Best Practices

Use environment variables or secret management systems:
.env
Never hardcode keys in source code or commit them to Git.
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
Create separate keys for different use cases.

Error Responses

401 Unauthorized

Missing or invalid API key:
Common causes:
  • Missing X-Api-Key header
  • Invalid key format (must start with daya_sk_)
  • Key has been revoked

403 Forbidden

Insufficient permissions:
Common causes:
  • 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:
Expected response:

Next Steps

Quick Start

Place your first order

API Reference

Explore all endpoints