The TzPro API provides flexible and efficient access to all historic on-chain data and advanced statistics collected from the Tezos blockchain. This API reference contains information on all TzPro API endpoints, explains how to call them and how to read the results.
TzPro API Overview
The TzPro API is with a few exceptions read-only and supports HTTP methods
OPTIONS. Most endpoints take optional query parameters which must be properly URL encoded.
The TzPro API exclusively uses TLS encrypted connections. All our certificates are signed by LetsEncrypt Authority X3 certificate. The API supports secure connections via TLS v1.3 and v1.2 with Perfect Forward Secrecy based on Elliptic Curves and Diffie-Hellman key exchange. Insecure HTTP requests to port 80 are automatically redirected to HTTPS on port 443.
All our API responses contain HTTP response headers with an API version, call runtime and request id headers to aid debugging, headers to identify the Tezos network and protocol as well as rate limit headers for unprivileged requests.
# API version
# Tezos Network (chain id)
# Tezos Block Height
# Tezos Protocol (protocol hash)
# Unique request identifier
# Backend runtime
# Rate limit information
Our free API plan includes 10,000 calls per month per API key or domain. Paid plans allow unlimited access unless you optionally set a voluntary call limit for cost control reasons. If a rate limit is active, we send above mentioned limit headers with each response. Learn more about available plans and pricing on the tzpro.io website and manage your subscription on your TzPro account dashboard.
CSV files always include a header containing the requested column names in the requested order. Columns are separated by comma (ASCII 44, UTF-8 0x2C).
When downloading a CSV file you may add an optional
filenamequery argument (ASCII only, 128 characters max, no path separators) which will be used in the Content-Disposition header. Filename suffix
.csvis automatically appended if missing.
Results on Table and Time Series APIs use an optimized JSON bulk array format instead of JSON key/value objects. An outer array contains result rows or time points, inner arrays list column values as requested by the
Note: As we keep adding new fields to tables and time-series the default order of JSON bulk arrays may change over time. Use the
columnsquery argument to ensure the API always returns the expected fields in the specified order.
We use the following data types and encoding conventions throughout the API:
For efficiency reasons, timestamps in JSON bulk arrays are encoded as UNIX time at millisecond resolution. That is, value
Jan 1, 1970 00:00:00 UTC. Timestamps in explorer responses and CSV output are encoded according to RFC 3339 (
2018-09-06T08:07:38Z) for convenience and human readability.
Timestamps in queries can be expressed in multiple ways:
- as RFC3339 string with any timezone
- as UNIX timestamp in seconds or milliseconds, so
- as date without time, i.e.
2018-09-06represents midnight at the first day of month and/or month of year
- as static string such as
yesterdayto reference a relative point in time
- as static string expression with truncation and offset arguments against
now/dfor start of today or
now/d-30dfor start of day 30 days ago (expressions support
The TzPro API responds with regular HTTP status codes in the
2xxrange to indicate success, in the
4xxrange to indicate client-side errors and in the
5xxrange to indicate backend errors. The response body contains additional information encoded as JSON object.
400 Bad RequestMissing required fields of malformed request data, your fault
404 Not FoundNo such object (block, operation or account has not yet been included in a finalized block)
405 Method Not AllowedUnsupported request method
409 ConflictResource state conflict, may happen after reorgs when using a stale block hash as anchor
429 Too Many RequestsRequest limit exceeded
500 Internal ServerSomething went wrong on our end, not your fault
502 Bad GatewayOur backend is overloaded or down for maintenance, wait a while before retry
503 Service UnavailableOur backend is overloaded or down for maintenance, wait a while before retry
504 Gateway TimeoutYour request has reached a timeout and was canceled, try to reduce limit or time range in your request
"message": "incorrect request syntax",
"detail": "unknown column 'cycles'",
All error messages are JSON encoded. They contain fields numeric and human readable fields to help developers easily debug and map errors.