Skip to main content
GET
/
public
/
v1
/
account
Get Account
curl --request GET \
  --url https://api.pro.daya.co/public/v1/account \
  --header 'X-Api-Key: <x-api-key>'
{
  "success": true,
  "message": "Account retrieved successfully",
  "data": {
    "id": "770e8400-e29b-41d4-a716-446655440000",
    "email": "user@example.com",
    "name": "John Doe",
    "status": "active",
    "trading_enabled": true,
    "created_at": "2024-01-01T00:00:00Z"
  },
  "timestamp": "2024-01-15T10:30:00Z"
}

Overview

Retrieve account information for the authenticated user, including account status and profile details. This endpoint requires authentication with an API key that has Read scope.

Authentication

X-Api-Key
string
required
Your API key with Read scope
X-Api-Key: daya_sk_YOUR_API_KEY

Request Examples

curl --request GET \
  --url https://api.pro.daya.co/public/v1/account \
  --header 'X-Api-Key: daya_sk_YOUR_API_KEY'

Response

success
boolean
required
Indicates if the request was successful
message
string
required
Human-readable response message
data
object
required
Account information
timestamp
string
ISO 8601 timestamp of the response

Success Response

{
  "success": true,
  "message": "Account retrieved successfully",
  "data": {
    "id": "770e8400-e29b-41d4-a716-446655440000",
    "email": "user@example.com",
    "name": "John Doe",
    "status": "active",
    "trading_enabled": true,
    "created_at": "2024-01-01T00:00:00Z"
  },
  "timestamp": "2024-01-15T10:30:00Z"
}

Error Responses

401 Unauthorized

{
  "success": false,
  "message": "Unauthorized",
  "error": {
    "code": "API_KEY_INVALID",
    "message": "Invalid or missing API key"
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
Common causes:
  • Missing X-Api-Key header
  • Invalid API key format
  • API key has been revoked

403 Forbidden

{
  "success": false,
  "message": "Forbidden",
  "error": {
    "code": "API_KEY_INVALID_SCOPE",
    "message": "Insufficient scope for this operation"
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
Common causes:
  • API key does not have Read scope

Rate Limits

  • 100 requests per minute per API key
  • Requires Read scope

Next Steps

Get Balances

View your account balances

Place Order

Start trading