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

> Retrieve account balance for a specific currency

## Overview

Get the current balance for a specific currency in your Pro account. This endpoint requires authentication with an API key that has **Read** scope.

<Info>
  **Unified Balance:** USDT, USDC, and USD are all mapped to a single unified USD balance. Use `USD` to retrieve your dollar balance.
</Info>

## Authentication

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

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

## Path Parameters

<ParamField path="currency" type="string" required>
  Currency code to retrieve balance for

  **Example:** `USD`, `NGN`
</ParamField>

## Request Examples

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

  ```javascript JavaScript theme={null}
  const currency = 'USD';

  const response = await fetch(
    `https://api.pro.daya.co/public/v1/balances/${currency}`,
    {
      headers: {
        'X-Api-Key': 'daya_sk_YOUR_API_KEY'
      }
    }
  );

  const result = await response.json();
  console.log(result.data);
  ```

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

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

  response = requests.get(
      f'https://api.pro.daya.co/public/v1/balances/{currency}',
      headers=headers
  )

  result = response.json()
  print(result['data'])
  ```

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

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

  func main() {
      currency := "USD"
      url := fmt.Sprintf("https://api.pro.daya.co/public/v1/balances/%s", currency)

      client := &http.Client{}
      req, _ := http.NewRequest("GET", url, 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>
  Balance object

  <Expandable title="balance properties">
    <ResponseField name="currency" type="string">
      Currency code

      **Example:** `USD`
    </ResponseField>

    <ResponseField name="total_balance" type="string">
      Total balance (available + held)

      **Example:** `1500.00`
    </ResponseField>

    <ResponseField name="available_balance" type="string">
      Available balance (can be used for trading)

      **Example:** `1000.00`
    </ResponseField>

    <ResponseField name="held_balance" type="string">
      Held balance (locked in open orders)

      **Example:** `500.00`
    </ResponseField>

    <ResponseField name="used_credit" type="string">
      Outstanding credit debt

      **Example:** `0.00`
    </ResponseField>

    <ResponseField name="held_credit" type="string">
      Credit held in open orders

      **Example:** `0.00`
    </ResponseField>

    <ResponseField name="available_credit" type="string">
      Available credit to use

      **Example:** `0.00`
    </ResponseField>

    <ResponseField name="credit_limit" type="string">
      Total credit limit

      **Example:** `0.00`
    </ResponseField>

    <ResponseField name="usd_rate" type="string">
      Current USD exchange rate for this currency

      **Example:** `1.00`
    </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": "Balance retrieved successfully",
    "data": {
      "currency": "USD",
      "total_balance": "1500.00",
      "available_balance": "1000.00",
      "held_balance": "500.00",
      "used_credit": "0.00",
      "held_credit": "0.00",
      "available_credit": "0.00",
      "credit_limit": "0.00",
      "usd_rate": "1.00"
    },
    "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
* User account is suspended

### 404 Not Found

<ResponseExample>
  ```json 404 Not Found theme={null}
  {
    "success": false,
    "message": "Currency not found",
    "error": {
      "code": "NOT_FOUND",
      "message": "The specified currency does not exist"
    },
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```
</ResponseExample>

**Common causes:**

* Invalid currency code
* Currency not supported on the platform

## 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">
    Get all currency balances at once
  </Card>

  <Card title="Place Order" icon="arrow-right-arrow-left" href="/pro/api-reference/place-order">
    Use your balance to place trades
  </Card>
</CardGroup>
