TzKT Pro (v1.0)

Download OpenAPI specification:Download

TzKT Pro in a nutshell is headless TzKT indexer + PostgreSQL DB + set of SQL Views + PostgREST API gateway. It is an open-source project available both for commercial and non-commercial use (with attribution).

TzKT Pro vs. TzKT API

TzKT Pro is less performant, cache-unfriendly, and does not contain extra data (aliases, tokens info, other metadata).
On the other hand it provides a higher level of flexibility and allows to make custom queries almost as if you were using raw SQL.

Terms of Use

If your application or service uses TzKT Pro software (self-deployed version) you should mention that fact on your website or application by placing the label "Powered by TzKT" with a direct link to pro.tzkt.io.

API endpoint provided at pro.tzkt.io is currently working in demo mode:

  • Authorization token is baking_bad;
  • There are no rate limits, however abusers will be selectively restricted.

Paid subscription options (with SLA) will be available in the nearest future.

Client libraries

PostgREST ecosystem includes a set of client libraries developed by the community, and they all are compatible with TzKT Pro.
We recommend using those built by the Supabase team as they are most maintained, documented, and share a common super-convenient chaining syntax:

Contacts Us

Feel free to ask any questions about TzKT Pro and Tezos in general. Our team is always happy to help!

contracts

Contract

Originated accounts (KT) that have code

query Parameters
address
string <character>

Public key hash of the account

first_level
string <integer>

Block height of the first operation related to the account

last_level
string <integer>

Height of the block in which the account state was changed last time

balance
string <bigint>

Account balance/Total balance of the delegate (baker), including spendable and frozen funds (micro tez)

counter
string <integer>

An account nonce which is used to prevent operation replay

num_contracts
string <integer>

Number of contracts, created (originated) and/or managed by the account

num_delegations
string <integer>

Number of delegation operations, related to the account

num_originations
string <integer>

Number of all origination (deployment / contract creation) operations, related to the account

num_transactions
string <integer>

Number of all transaction (tez transfer) operations, related to the account

num_reveals
string <integer>

Number of reveal (is used to reveal the public key associated with an account) operations of the contract

num_migrations
string <integer>

Number of migration (result of the context (database) migration during a protocol update) operations, related to the account (synthetic type)

delegate
string <character>

Address of the current delegate of the account. null if it's not delegated

delegation_level
string <integer>

Block height of latest delegation. null if it's not delegated

is_staked
string <boolean>

Whether account participates in staking (bakes or delegates)

kind
string <text>

Sub kinds: delegator_contract (aka manager.tz) or smart_contract

creator
string <character>

Address of the account, which has deployed the contract to the blockchain

public_key
string <character varying>

Base58 representation of account's public key, revealed by the account

select
string

Filtering Columns

order
string

Ordering

offset
string

Limiting and Pagination

limit
string

Limiting and Pagination

header Parameters
Range
string

Limiting and Pagination

Range-Unit
string
Default: items

Limiting and Pagination

Prefer
string
Value: "count=none"

Preference

Responses

Request samples

import { PostgrestClient } from '@supabase/postgrest-js'

let client = new PostgrestClient('https://pro.tzkt.io/v1')
let { data: contracts, error } = await client
  .auth('baking_bad')
  .from('contracts')
  .select("*")
  .limit(5)

Response samples

Content type
[
  • {
    }
]

delegates

Delegate

Implicit accounts (tz) that are registered as delegates

query Parameters
address
string <character>

Public key hash of the account

first_level
string <integer>

Block height of the first operation related to the account

last_level
string <integer>

Height of the block in which the account state was changed last time

balance
string <bigint>

Account balance/Total balance of the delegate (baker), including spendable and frozen funds (micro tez)

counter
string <integer>

An account nonce which is used to prevent operation replay

num_contracts
string <integer>

Number of contracts, created (originated) and/or managed by the account

num_delegations
string <integer>

Number of delegation operations, related to the account

num_originations
string <integer>

Number of all origination (deployment / contract creation) operations, related to the account

num_transactions
string <integer>

Number of all transaction (tez transfer) operations, related to the account

num_reveals
string <integer>

Number of reveal (is used to reveal the public key associated with an account) operations of the contract

num_migrations
string <integer>

Number of migration (result of the context (database) migration during a protocol update) operations, related to the account (synthetic type)

is_staked
string <boolean>

Whether account participates in staking (bakes or delegates)

is_activated
string <boolean>

Delegation status (true - active, false - deactivated)

revealed
string <boolean>

Public key revelation status. Unrevealed account can't send manager operation (transaction, origination etc.)

activation_level
string <integer>

Block height when delegate (baker) was registered as a baker last time

deactivation_level
string <integer>

Block height when delegate (baker) was deactivated as a baker because of lack of funds or inactivity

frozen_deposits
string <bigint>

Amount of security deposit, currently locked for baked (produced) blocks and (or) given endorsements (micro tez)

frozen_rewards
string <bigint>

Amount of currently frozen baking rewards (micro tez)

frozen_fees
string <bigint>

Amount of currently frozen fees paid by operations inside blocks, baked (produced) by the delegate (micro tez)

delegators_count
string <integer>

Number of current delegators (accounts, delegated their funds) of the delegate (baker)

staking_balance
string <bigint>

Sum of delegate (baker) balance and delegated funds minus frozen rewards (micro tez)

num_blocks
string <integer>

Number of baked (validated) blocks all the time by the delegate (baker)

num_endorsements
string <integer>

Number of given endorsements (approvals) by the delegate (baker)

num_ballots
string <integer>

Number of submitted by the delegate ballots during a voting period

num_proposals
string <integer>

Number of submitted (upvoted) by the delegate proposals during a proposal period

num_double_bakings
string <integer>

Number of double baking (baking two different blocks at the same height) evidence operations, included in blocks, baked (validated) by the delegate

num_double_endorsings
string <integer>

Number of double endorsement (endorsing two different blocks at the same block height) evidence operations, included in blocks, baked (validated) by the delegate

num_nonce_revelations
string <integer>

Number of seed nonce revelation (are used by the blockchain to create randomness) operations provided by the delegate

num_revelation_penalties
string <integer>

Number of operations for all time in which rewards were lost due to unrevealed seed nonces by the delegate (synthetic type)

select
string

Filtering Columns

order
string

Ordering

offset
string

Limiting and Pagination

limit
string

Limiting and Pagination

header Parameters
Range
string

Limiting and Pagination

Range-Unit
string
Default: items

Limiting and Pagination

Prefer
string
Value: "count=none"

Preference

Responses

Request samples

import { PostgrestClient } from '@supabase/postgrest-js'

let client = new PostgrestClient('https://pro.tzkt.io/v1')
let { data: delegates, error } = await client
  .auth('baking_bad')
  .from('delegates')
  .select("*")
  .limit(5)

Response samples

Content type
[
  • {