> For the complete documentation index, see [llms.txt](https://docs.xyb.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xyb.co/xyb-platform-1/xyb-ledger/integrate-with-xyb-ledger/understanding-the-ledger-structure-charts-accounts-wallets.md).

# Understanding the Ledger Structure: Charts, Accounts, Wallets

Setting up the chart structure is a fundamental step in configuring the ledger, as it provides a framework for organizing accounts, wallets, and transactions into logical and manageable categories. This article explains how to design and implement your chart structure, what components to include, and how to set it up using either CLI commands or the Chart Management APIs.

Charts provide a hierarchical framework for managing accounts and wallets, offering flexibility and clarity in financial operations. Each chart typically corresponds to a business unit, region, or operational category. Here's what goes into a chart:

**Key Components:**

1. **Chart Name:** A unique identifier for the chart, such as `CHART_US` or `CHART_SALES`.
2. **Accounts:** Entities within a chart that represent financial structures, like revenue or expense accounts.&#x20;
3. **Wallets:** Currencies or asset-specific substructures tied to accounts.
4. **Rules and Constraints:** Business logic to enforce specific behaviors, such as preventing negative balances.

### How to approach ledger structure setup

Start by planning your chart structure based on your business needs. Here are some questions to ask:

<table data-header-hidden><thead><tr><th width="268"></th><th></th></tr></thead><tbody><tr><td><strong>What operational divisions are needed?</strong></td><td>Examples: Regional (e.g., <code>CHART_US</code>, <code>CHART_EU</code>) or departmental (<code>CHART_SALES</code>, <code>CHART_MARKETING</code>).</td></tr><tr><td><strong>What accounts will be required?</strong></td><td>Examples: <code>MAIN_ACCOUNT</code> for general operations, <code>REVENUE_ACCOUNT</code> for income tracking.</td></tr><tr><td><strong>What currencies or assets will you manage?</strong></td><td>Examples: USD, EUR, or cryptocurrencies.</td></tr><tr><td><strong>What rules are necessary for these accounts?</strong></td><td>Examples: Limits on account balances or currency restrictions.</td></tr></tbody></table>

Once you have clarity on how you want the ledger structure to be organised, proceed to the following sections: [Set up the Chart Structure](/xyb-platform-1/xyb-ledger/integrate-with-xyb-ledger/understanding-the-ledger-structure-charts-accounts-wallets/set-up-your-chart-structure.md).

####


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.xyb.co/xyb-platform-1/xyb-ledger/integrate-with-xyb-ledger/understanding-the-ledger-structure-charts-accounts-wallets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
