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

# Account Balance

> Retrieves the current balance and account details for a specific account.

Fetches comprehensive account balance information including available balance, account balance, account status, and account details.

## Request Headers

<ParamField header="X-Auth-Token" type="string" required>
  The **JWT Access Token** obtained from the `/login` or `/refresh-token` endpoint.
</ParamField>

<ParamField header="x-fapi-auth-date" type="string" required>
  The date and time at which the request was initiated (ISO 8601 format).
</ParamField>

<ParamField header="x-fapi-customer-ip-address" type="string" required>
  The IP address of the customer making the request.
</ParamField>

<ParamField header="x-fapi-interaction-id" type="string" required>
  Unique identifier for the interaction/session.
</ParamField>

## Path Parameters

<ParamField path="account_id" type="string" required>
  The unique identifier (UUID) of the account to query.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://{domain}.fincode.software/api/v6/services/ledger/account-balance/123e4567-e89b-12d3-a456-426614174000' \
  --header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
  --header 'x-fapi-auth-date: 2024-01-15T10:30:00Z' \
  --header 'x-fapi-customer-ip-address: 192.168.1.1' \
  --header 'x-fapi-interaction-id: interaction-12345'
  ```

  ```javascript Node.js theme={null}
  const axios = require('axios');

  const BASE_URL = 'https://{domain}.fincode.software/api/v6/services/ledger';

  async function getAccountBalance(accessToken, accountId) {
    try {
      const response = await axios.get(
        `${BASE_URL}/account-balance/${accountId}`,
        {
          headers: {
            'X-Auth-Token': accessToken,
            'x-fapi-auth-date': new Date().toISOString(),
            'x-fapi-customer-ip-address': '192.168.1.1',
            'x-fapi-interaction-id': `interaction-${Date.now()}`,
          },
        }
      );

      const balance = response.data.data;
      console.log('Account Balance:', balance.accountBalance);
      console.log('Available Balance:', balance.availableBalance);
      console.log('Currency:', balance.currencyCode);
      console.log('Status:', balance.accountStatus);

      return balance;
    } catch (error) {
      console.error(
        'Failed to fetch account balance:',
        error.response?.data || error.message
      );
      throw error;
    }
  }

  ```
</CodeGroup>


## OpenAPI

````yaml GET /ledger/account-balance/{account_id}
openapi: 3.0.0
info:
  title: FinCode API
  version: v6
servers:
  - url: https://{tenant}.fincode.software/api/v6/services
    description: API v6
    variables:
      tenant:
        default: remitjunction
        description: Enter your tenant subdomain
  - url: https://{tenant}.fincode.software/api/v1/services
    description: API v1
    variables:
      tenant:
        default: finlend
        description: Enter your tenant subdomain
  - url: https://api.stag.songhaiexchange.io
    description: Songhai Exchange API
security: []
paths:
  /ledger/account-balance/{account_id}:
    get:
      summary: Account Balance
      description: >-
        Retrieves the current balance and account details for a specific
        account.
      operationId: getAccountBalance
      parameters:
        - $ref: '#/components/parameters/platformHeader'
        - $ref: '#/components/parameters/uuidHeader'
        - in: header
          name: X-Auth-Token
          schema:
            type: string
          required: true
        - in: path
          name: account_id
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Account balance details
components:
  parameters:
    platformHeader:
      in: header
      name: platform
      schema:
        type: string
        default: fincode
      required: true
    uuidHeader:
      in: header
      name: uuid
      schema:
        type: string
        default: '200'
      required: true

````