---
title: "codespar account"
description: "Account: balances, the merged ledger, a money summary, spend per agent, payments, sessions, test balance and test funding"
---

Account: balances, the merged ledger, a money summary, spend per agent, payments, sessions, test balance and test funding

12 commands in `@codespar/cli 0.22.2`.

Each one prints what its operation answered. [What a command prints](/docs/cli/reference#what-a-command-prints) has the rule, and [Configuration](/docs/cli/config#what-a-script-gets-when-a-command-fails) has the exit codes and the shape of a failure.

### `codespar account balances`

Account balances, per currency

```bash
codespar account balances
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/account/balances` · [parameters, responses and refusals](/docs/api/reference/account#get-v1accountbalances)

### `codespar account ledger`

The project's ledger, every wallet merged

```bash
codespar account ledger
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/account/ledger` · [parameters, responses and refusals](/docs/api/reference/account#get-v1accountledger)

### `codespar account summary`

BRL money in, agent spend, tool calls and sessions over a window

```bash
codespar account summary
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/account/summary` · [parameters, responses and refusals](/docs/api/reference/account#get-v1accountsummary)

### `codespar account agent-activity`

BRL spent and received per agent, over a window

```bash
codespar account agent-activity
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/account/agent-activity` · [parameters, responses and refusals](/docs/api/reference/account#get-v1accountagent-activity)

### `codespar account spenders`

The mandates that can spend from this project

```bash
codespar account spenders
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/account/spenders` · [parameters, responses and refusals](/docs/api/reference/account#get-v1accountspenders)

### `codespar account payments`

The project's payments, newest first

```bash
codespar account payments
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/account/payments` · [parameters, responses and refusals](/docs/api/reference/account#get-v1accountpayments)

### `codespar account fund-sandbox`

Add test balance (test projects only)

```bash
codespar account fund-sandbox --input '{"amount_minor":1000,"idempotency_key":"string","rail":"pix","target":"account","mandate_id":"mandate_0000000000000000","consumer_id":"csm_0000000000000000"}'
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |
| `-i, --input <json>` | Request body as a JSON string |
| `-f, --input-file <path>` | Request body from a JSON file |

`POST /v1/account/fund/sandbox` · [parameters, responses and refusals](/docs/api/reference/account#post-v1accountfundsandbox)

### `codespar account fund-sandbox-initial`

Grant the initial test balance (test projects only, once)

```bash
codespar account fund-sandbox-initial
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`POST /v1/account/fund/sandbox/initial` · [parameters, responses and refusals](/docs/api/reference/account#post-v1accountfundsandboxinitial)

### `codespar account sessions`

The project's sessions, as the activity list draws them

```bash
codespar account sessions
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/account/sessions` · [parameters, responses and refusals](/docs/api/reference/account#get-v1accountsessions)

### `codespar account test-balance`

The test balance, the refill quota and the Adicionar fundos cap

```bash
codespar account test-balance
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |

`GET /v1/account/test-balance` · [parameters, responses and refusals](/docs/api/reference/account#get-v1accounttest-balance)

### `codespar account fund-sandbox-refill`

Refill the test balance (test projects only, confirmed)

```bash
codespar account fund-sandbox-refill --input '{"confirm":true}'
```

| option | what it does |
|---|---|
| `-q, --query <key=value>` | Query parameter (repeatable) (default: []) |
| `--timeout <ms>` | Per-request timeout in milliseconds |
| `-i, --input <json>` | Request body as a JSON string |
| `-f, --input-file <path>` | Request body from a JSON file |

`POST /v1/account/fund/sandbox/refill` · [parameters, responses and refusals](/docs/api/reference/account#post-v1accountfundsandboxrefill)

### `codespar account statement`

Download the account statement (extrato) of a period as PDF: opening, inflows, outflows, closing; reserves apart

```bash
codespar account statement [options]
```

| option | what it does |
|---|---|
| `--from <YYYY-MM-DD>` | First day of the period (America/Sao_Paulo) |
| `--to <YYYY-MM-DD>` | Last day, inclusive; not after today; at most 92 days after --from |
| `--currency <code>` | Ledger currency (default BRL) |
| `--out <file>` | Where to write it (default: extrato-\<from>-\<to>.pdf in the current directory) |
