UPDATE TRY IT OUT: LIVE SAMPLE SHEET

I wrote this medium in complement to Pull Crypto Wallet Balance directly on Google Sheets where you can retrieve almost any cryptocurrency (150+ with biggest market cap) balance from a wallet address and the article Pull realtime lending rates from DeFi platforms where I show you how to benefit from arbitrage opportunities on lending rates.

This article will be useful for you, if you want to get your staking balances as well as your rewards in real-time which could be of use for accounting and portfolio valuations. I’ll be using Google Sheets, it is a free, web-based program for creating and editing spreadsheets.

At the end of this medium, you will be able to automatically retrieve staking and reward balances from the following cryptocurrencies:

TEZOS— COSMOS— EOS — NANO — DUNE

The CRYPTOSTAKING & CRYPTOREWARDS Formula

This is what your Google Sheet will look like once you finish the setup:

Screenshot 1: a Google accounting sheet with the share of Staking, Rewards and ‘available’ Balance

The CRYPTOSTAKING function returns the amount staked for the wallet address you provided. Available for TEZOS , COSMOS, EOS, NANO and DUNE. You will be able to retrieve the amount through the following formula:

=CRYPTOSTAKING(“CRYPTOCURRENCY TICKER”,” PUBLIC WALLET ADDRESS”, optional refresh_cell)

2 Required Parameters + 1 Optional

{“CRYPTOCURRENCY TICKER”} The cryptocurrency TICKER/SYMBOL data to fetch, for example the tikcker of Tezos is XTZ. {“PUBLIC WALLET ADDRESS”} The wallet address associated with the cryptocurrency you want the balance from. Please pay attention, DO NOT ENTER your private wallet address. Optional {EMPTY CELL REFERENCE} ONLY on 3rd argument. Reference an empty cell and change its content to force refresh of the balances.

The CRYPTOREWARDS function returns the amount of rewards you get from staking. Available for TEZOS and COSMOS. You will be able to retrieve the amount through the following formula:

=CRYPTOREWARDS(“TICKER”,”WALLET ADDRESS”, optional refresh_cell)

I open sourced the code for anyone that wishes to get the staking and reward amounts. The staking and reward amounts are directly taken from the block explorers (TZStats, Blocks.io, CosmoStation, Nano Crawler, DunScan.io,…).

Below I displayed a couple of examples on how you can use these 2 functions.

EXAMPLE 1: Tezos from Tezos Capital Legacy

Wallet Address: Tezos Capital Legacy fund

For this first example, I’m interested in getting the staking and reward values for the Tezos Capital Legacy Fund that has the following wallet address: tz1TDSmoZXwVevLTEvKCTHWpomG76oC9S2fJ

Below, I’ve made a screenshot of the balances on the Tezos Block Explorer (TZStats).