# Balance History

The Balance History component displays a user's deposit and withdrawal transactions.

**Component Overview**

* **Purpose:** To present a detailed view of a user's transaction history related to deposits and withdrawals.
* **Features:**
  * Display of each transaction's action, amount, and timestamp.
  * User-friendly messages for empty or loading states.

**Usage**

This component is displayed in the "My Account" page of the application.&#x20;

**Key Hooks and Functionalities**

* **State Management Hooks:**
  * `useActiveAccountAddress` for fetching the address of the currently active account.
  * `useBalanceHistory` and `useGetBalanceHistoryCallback` for retrieving and displaying the balance history data.
* **Effect Hooks:**
  * Fetch balance history data upon component mount or when the active sub-account changes.
  * Set the loading state based on the presence of balance history data.

**Interactive Elements**

* **Header:** Displays column headers for "Action", "Amount", and "Time", indicating the data presented.
* **ItemsContainer:** Contains the individual transaction records, each rendered by the `HistoryData` component.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://symmdocs.gitbook.io/frontend-sdk-technical-docs/frontend-sdk/cloverfield-app/components/balance-history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
