How to Retrieve Information from the Blockchain (2024)

All the data in the Waves blockchain is public and can be read by anyone. For example, you can retrieve data from account data storage, account balance, a list of transactions by certain account, or current blockchain height and time.

You can send a request to your own node or to one of the Waves nodes with public API:

# Data from Account Data Storage

Each account on the Waves blockchain has an account data storage that stores data records in key-value format. See the Account Data Storage article for more information.

# Using Waves Explorer

  1. Go to https://wavesexplorer.com/.

  2. In the top right menu, select Mainnet or Testnet.

    How to Retrieve Information from the Blockchain (1)

  3. Use search bar to find the account by address or alias.

  4. Switch to Data tab.

  5. Enter an entry key or click Load all.

How to Retrieve Information from the Blockchain (2)

# Using Node REST API

To retrieve all the data records from an account data storage, use GET /addresses/data/{address} method.

To retrieve a data record by key, use GET /addresses/data/{address}/{key} method.

See method descriptions in Swagger web interface.

Request example:

curl 'https://nodes-testnet.wavesnodes.com/addresses/data/3N4iKL6ikwxiL7yNvWQmw7rg3wGna8uL6LU'

The examples shown here and below are suitable for the cURL utility. You can adjust the proposed request to your app written in any programming language.

# Using JavaScript

Use functions of waves-transactions library:

  • accountData function retrieves all the data records from an account data storage. Optionally you can filter keys using regular expression.
  • accountDataByKey retrieves a data record by key.

See function descriptions in library documentation on Github.

Example:

import { nodeInteraction } from "@waves/waves-transactions";const nodeUrl = 'https://nodes-testnet.wavesnodes.com';const address = '3N4iKL6ikwxiL7yNvWQmw7rg3wGna8uL6LU';let stringVal = await nodeInteraction.accountDataByKey('stringVal',address,nodeUrl);console.log('stringVal: ' + stringVal.value);

# Using Python

import requestsnode_url = 'https://nodes-testnet.wavesnodes.com'address = '3N4iKL6ikwxiL7yNvWQmw7rg3wGna8uL6LU'account_data_storage_data = requests.get(f'{node_url}/addresses/data/{address}').json()print(account_data_storage_data)

# Account Balance

Each account can store different assets (also called tokens) in different amounts. For WAVES, there are four types of balance: regular, effective, available, and generating. See the Account Balance article for more information.

# Using Waves Explorer

  1. Go to https://wavesexplorer.com/.

  2. In the top right menu, select Mainnet or Testnet.

    How to Retrieve Information from the Blockchain (3)

  3. Use search bar to find the account by address or alias.

  4. Balances are displayed on the Assets tab. For WAVES, regular balance is displayed; to see other types of balance, click the 👁 icon next to the balance.

How to Retrieve Information from the Blockchain (4)

Non-fungible tokens are displayed on the NFT tab.

# Using Node REST API

To retrieve all types of balances of WAVES, use GET /addresses/balance/details/{address} method.

To retrieve balances of other assets, use GET /assets/balance/{address} or GET /assets/balance/{address}/{assetId} method.

See method descriptions in Swagger web interface.

💡 The easiest way to find out the asset ID by its name and vice versa is to open WX Network app developed by the third-party team from the community, go to the Trading page and type a name or asset ID in the search bar.

How to Retrieve Information from the Blockchain (5)

Request example:

curl 'https://nodes.wavesnodes.com/assets/balance/3P8pGyzZL9AUuFs9YRYPDV3vm73T48ptZxs/G9hT3ntXUenjCr2UwXRVa1PP6kWZtfotBLGYhfw8J7GG'

You can adjust the proposed request to your app written in any programming language.

To get a list of NFTs that belong to account, use GET /assets/nft/{address}/limit/{limit} method.

# Using JavaScript

# Without User Authentication

You can use functions of waves-transactions library:

  • balanceDetails function retrieves all types of balalnces of WAVES.
  • assetBalance function retrieve balances of other assets.

See function descriptions in library documentation on Github.

Example:

import { nodeInteraction } from "@waves/waves-transactions";const nodeUrl = 'https://nodes-testnet.wavesnodes.com';const address = '3Mvpp7v6G11tKNgsoNhbgnZS9thdZ6TvAXK';const assetId = 'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p';let wavesBalance = await nodeInteraction.balanceDetails(address,nodeUrl);let assetBalance = await nodeInteraction.assetBalance(assetId,address,nodeUrl);console.log('WAVES available balance: ' + wavesBalance.available);console.log('WAVES effictive balance: ' + wavesBalance.effective);console.log('XTN balance: ' + assetBalance.balance);

# With User Authentication

If user is authenticated in your app, you can use functions of Signer library:

  • getBalance provides balances of all assets in user's portfolio. For WAVES, the available balance is returned.
  • getSponsoredBalances prodives balances of sponsored assets in user's portfolio. See Sponsored Fee for more information about sponsorship.

See Signer documentation for how It works.

Example:

import Signer from '@waves/signer';import Provider from '@waves.exchange/provider-web';// Library initializationconst signer = new Signer({ NODE_URL: 'https://nodes-testnet.wavesnodes.com'});signer.setProvider(new Provider());const user = await signer.login();let balances = await signer.getBalance();console.log('User balances: ' + JSON.stringify(balances));

# Using Python

import requestsnode_url = 'https://nodes-testnet.wavesnodes.com'address = '3N4iKL6ikwxiL7yNvWQmw7rg3wGna8uL6LU'asset_id = 'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'waves_balances = requests.get(f'{node_url}/addresses/balance/details/{address}').json()print(waves_balances)asset_balance = requests.get(f'{node_url}/assets/balance/{address}/{asset_id}').json()print(asset_balance)

# List of Transactions by Address

You can get a list of transactions related to the specified account: outgoing transactions that are sent from the account; incoming transfers; exchanges that the account participated in; dApp script invocations etc.

# Using Waves Explorer

  1. Go to https://wavesexplorer.com/.
  2. In the top right menu, select Mainnet or Testnet.
  3. Use search bar to find the account by address or alias.
  4. Switch to Transactions tab.

# Using Node REST API

To retrieve all the transactions related to an account, use GET /transactions/address/{address}/limit/{limit} method. In this method, you can use pagination: to get the next page, specify the after parameter as ID of the last transaction in previous response.

See method description in Swagger web interface.

Request example:

curl 'https://nodes-testnet.wavesnodes.com/transactions/address/3N1HYdheNiiTtHgi2n3jLAek6N3H4guaciG/limit/20?after=Ay5J4ZiFDVhRrLq4fdViiHHm5aiyrK3CYAN2nK6AkMA9'

You can adjust the proposed request to your app written in any programming language.

# Using JavaScript

You can use the fetchTransactions function of node-api-js library.

Example:

import { create } from "@waves/node-api-js";const nodeUrl = 'https://nodes-testnet.wavesnodes.com';const api = create(nodeUrl);let address = '3N1HYdheNiiTtHgi2n3jLAek6N3H4guaciG';let txList = await api.transactions.fetchTransactions(address,10);console.log('Transactions:' + txList.map(tx => '\nid: ' + tx.id + ' | type: ' + tx.type + ' | senderPublicKey: ' + tx.senderPublicKey));

# Using Python

import requestsnode_url = 'https://nodes-testnet.wavesnodes.com'address = '3N4iKL6ikwxiL7yNvWQmw7rg3wGna8uL6LU'limit = 10after = '5VsNkFuEsxwaZRHezQkTsfkf7cJxjRGBiahn3H1raKsT'transactions = requests.get(f'{node_url}/transactions/address/{address}/limit/{limit}?after={after}').json()print(transactions)

# Blockchain Height and Current Time

The block height is a sequence number of a block in the blockchain. The blockchain height is a sequence number of the last block.

You can use timestamp of the last block as current time of the blockchain.

# Using Waves Explorer

  1. Go to https://wavesexplorer.com/.
  2. In the top right menu, select Mainnet or Testnet.

Current height is displayed above the list of blocks.

# Using Node REST API

To retrieve the blockchain height only, use GET /blocks/height method.

To retrieve all the headers of the last block, including height and timestamp, use GET /blocks/headers/last method.

See method descriptions in Swagger web interface.

Request example:

curl 'https://nodes-testnet.wavesnodes.com/blocks/headers/last'

You can adjust the proposed request to your app written in any programming language.

To get the entire block, both headers and transactions, use GET /blocks/last method.

# Using JavaScript

You can use the fetchHeadersLast function of node-api-js library.

Example:

import { create } from "@waves/node-api-js";const nodeUrl = 'https://nodes-testnet.wavesnodes.com';const api = create(nodeUrl);let topBlock = await api.blocks.fetchHeadersLast();console.log('Currrent height: ' + topBlock.height);console.log('Current time: '+ Date(topBlock.timestamp));

# Using Python

import requestsnode_url = 'https://nodes-testnet.wavesnodes.com'blockchain_height = requests.get(f'{node_url}/blocks/height').json()print(blockchain_height)last_block_headers = requests.get(f'{node_url}/blocks/headers/last').json()print(last_block_headers)
How to Retrieve Information from the Blockchain (2024)

FAQs

How to retrieve data from the blockchain? ›

Users can search for specific addresses, transactions, or blocks to retrieve relevant data. Using APIs (Application Programming Interfaces): Blockchain networks often provide APIs that developers can utilize to programmatically access blockchain data.

How to recover 12 word phrase blockchain? ›

If you backed up your wallet using its 12 word recovery phrase, then you can recover your funds by going to this link and clicking "Recover via 12 Word Recovery Phrase" button. If the "Continue" button is inactive or you receive an “Invalid Recovery Phrase” error, then the recovery phrase submitted is inaccurate.

How do I retrieve my blockchain account? ›

On the Web:
  1. Go to https://login.blockchain.com/en/#/recover or click Forgot your password?
  2. Click Use your recovery phrase.
  3. Enter your recovery phrase and click Continue.
  4. Enter your new password, confirm it and click Reset Password.
  5. That's it, your wallet has been recovered.
Oct 23, 2023

How do I get my crypto back from the blockchain? ›

On the web
  1. Login to your Exchange account via desktop web browser.
  2. Click Withdraw in the top right corner, select Crypto and choose the asset you'd like to withdraw.
  3. Next, type or paste the address to which you'd like to send funds to or select your Blockchain.com Wallet Account if you want to withdraw crypto there.
Mar 5, 2024

How to view blockchain data? ›

You can see every transaction on the blockchain using a blockchain explorer - with the exclusion of private blockchains like Monero. If you have someone's wallet address, all you need to do is enter it into a blockchain explorer and you'll be able to see all the transactions associated with that address.

How do I see all my blockchain transactions? ›

On the blockchain explorer
  1. Go to the blockchain explorer that you'd like to check the transaction on.
  2. Paste the transaction ID or address into the search bar.
  3. On the transaction screen, you'll see whether the transaction was confirmed, unconfirmed or has failed.

What is the secret recovery phrase in blockchain? ›

— Your Secret Recovery Phrase (or seed phrase) is the backup of all the private keys stored in a given crypto wallet. It allows you to recover all of your blockchain addresses, even without the original crypto wallet.

What is an example of a 12-word recovery phrase? ›

Here is an example of a 12-word seed phrase: timber, sword, where, noodle, joy, eagle, admit, tuna, vibrant, museum, gossip, river. The standard method for seed phrases is called BIP-39 —short for Bitcoin improvement proposal-39. BIP-39 was introduced in 2013 with a list of 2,048 words that could be in seed phrases.

What is the 12-word secret phrase? ›

Your 12-word secret recovery phrase is the key to your wallet and controls access to all your funds, so write it down and keep it safe! If your device is lost or stolen, the only way to recover your funds is with your secret recovery phrase.

How do I access my blockchain? ›

How can I login to my Blockchain Exchange Account?
  1. Login with your email address.
  2. Check your mailbox for an email from Blockchain.com. Open it and approve your login.
  3. Return to the app or a web tab and enter your password.
  4. Authenticate with a 2FA code if you have it enabled.
Mar 4, 2024

Where is blockchain history stored? ›

Blockchain does not store any of its information in a central location. Instead, the blockchain is copied and spread across a network of computers. Whenever a new block is added to the blockchain, every computer on the network updates its blockchain to reflect the change.

How do I trace a blockchain? ›

To identify the recipient of a Bitcoin transaction you've made, one must have the transaction ID and access a blockchain explorer. By entering this ID into the explorer, one can view the details of the transaction including the receiving address.

How do I get my money out of blockchain? ›

On iOS/Android
  1. Login to your Wallet on the Blockchain.com iOS/Android app.
  2. Switch from DeFi Wallet to Blockchain.com Account if necessary.
  3. On the homepage, select US Dollar.
  4. Click Cash Out and select your linked wire bank account.
Mar 26, 2024

How to recover Bitcoin with 12 words? ›

Enter your 12-word recovery phrase and select the coin (BTC, BCH, ETH, AVAX) for the wallet you want to import. Please note that when entering your phrase, all words must be lowercase with a single space between them, and no space after the final word. Once you have entered all 12 words correctly, tap "Import"

How to recover a blockchain private key? ›

The process for restoring a private key for a cryptocurrency wallet using the public address isn't possible because the public address doesn't save your private key, In order to restore your private key, you need to use your seed phrase/back up phrase that's associated with the wallet to generate the private key and ...

How to read the data from a block in blockchain? ›

You can read blockchain data with the help of block explorers. Blockchain explorers or block explorers are the gateways for users to read all transactions registered on the blockchain network. It can help you find the balance on each address registered on the blockchain alongside the details of every transaction.

Where is the blockchain data stored? ›

In a blockchain, data is stored in a decentralized manner across a network of computers or nodes where blocks are chained together. Each block stores transactions, and when a block is full, a new block is created and linked to the previous one, forming a chain.

How do I download data from Blockchain com? ›

In the left navigation panel, select the currency you're interested in (e.g. Bitcoin). If you have transaction history for that currency, there will be a Download button on the right next to the search bar.

How do you access the blockchain? ›

Enjoy safe and fast cryptocurrency trade just by logging in to the Blockchain.com Exchange.
  1. Login with your email address.
  2. Check your mailbox for an email from Blockchain.com. Open it and approve your login.
  3. Return to the app or a web tab and enter your password.
  4. Authenticate with a 2FA code if you have it enabled.
Mar 4, 2024

Top Articles
Consumer Behavior
"quarter past two (2:15)" in French
Somboun Asian Market
Cold Air Intake - High-flow, Roto-mold Tube - TOYOTA TACOMA V6-4.0
Ffxiv Shelfeye Reaver
Craftsman M230 Lawn Mower Oil Change
Wisconsin Women's Volleyball Team Leaked Pictures
Cad Calls Meriden Ct
Wmu Course Offerings
Top Financial Advisors in the U.S.
Corpse Bride Soap2Day
Optum Medicare Support
Pbr Wisconsin Baseball
Espn Expert Picks Week 2
454 Cu In Liters
4156303136
Painting Jobs Craigslist
Kamzz Llc
EASYfelt Plafondeiland
At&T Outage Today 2022 Map
Jordan Poyer Wiki
kvoa.com | News 4 Tucson
Cornedbeefapproved
Aes Salt Lake City Showdown
Stockton (California) – Travel guide at Wikivoyage
Primerica Shareholder Account
Kelley Fliehler Wikipedia
Willys Pickup For Sale Craigslist
County Cricket Championship, day one - scores, radio commentary & live text
Otis Offender Michigan
Stolen Touches Neva Altaj Read Online Free
Www Craigslist Com Shreveport Louisiana
How to Watch the X Trilogy Starring Mia Goth in Chronological Order
Seymour Johnson AFB | MilitaryINSTALLATIONS
Junee Warehouse | Imamother
Tds Wifi Outage
Elgin Il Building Department
Hindilinks4U Bollywood Action Movies
Ticket To Paradise Showtimes Near Marshall 6 Theatre
Pokemon Reborn Locations
Craigslist Tulsa Ok Farm And Garden
Cranston Sewer Tax
412Doctors
Timothy Warren Cobb Obituary
Professors Helpers Abbreviation
Dontrell Nelson - 2016 - Football - University of Memphis Athletics
Copd Active Learning Template
Bonecrusher Upgrade Rs3
The 13 best home gym equipment and machines of 2023
Kidcheck Login
Guidance | GreenStar™ 3 2630 Display
Latest Posts
Article information

Author: Van Hayes

Last Updated:

Views: 6548

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Van Hayes

Birthday: 1994-06-07

Address: 2004 Kling Rapid, New Destiny, MT 64658-2367

Phone: +512425013758

Job: National Farming Director

Hobby: Reading, Polo, Genealogy, amateur radio, Scouting, Stand-up comedy, Cryptography

Introduction: My name is Van Hayes, I am a thankful, friendly, smiling, calm, powerful, fine, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.