---
title: "Get historical ticket balances"
method: GET
path: "/v1/tickets/historical_balances/{level}"
tags: ["Tickets"]
---

# Get historical ticket balances

`GET /v1/tickets/historical_balances/{level}`

## Request

- Base URL: `https://api.tzkt.io`
- URL: `https://api.tzkt.io/v1/tickets/historical_balances/{level}`
- Auth: none declared

Returns a list of ticket balances at the end of the specified block.
Note, this endpoint is quite heavy, therefore at least one of the filters
(`account`, `ticket.id`, `ticket.ticketer`) must be specified.

## Path parameters

- `level` integer, required

## Query parameters

- `id` Int64Parameter
  - `eq` integer, nullable: **Equal** filter mode (optional, i.e. `param.eq=123` is the same as `param=123`). \ Specify an integer number to get items where the specified field is equal to the specified value. Example: `?balance=1234`.
  - `ne` integer, nullable: **Not equal** filter mode. \ Specify an integer number to get items where the specified field is not equal to the specified value. Example: `?balance.ne=1234`.
  - `gt` integer, nullable: **Greater than** filter mode. \ Specify an integer number to get items where the specified field is greater than the specified value. Example: `?balance.gt=1234`.
  - `ge` integer, nullable: **Greater or equal** filter mode. \ Specify an integer number to get items where the specified field is greater than equal to the specified value. Example: `?balance.ge=1234`.
  - `lt` integer, nullable: **Less than** filter mode. \ Specify an integer number to get items where the specified field is less than the specified value. Example: `?balance.lt=1234`.
  - `le` integer, nullable: **Less or equal** filter mode. \ Specify an integer number to get items where the specified field is less than or equal to the specified value. Example: `?balance.le=1234`.
  - `in` integer[], nullable: **In list** (any of) filter mode. \ Specify a comma-separated list of integers to get items where the specified field is equal to one of the specified values. Example: `?level.in=12,14,52,69`.
  - `ni` integer[], nullable: **Not in list** (none of) filter mode. \ Specify a comma-separated list of integers to get items where the specified field is not equal to all the specified values. Example: `?level.ni=12,14,52,69`.
  - `empty` boolean
- `ticket.id` Int64Parameter
  - `eq` integer, nullable: **Equal** filter mode (optional, i.e. `param.eq=123` is the same as `param=123`). \ Specify an integer number to get items where the specified field is equal to the specified value. Example: `?balance=1234`.
  - `ne` integer, nullable: **Not equal** filter mode. \ Specify an integer number to get items where the specified field is not equal to the specified value. Example: `?balance.ne=1234`.
  - `gt` integer, nullable: **Greater than** filter mode. \ Specify an integer number to get items where the specified field is greater than the specified value. Example: `?balance.gt=1234`.
  - `ge` integer, nullable: **Greater or equal** filter mode. \ Specify an integer number to get items where the specified field is greater than equal to the specified value. Example: `?balance.ge=1234`.
  - `lt` integer, nullable: **Less than** filter mode. \ Specify an integer number to get items where the specified field is less than the specified value. Example: `?balance.lt=1234`.
  - `le` integer, nullable: **Less or equal** filter mode. \ Specify an integer number to get items where the specified field is less than or equal to the specified value. Example: `?balance.le=1234`.
  - `in` integer[], nullable: **In list** (any of) filter mode. \ Specify a comma-separated list of integers to get items where the specified field is equal to one of the specified values. Example: `?level.in=12,14,52,69`.
  - `ni` integer[], nullable: **Not in list** (none of) filter mode. \ Specify a comma-separated list of integers to get items where the specified field is not equal to all the specified values. Example: `?level.ni=12,14,52,69`.
  - `empty` boolean
- `ticket.ticketer` AccountParameter
  - `eq` string, nullable: **Equal** filter mode (optional, i.e. `param.eq=123` is the same as `param=123`). \ Specify a `tz` or `KT` address to get items where the specified field is equal to the specified value. Example: `?sender=tz1WnfXMPaNTBmH7DBPwqCWs9cPDJdkGBTZ8`.
  - `ne` string, nullable: **Not equal** filter mode. \ Specify a `tz` or `KT` address to get items where the specified field is not equal to the specified value. Example: `?sender.ne=tz1WnfXMPaNTBmH7DBPwqCWs9cPDJdkGBTZ8`.
  - `in` string[], nullable: **In list** (any of) filter mode. \ Specify a comma-separated list of addresses to get items where the specified field is equal to one of the specified values. Example: `?sender.in=tz1WnfXMPaNTBWnfXMPaNTBWnfXMPaNTBNTB,tz1SiPXX4MYGNJNDSiPXX4MYGNJNDSiPXX4M`.
  - `ni` string[], nullable: **Not in list** (none of) filter mode. \ Specify a comma-separated list of addresses to get items where the specified field is not equal to all the specified values. Example: `?sender.ni=tz1WnfXMPaNTBWnfXMPaNTBWnfXMPaNTBNTB,tz1SiPXX4MYGNJNDSiPXX4MYGNJNDSiPXX4M`.
  - `eqx` string, nullable: **Equal to another field** filter mode. \ Specify a field name to get items where the specified fields are equal. Example: `?sender.eqx=target`.
  - `nex` string, nullable: **Not equal to another field** filter mode. \ Specify a field name to get items where the specified fields are not equal. Example: `?sender.nex=initiator`.
  - `null` boolean, nullable: **Is null** filter mode. \ Use this mode to get items where the specified field is null or not. Example: `?initiator.null` or `?initiator.null=false`.
- `account` AccountParameter
  - `eq` string, nullable: **Equal** filter mode (optional, i.e. `param.eq=123` is the same as `param=123`). \ Specify a `tz` or `KT` address to get items where the specified field is equal to the specified value. Example: `?sender=tz1WnfXMPaNTBmH7DBPwqCWs9cPDJdkGBTZ8`.
  - `ne` string, nullable: **Not equal** filter mode. \ Specify a `tz` or `KT` address to get items where the specified field is not equal to the specified value. Example: `?sender.ne=tz1WnfXMPaNTBmH7DBPwqCWs9cPDJdkGBTZ8`.
  - `in` string[], nullable: **In list** (any of) filter mode. \ Specify a comma-separated list of addresses to get items where the specified field is equal to one of the specified values. Example: `?sender.in=tz1WnfXMPaNTBWnfXMPaNTBWnfXMPaNTBNTB,tz1SiPXX4MYGNJNDSiPXX4MYGNJNDSiPXX4M`.
  - `ni` string[], nullable: **Not in list** (none of) filter mode. \ Specify a comma-separated list of addresses to get items where the specified field is not equal to all the specified values. Example: `?sender.ni=tz1WnfXMPaNTBWnfXMPaNTBWnfXMPaNTBNTB,tz1SiPXX4MYGNJNDSiPXX4MYGNJNDSiPXX4M`.
  - `eqx` string, nullable: **Equal to another field** filter mode. \ Specify a field name to get items where the specified fields are equal. Example: `?sender.eqx=target`.
  - `nex` string, nullable: **Not equal to another field** filter mode. \ Specify a field name to get items where the specified fields are not equal. Example: `?sender.nex=initiator`.
  - `null` boolean, nullable: **Is null** filter mode. \ Use this mode to get items where the specified field is null or not. Example: `?initiator.null` or `?initiator.null=false`.
- `balance` NatParameter
  - `eq` string, nullable: **Equal** filter mode (optional, i.e. `param.eq=123` is the same as `param=123`). \ Specify a `nat` value to get items where the specified field is equal to the specified value. Example: `?balance=1234`.
  - `ne` string, nullable: **Not equal** filter mode. \ Specify a `nat` value to get items where the specified field is not equal to the specified value. Example: `?balance.ne=1234`.
  - `gt` string, nullable: **Greater than** filter mode. \ Specify a `nat` value to get items where the specified field is greater than the specified value. Example: `?balance.gt=1234`.
  - `ge` string, nullable: **Greater or equal** filter mode. \ Specify a `nat` value to get items where the specified field is greater than equal to the specified value. Example: `?balance.ge=1234`.
  - `lt` string, nullable: **Less than** filter mode. \ Specify a `nat` value to get items where the specified field is less than the specified value. Example: `?balance.lt=1234`.
  - `le` string, nullable: **Less or equal** filter mode. \ Specify a `nat` value to get items where the specified field is less than or equal to the specified value. Example: `?balance.le=1234`.
  - `in` string[], nullable: **In list** (any of) filter mode. \ Specify a comma-separated list of `nat` values to get items where the specified field is equal to one of the specified values. Example: `?level.in=12,14,52,69`.
  - `ni` string[], nullable: **Not in list** (none of) filter mode. \ Specify a comma-separated list of `nat` values to get items where the specified field is not equal to all the specified values. Example: `?level.ni=12,14,52,69`.
- `sort` SortParameter
  - `asc` string, nullable: **Ascending** sort mode (optional, i.e. `sort.asc=id` is the same as `sort=id`). \ Specify a field name to sort by. Example: `?sort=balance`.
  - `desc` string, nullable: **Descending** sort mode. \ Specify a field name to sort by descending. Example: `?sort.desc=id`.
- `offset` OffsetParameter
  - `el` integer, nullable: **Elements** offset mode (optional, i.e. `offset.el=123` is the same as `offset=123`). \ Skips specified number of elements. Example: `?offset=100`.
  - `pg` integer, nullable: **Page** offset mode. \ Skips `page * limit` elements. This is a classic pagination. Example: `?offset.pg=1`.
  - `cr` integer, nullable: **Cursor** offset mode. \ Skips all elements with the `cursor` before (including) the specified value. Cursor is a field used for sorting, e.g. `id`. Avoid using this offset mode with non-unique or non-sequential cursors such as `amount`, `balance`, etc. Example: `?offset.cr=45837`.
- `limit` integer
- `select` SelectionParameter
  - `fields` string[], nullable: **Fields** selection mode (optional, i.e. `select.fields=balance` is the same as `select=balance`). \ Specify a comma-separated list of fields to include into response. Example: `?select=address,balance as b,metadata.name as meta_name` will result in `[ { "address": "asd", "b": 10, "meta_name": "qwe" } ]`.
  - `values` string[], nullable: **Values** selection mode. \ Specify a comma-separated list of fields to include their values into response. Example: `?select.values=address,balance,metadata.name` will result in `[ [ "asd", 10, "qwe" ] ]`.

## Response `200`

- TicketBalanceShort[]
  - `id` integer: Internal TzKT id. **[sortable]**
  - `ticket` TicketInfoShort, required
    - `id` integer: Internal TzKT id.
    - `ticketer` Alias, required
      - `alias` string, nullable: Account alias name (off-chain data).
      - `address` string, required: Account address (public key hash).
    - `rawType` IMicheline, required
      - `type` 0 | 32 | 64 | 96 | 128
    - `rawContent` IMicheline, required
      - `type` 0 | 32 | 64 | 96 | 128
    - `content` unknown
    - `typeHash` integer: 32-bit hash of the ticket content type. This field can be used for searching similar tickets (which have the same type).
    - `contentHash` integer: 32-bit hash of the ticket content. This field can be used for searching same tickets (which have the same content).
  - `account` Alias, required
    - `alias` string, nullable: Account alias name (off-chain data).
    - `address` string, required: Account address (public key hash).
  - `balance` string: Balance.

---

[API](https://skmtc.dev/tzkt/apis/tzkt-api.md) - [All operations](https://skmtc.dev/tzkt/apis/tzkt-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tzkt/apis/tzkt-api/revisions/a2e2aba5e534?raw)
