IotaClient provides comprehensive read APIs to query blockchain data. This guide covers the most common data retrieval operations.
Getting Objects
Get Single Object
Fetch details for a specific object by its ID:Get Multiple Objects
Fetch multiple objects in a single batch request:Get Owned Objects
Fetch all objects owned by an address:Querying Coins
Get Coins by Type
Fetch coins of a specific type owned by an address:Get All Coins
Fetch all coin objects owned by an address:Get Coin Balance
Fetch the total balance for a specific coin type:Get All Balances
Fetch balances for all coin types owned by an address:Get Coin Metadata
Querying Transactions
Get Transaction by Digest
Fetch transaction details using its digest:Get Multiple Transactions
Fetch multiple transactions in a batch:Query Transactions
Query transactions with filters:Querying Checkpoints
Get Latest Checkpoints
Fetch the latest checkpoints in descending order:Get Specific Checkpoint
Fetch a checkpoint by its sequence number:Querying Events
Query events created by transactions:Query Options
Most query methods accept anoptions parameter to control which fields are returned:
- Object Options
- Transaction Options
Pagination
Many query methods support pagination:Dynamic Fields
Query dynamic fields of an object:Move Module Information
Get Normalized Move Module
Get All Modules in a Package
Get Move Function Argument Types
Protocol and Network Information
Get Protocol Configuration
Get Chain Identifier
Get Total Supply
Best Practices
Use Batch Requests
Use Batch Requests
When fetching multiple objects or transactions, use batch methods like
multiGetObjects() or multiGetTransactions() instead of making individual requests:Request Only Needed Fields
Request Only Needed Fields
Use the
options parameter to request only the fields you need:Handle Pagination Properly
Handle Pagination Properly
For large result sets, implement proper pagination:
Next Steps
Transactions
Learn how to build and execute transactions
Events
Subscribe to and query blockchain events
GraphQL Transport
Use GraphQL for advanced queries
Examples
See complete code examples