# Pix Balance

The Pix Balance represents the current available balance in your Pix account.

Here we will show you how to retrieve it.

### The Pix Balance Object

**Attributes**

| Name | Type | Description |
| --- | --- | --- |
| `id` | STRING | Identifier of the balance. Holds the participant bank code for direct participants or the workspace id for indirect participants. |
| `currency` | STRING | Currency of the balance amount. Example: "BRL". |
| `amount` | INTEGER | Current balance amount in cents. Example: 1234 (R$ 12.34). |
| `updated` | STRING | ISO datetime that represents when the balance was last updated. Example: "2020-04-23T23:00:00.000000+00:00". |

### Get Pix Balance

`GET /v2/pix-balance`

Retrieve the current Pix balance of your workspace.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `before` | OPTIONAL | Date used to retrieve the balance as of the end of the informed day. Example: "2022-01-31". When omitted or set to the current day, the current balance is returned. |

**Request**

```python
import starkinfra

balance = starkinfra.pixbalance.get(
    before="2022-01-31"
)

print(balance)
```

**Response**

```python
PixBalance(
    id="5656565656565656",
    amount=10000000,
    currency="BRL",
    updated="2022-01-01T00:00:00+00:00"
)
```

## Available Languages

Code samples on this page are in Python. The same content is available with samples in:

- [Python](https://docs.starkinfra.com/api/v2/pix-balance-python.md)
- [Node.js](https://docs.starkinfra.com/api/v2/pix-balance-node.md)
- [PHP](https://docs.starkinfra.com/api/v2/pix-balance-php.md)
- [Java](https://docs.starkinfra.com/api/v2/pix-balance-java.md)
- [Ruby](https://docs.starkinfra.com/api/v2/pix-balance-ruby.md)
- [Elixir](https://docs.starkinfra.com/api/v2/pix-balance-elixir.md)
- [.NET](https://docs.starkinfra.com/api/v2/pix-balance-dotnet.md)
- [Go](https://docs.starkinfra.com/api/v2/pix-balance-go.md)
- [Clojure](https://docs.starkinfra.com/api/v2/pix-balance-clojure.md)
- [cURL](https://docs.starkinfra.com/api/v2/pix-balance-curl.md)
