---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/interfaces/WalletApi.md
---
[Reference](../../../index.md) / [@getenginex/sdk](../index.md) / WalletApi

# WalletApi

The player's balance and statement. All methods require login.

## Methods

### get()

> **get**(`params?`, `options?`): `Promise`<[`Wallet`](Wallet.md)>

Wallet balances.

#### Parameters

##### params?

[`NoParams`](../type-aliases/NoParams.md)

##### options?

[`CallOptions`](CallOptions.md)

#### Returns

`Promise`<[`Wallet`](Wallet.md)>

#### Example

```ts
const wallet = await enginex.wallet.get()
formatMoney(wallet.realBalance, config.currency) // 'R$ 1.500,00'
```

#### Throws

`UNAUTHENTICATED` without a session; `VALIDATION_ERROR`, also in `'warn'`, with
money or currency outside the format.

***

### getBalance()

> **getBalance**(`params?`, `options?`): `Promise`<[`Balance`](Balance.md)>

Balance, with the withdrawals in progress in `pendingWithdrawals`.

#### Parameters

##### params?

[`NoParams`](../type-aliases/NoParams.md)

##### options?

[`CallOptions`](CallOptions.md)

#### Returns

`Promise`<[`Balance`](Balance.md)>

#### Example

```ts
const { realBalance, pendingWithdrawals } = await enginex.wallet.getBalance()
```

#### Throws

`UNAUTHENTICATED` without a session; `VALIDATION_ERROR`, also in `'warn'`, with
money or currency outside the format.

***

### listTransactions()

> **listTransactions**(`input?`, `options?`): `Promise`<[`Page`](Page.md)<[`Transaction`](Transaction.md)>>

Paginated statement, from most recent to oldest.

#### Parameters

##### input?

[`ListTransactionsInput`](ListTransactionsInput.md)

##### options?

[`CallOptions`](CallOptions.md)

#### Returns

`Promise`<[`Page`](Page.md)<[`Transaction`](Transaction.md)>>

#### Example

```ts
const page = await enginex.wallet.listTransactions({ page: 1, perPage: 20, category: 'financial' })
page.items.forEach((tx) => console.log(tx.type, tx.amount))
```

#### Throws

`INVALID_ARGUMENT` for an unknown category; `UNAUTHENTICATED` without a session;
`VALIDATION_ERROR`, also in `'warn'`, with money or currency outside the format (on any item: the
whole page rejects).
