All TzStats API and RPC endpoints will be officially shut down on October 31st, 2023 as we're migrating to our brand new TzPro service that brings with it several exciting new features. Migrating to TzPro is easy – learn how to do so below.

What's TzPro?

TzPro is a superset of the TzStats API. All TzStats endpoints are still available and free to use. In addition, TzPro offers a unified data model for common layer 2 building blocks such as tokens, DEX pools, staking farms, lending protocols, NFT markets and identity solutions. Activity from different protocol implementations is indexed and mapped to this unified model so that you can seamlessly query live and historic data on your DEX and NFT positions, trades, token prices, wallet balances, token transfers and more across many supported protocols.

With TzPro, we combine 3 layers of APIs under a single roof:

  • Tezos RPC (backed by load balanced Rolling and Archive mode nodes)
  • Tezos Index API (our well-known legacy API for Tezos Layer 1 data)
  • Brand NEW TzPro Token, DeFi, NFT and Identity APIs

Coming from the TzStats API, all API routes you're familiar with still exist and the data remains the same. In addition, TzPro offers a wealth of new data on tokens, DeFi, NFT, Tezos Domains and TzProfiles. Read about the full spectrum of available services and API endpoints on the TzPro docs.

Want to read more about TzPro? Check out the announcement post, and some of our threads on X:

How to Migrate?

1. Create a free TzPro Account

Sign up for your free TzPro account on the Sign Up page. Enter your email address, password, and your first and last name. Agree to the Terms and if you like, opt in to receiving the Blockwatch newsletter so we can keep you up to date.

2. Activate Account

Once you've created your new account, please activate it by clicking on the email verification link we've sent to you. Check your spam folder in case you don't see the mail. In the rare case that you still don't see it, reach out to us via hello at blockwatch dot cc and we'll get back to you as soon as possible.

3. Generate API Key

With a TzPro account, you're able to create and manage TzPro API keys. After logging in, click on API Keys on the left hand sidebar. Click on Add key on the top right of the table to create a new key. Choose a short and unique name with a maximum of 32 characters.

You can configure how traffic is handled by choosing an environment (Development, Staging, or Production) and target network (Mainnet, Staging, Ghostnet, ...). Note that currently all keys work regardless of selected network when you call api.{network}.tzpro.io.

Alright, you're set!

Now, send your API key with every API request using one of two methods:

  • as HTTP header X-API-Key
  • as query parameter api_key=YOUR_API_KEY

If you use our TzPro-Go SDK you can configure it to use your API in two ways:

# (recommended) export your key as environment variable
export TZPRO_API_KEY=__your_key__

# (optional) or configure the TzPro client directly
tzpro.DefaultClient.WithApiKey("__your_key__")

In Javascript you can use the Request Web API

function fetchTzpro({url, key = ''}) {
  let req = new Request(url);
  req.headers.set('X-API-Key', key);
  return fetch(req);
}

TzPro API keys offer additional security features to secure your keys. Read TzPro API Access for detailed information.

Get In Touch

If you have questions, suggestions or problems using the API, you can reach us in our Discord developer support channel, DM us on X or send a mail to hello at blockwatch.cc. We're excited to see what you build on top of TzPro, so please share your projects and feel free to ask for help and advice.