> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daya.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Account

> Get account information for the authenticated user

## 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

<ParamField header="X-Api-Key" type="string" required>
  Your API key with Read scope

  ```
  X-Api-Key: daya_sk_YOUR_API_KEY
  ```
</ParamField>

## Request Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.pro.daya.co/public/v1/account \
    --header 'X-Api-Key: daya_sk_YOUR_API_KEY'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.pro.daya.co/public/v1/account', {
    headers: {
      'X-Api-Key': 'daya_sk_YOUR_API_KEY'
    }
  });

  const result = await response.json();
  console.log('Account:', result.data);
  ```

  ```python Python theme={null}
  import requests

  headers = {'X-Api-Key': 'daya_sk_YOUR_API_KEY'}

  response = requests.get(
      'https://api.pro.daya.co/public/v1/account',
      headers=headers
  )

  result = response.json()
  print(f"Account: {result['data']}")
  ```

  ```go Go theme={null}
  package main

  import (
      "encoding/json"
      "fmt"
      "net/http"
  )

  func main() {
      client := &http.Client{}
      req, _ := http.NewRequest("GET", "https://api.pro.daya.co/public/v1/account", nil)
      req.Header.Add("X-Api-Key", "daya_sk_YOUR_API_KEY")

      resp, err := client.Do(req)
      if err != nil {
          panic(err)
      }
      defer resp.Body.Close()

      var data map[string]interface{}
      json.NewDecoder(resp.Body).Decode(&data)
      fmt.Println(data["data"])
  }
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean" required>
  Indicates if the request was successful
</ResponseField>

<ResponseField name="message" type="string" required>
  Human-readable response message
</ResponseField>

<ResponseField name="data" type="object" required>
  Account information

  <Expandable title="account properties">
    <ResponseField name="id" type="string">
      User ID (UUID)

      **Example:** `770e8400-e29b-41d4-a716-446655440000`
    </ResponseField>

    <ResponseField name="email" type="string">
      Account email address

      **Example:** `user@example.com`
    </ResponseField>

    <ResponseField name="name" type="string">
      Account display name

      **Example:** `John Doe`
    </ResponseField>

    <ResponseField name="status" type="string">
      Account status

      **Values:** `active`, `suspended`, `frozen`
    </ResponseField>

    <ResponseField name="trading_enabled" type="boolean">
      Whether the account is enabled for trading
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 account creation timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="timestamp" type="string">
  ISO 8601 timestamp of the response
</ResponseField>

### Success Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "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"
  }
  ```
</ResponseExample>

## Error Responses

### 401 Unauthorized

<ResponseExample>
  ```json 401 Unauthorized theme={null}
  {
    "success": false,
    "message": "Unauthorized",
    "error": {
      "code": "API_KEY_INVALID",
      "message": "Invalid or missing API key"
    },
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```
</ResponseExample>

**Common causes:**

* Missing `X-Api-Key` header
* Invalid API key format
* API key has been revoked

### 403 Forbidden

<ResponseExample>
  ```json 403 Forbidden theme={null}
  {
    "success": false,
    "message": "Forbidden",
    "error": {
      "code": "API_KEY_INVALID_SCOPE",
      "message": "Insufficient scope for this operation"
    },
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```
</ResponseExample>

**Common causes:**

* API key does not have Read scope

## Rate Limits

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

## Next Steps

<CardGroup cols={2}>
  <Card title="Get Balances" icon="wallet" href="/pro/api-reference/get-balances">
    View your account balances
  </Card>

  <Card title="Place Order" icon="arrow-right-arrow-left" href="/pro/api-reference/place-order">
    Start trading
  </Card>
</CardGroup>
