# Interact With Node
Before using Assets and Address API methods, include the following initialization snippet at the beginning of each script:
// Required imports.
using WavesLabs.Node.Client;
// Node instance creation in the given network: Testnet, Mainnet, or Stagenet.
var node = new Node(Profile.MainNet);
# Assets API
You can get:
- Asset Balance Distribution.
- All Asset Balances for an Address.
- Balance of a Specific Asset.
- Asset Details.
- Non-Fungible Tokens (NFTs) at an Address.
# Asset Balance Distribution
Endpoint: GET /assets/{assetId}/distribution/{height}/limit/{limit}
// Asset balance distribution by the account addresses.
var assetDistribution = node.GetAssetDistribution(assetId, height);
var assetDistribution = node.GetAssetDistribution(assetId, height, limit);
var assetDistribution = node.GetAssetDistribution(assetId, height, limit, afterAddress);
# All Asset Balances for an Address
Endpoint: GET /assets/balance/{address}
// Account balance of all assets, excluding WAVES.
var assetBalances = node.GetAssetsBalance(address);
# Balance of a Specific Asset
Endpoint: GET /assets/balance/{address}/{assetId}
// Account balance of the given asset.
var assetBalance = node.GetAssetBalance(address, assetId);
# Asset Details
Endpoint: GET /assets/details/{assetId}
// Detailed information about the given asset.
var assetDetails = node.GetAssetDetails(assetId);
# Non-Fungible Tokens (NFTs) at an Address
Endpoint: GET /assets/nft/{address}/limit/{limit}
// List of non-fungible tokens at the given address.
var assetDetailsList = node.GetNft(address);
var assetDetailsList = node.GetNft(address, limit);
var assetDetailsList = node.GetNft(address, limit, afterAssetId);
# Addresses API
You can get:
- All Addresses in the Node Wallet.
- A Range of Addresses.
- WAVES Balance of an Address.
- WAVES Balance with Confirmations.
- Detailed Balance Information.
- Balances for Multiple Addresses.
- Account Data Entries by Address.
- Account Data Entries by Keys.
- Data Entry by Key.
- Script Information of an Account.
- Account Script Metadata.
# All Addresses in the Node Wallet
Endpoint: GET /addresses
// List of account addresses in the node wallet.
var addresses = node.GetAddresses()
# Range of Addresses
Endpoint: GET /addresses/seq/{from}/{to}
// List of account addresses in the given range of the node's wallet.
var addresses = node.GetAddresses(fromIndex, oIndex);
# WAVES Balance of an Address
Endpoint: GET /addresses/balance/{address}
// Regular balance in WAVES at the given address.
var addressBalance = node.GetBalance(address)
# WAVES Balance with Confirmations
Endpoint: GET /addresses/balance/{address}/{confirmations}
// Regular balance in WAVES at the given address with the given confirmations.
var addressBalance = node.GetBalance(address, confirmations);
# Detailed Balance Information
Endpoint: GET /addresses/balance/details/{address}
// Available, regular, generating, and effective account balances.
var balanceDetails = node.GetBalanceDetails(address);
# Balances for Multiple Addresses
Endpoint: POST /addresses/balance
// Create a list of addresses.
var addresses = new List<Address> {
new Address("<insert base58 address>"),
new Address("<insert base58 address>")
};
// Get the regular balances for multiple addresses.
var addressBalances = node.GetBalances(addresses);
# Account Data Entries by Address
Endpoint: GET /addresses/data/{address}
// Account data entries by the given address.
var dataEntries = node.GetData(address);
# Account Data Entries by Keys
Endpoint: POST /addresses/data/{address}
// Account data entries by the given keys.
var dataEntries = node.GetData(address, keysList);
# Data Entry by Key
Endpoint: GET /addresses/data/{address}/{key}
// Account data entries by the given key.
var dataEntries = node.GetData(address, key);
# Script Information of an Account
Endpoint: GET /addresses/scriptInfo/{address}
// Account script or dApp script information by the given address.
var scriptInfo = node.GetScriptInfo(address);
# Account Script Metadata
Endpoint: GET /addresses/scriptInfo/{address}/meta
// Account script meta data.
var scriptMeta = node.GetScriptMeta(address);