Tickets
GET /explorer/contract/{address}/tickets // issuer view (for ticketer contracts)
Lists tickets issued by a contract. A ticket is uniquely identified by a ticketer (the issuer contract), a Micheline type and a Micheline value which matches the type. Tickets can further have an amount field which represents a balance. See the table below for details.
Available query filters
typeticket hash as hex-encoded Micheline valuecontentticket hash as hex-encoded Micheline valuehashticket hash as hex-encoded uint64limitmax number of items to returnorderlist order (asc or desc by id field)cursorlast seen id, use for paginationoffsetskip number of items (inefficient, use cursor)
- Schema
- Response
- Example
| Field | Description |
|---|---|
id int64 | Internal ticket identity database id. |
ticketer hash | Ticket issuer contract address as base58-check encoded string. |
type object | Micheline type. |
content object | Micheline value. |
hash uint64 | Ticket identity hash over ticketer, type, content added by the indexer. |
creator hash | First ticket minter, i.e. wallet signing the transaction during which the first ticket of this type was minted. |
first_block int64 | Block height of first transaction. |
first_time datetime | Block time of first transaction. |
last_block int64 | Block height of the most recent transaction. |
last_time datetime | Block time of the most recent transaction. |
total_supply bigint | Current ticket supply. |
total_mint bigint | Total amount ever minted. |
total_burn bigint | Total amount ever burned. |
num_transfers int64 | Number of ticket transfer events. |
num_holders int64 | Current number of ticket holders (wallets or contracts). |
{
"id": 10,
"ticketer": "KT1UURhEJPhvqp4xgF4C9ZVddJ8Qd34hHXtZ",
"type": {"prim":"pair","args":[{"prim":"string"},{"prim":"bytes"}]},
"content": {"prim":"Pair","args":[{"string":"tezmaps"},{"bytes":"302e74657a6d6170"}]},
"hash": "7fe35d15bcc2fe09",
"creator": "tz1MDa8PEMHeUwcnqq9YGgHEhULXZS6phMWn",
"first_block": 4951811,
"first_time": "2024-01-19T14:06:26Z",
"last_block": 4969847,
"last_time": "2024-01-22T17:55:58Z",
"total_supply": "4",
"total_mint": "4",
"total_burn": "0",
"num_transfers": 1,
"num_holders": 2
}
curl https://api.tzpro.io/explorer/contract/KT1UURhEJPhvqp4xgF4C9ZVddJ8Qd34hHXtZ/tickets
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
"github.com/trilitech/tzgo/tezos"
)
// list tickets issued by a contract
a, err := tzpro.DefaultClient.Contract.ListTickets(
context.Background(),
tezos.MustParseAddress("KT1UURhEJPhvqp4xgF4C9ZVddJ8Qd34hHXtZ"),
tzpro.NoQuery,
)
Ticket Events​
GET /explorer/account/{address}/ticket_events // wallet view (for ticket holders)
GET /explorer/contract/{address}/ticket_events // issuer view (for ticketer contracts)
Lists ticket related events such as mint, burn and transfer which happen as result of a transaction.
Available query filters
typeticket hash as hex-encoded Micheline valuecontentticket hash as hex-encoded Micheline valuehashticket hash as hex-encoded uint64event_typefilter by type (mint,burnandtransfer)senderfilter by sender addressreceiverfilter by receiver addressheightfilter by block heightlimitmax number of items to returnorderlist order (asc or desc by id field)cursorlast seen id, use for paginationoffsetskip number of items (inefficient, use cursor)
- Schema
- Response
- Example
| Field | Description |
|---|---|
id int64 | Internal ticket event database id. |
ticketer hash | Ticket issuer contract address as base58-check encoded string. |
type object | Micheline type. |
content object | Micheline value. |
hash uint64 | Ticket identity hash over ticketer, type, content added by the indexer. |
event_type enum | Event type mint, burn and transfer. |
sender hash | Ticket sender address, empty on mint. |
receiver hash | Ticket receiver address, empty on burn. |
amount bigint | Amount sent. |
height int64 | Block height of this event. |
time datetime | Block time of this event. |
op_id uint64 | Reference to the transaction as unique database id. |
[{
"id": 10,
"ticketer": "KT1UURhEJPhvqp4xgF4C9ZVddJ8Qd34hHXtZ",
"type": {"prim":"pair","args":[{"prim":"string"},{"prim":"bytes"}]},
"content": {"prim":"Pair","args":[{"string":"tezmaps"},{"bytes":"302e74657a6d6170"}]},
"hash": "7fe35d15bcc2fe09",
"event_type": "mint",
"sender": "",
"receiver": "tz1MDa8PEMHeUwcnqq9YGgHEhULXZS6phMWn",
"amount": "1",
"height": 4951811,
"time": "2024-01-19T14:06:26Z",
"op_id": 324521885909
}]
curl https://api.tzpro.io/explorer/contract/KT1UURhEJPhvqp4xgF4C9ZVddJ8Qd34hHXtZ/ticket_events
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
"github.com/trilitech/tzgo/tezos"
)
// list tickets issued by a contract
a, err := tzpro.DefaultClient.Contract.ListTicketEvents(
context.Background(),
tezos.MustParseAddress("KT1UURhEJPhvqp4xgF4C9ZVddJ8Qd34hHXtZ"),
tzpro.NoQuery,
)
Ticket Balances​
GET /explorer/account/{address}/ticket_balances // wallet view (for ticket holders)
GET /explorer/contract/{address}/ticket_balances // issuer view (for ticketer contracts)
Lists ticket related balances.
Available query filters
accountowner accounttypeticket hash as hex-encoded Micheline valuecontentticket hash as hex-encoded Micheline valuehashticket hash as hex-encoded uint64limitmax number of items to returnorderlist order (asc or desc by id field)cursorlast seen id, use for paginationoffsetskip number of items (inefficient, use cursor)
- Schema
- Response
- Example
| Field | Description |
|---|---|
id int64 | Internal ticket balance database id. |
ticketer hash | Ticket issuer contract address as base58-check encoded string. |
type object | Micheline type. |
content object | Micheline value. |
hash uint64 | Ticket identity hash over ticketer, type, content added by the indexer. |
account hash | Ticket owner. |
balance bigint | Current ticket balance. |
first_block int64 | Block height of first transaction. |
first_time datetime | Block time of first transaction. |
last_block int64 | Block height of the most recent transaction. |
last_time datetime | Block time of the most recent transaction. |
num_transfers int64 | Number of ticket transfer events this owner participated in. |
num_mints int64 | Number of ticket mint events initiated by this owner. |
num_nurns int64 | Number of ticket burn events initiated by this owner. |
vol_sent bigint | Total amount ever received by this owner. |
vol_recv bigint | Total amount ever sent by this owner. |
vol_mint bigint | Total amount ever minted by this owner. |
vol_burn bigint | Total amount ever burned by this owner. |
[{
"id": 10,
"ticketer": "KT1UURhEJPhvqp4xgF4C9ZVddJ8Qd34hHXtZ",
"type": {"prim":"pair","args":[{"prim":"string"},{"prim":"bytes"}]},
"content": {"prim":"Pair","args":[{"string":"tezmaps"},{"bytes":"302e74657a6d6170"}]},
"hash": "7fe35d15bcc2fe09",
"account": "tz1MDa8PEMHeUwcnqq9YGgHEhULXZS6phMWn",
"balance": "0",
"first_block": 4951811,
"first_time": "2024-01-19T14:06:26Z",
"last_block": 4961000,
"last_time": "0001-01-01T00:00:00Z",
"num_transfers": 1,
"num_mints": 1,
"num_burns": 0,
"vol_sent": "1",
"vol_recv": "0",
"vol_mint": "1",
"vol_burn": "0"
}]
curl https://api.tzpro.io/explorer/contract/KT1UURhEJPhvqp4xgF4C9ZVddJ8Qd34hHXtZ/ticket_balances
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
"github.com/trilitech/tzgo/tezos"
)
// list tickets issued by a contract
a, err := tzpro.DefaultClient.Contract.ListTicketBalances(
context.Background(),
tezos.MustParseAddress("KT1UURhEJPhvqp4xgF4C9ZVddJ8Qd34hHXtZ"),
tzpro.NoQuery,
)