> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sportsxapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Account

> Account operations on the STX Python SDK.

**3 operations.**

## `account`

*Query — returns `Account`.*

Account Information

**Example**

```python theme={null}
result = client.account(selections=Selection(...))
```

***

## `close_account`

*Mutation — returns `SelfStatusChangeResult`.*

<sub>GraphQL field: `closeAccount`</sub>

Close a user's account. This requires that the user has no positions in any market, and
has withdrawn all funds. Closed accounts cannot be reversed.

**Parameters**

| Name       | Type  | Required | Description                          |
| ---------- | ----- | -------- | ------------------------------------ |
| `password` | `str` | No       | User's password to close the account |

**Example**

```python theme={null}
result = client.close_account(params={"password": ...}, selections=Selection(...))
```

***

## `loyalty_history`

*Query — returns `list[TransactionHistory]`.*

<sub>GraphQL field: `loyaltyHistory`</sub>

List of all loyalty related transactions for the account

**Parameters**

| Name         | Type                            | Required | Description |
| ------------ | ------------------------------- | -------- | ----------- |
| `pagination` | `Pagination` (dict — see below) | No       | —           |

`pagination` accepts a dict with these keys (pass as `params={"pagination": {...}}`):

| Field   | Type  | Required | Description                                                          |
| ------- | ----- | -------- | -------------------------------------------------------------------- |
| `page`  | `int` | Yes      | The page of result where each page has `limit` values.  Integer >= 0 |
| `limit` | `int` | Yes      | The limit of values per page.  Integer value greater than 0.         |

**Example**

```python theme={null}
result = client.loyalty_history(params={"pagination": ...}, selections=Selection(...))
```

***
