oms.indexer to read balances and transaction history after creating OMSClient. Requests use the publishable key configured for the client, and token amounts are returned as raw base-unit strings.
Pass explicit SDK OmsNetwork values with networks, or omit networks and use networkType. When both are omitted, networkType defaults to MAINNETS.
Get Balances
| Parameter | Type | Description |
|---|---|---|
walletAddress | string | Wallet address to inspect. This can be the active wallet or any wallet address. |
networks | OmsNetwork[] or undefined | Explicit networks to query. Use values from oms.supportedNetworks. |
networkType | 'MAINNETS', 'TESTNETS', 'ALL', or undefined | Network group to query when networks is omitted. Defaults to MAINNETS. |
contractAddresses | string[] or undefined | Optional token contract addresses to query. Omit it to query balances across token contracts. |
includeMetadata | boolean or undefined | Whether token metadata should be included in the response. Defaults to true. |
omitPrices | boolean, null, or undefined | Whether price fields should be omitted. |
tokenIds | string[] or undefined | Optional token IDs to filter by. |
contractStatus | 'VERIFIED', 'UNVERIFIED', 'ALL', null, or undefined | Contract verification status filter. |
page.page | number or undefined | Optional page number. Defaults to 0 when page is omitted. |
page.pageSize | number or undefined | Optional page size. Defaults to the SDK response default when omitted. |
oms.indexer.getBalances returns Promise<OmsBalancesResult>.
| Field | Type | Description |
|---|---|---|
status | number | HTTP status code from the balance response. |
page | OmsTokenBalancesPage, null, or undefined | Pagination metadata from the balance response. |
nativeBalances | OmsTokenBalance[] | Native token balances returned for the wallet. |
balances | OmsTokenBalance[] | Token contract balances returned for the wallet. |
Get Transaction History
| Parameter | Type | Description |
|---|---|---|
walletAddress | string | Wallet address to inspect. This can be the active wallet or any wallet address. |
networks | OmsNetwork[] or undefined | Explicit networks to query. Use values from oms.supportedNetworks. |
networkType | 'MAINNETS', 'TESTNETS', 'ALL', or undefined | Network group to query when networks is omitted. Defaults to MAINNETS. |
contractAddresses | string[] or undefined | Optional token contract addresses to filter by. |
transactionHashes | string[] or undefined | Optional on-chain transaction hashes to filter by. |
metaTransactionIds | string[] or undefined | Optional wallet transaction ID filters, such as txnId returned by transaction APIs. |
fromBlock | number, null, or undefined | Optional lower block number bound. |
toBlock | number, null, or undefined | Optional upper block number bound. |
tokenId | string, null, or undefined | Optional token ID filter. |
includeMetadata | boolean or undefined | Whether token metadata should be included in the response. Defaults to true. |
omitPrices | boolean, null, or undefined | Whether price fields should be omitted. |
metadataOptions.verifiedOnly | boolean or undefined | Include metadata only for verified contracts. |
metadataOptions.unverifiedOnly | boolean or undefined | Include metadata only for unverified contracts. |
metadataOptions.includeContracts | string[] or undefined | Contract addresses for metadata inclusion. |
page.page | number or undefined | Optional page number. Defaults to 0 when page is omitted. |
page.pageSize | number or undefined | Optional page size. Defaults to the SDK response default when omitted. |
oms.indexer.getTransactionHistory returns Promise<OmsTransactionHistoryResult>.
| Field | Type | Description |
|---|---|---|
status | number | HTTP status code from the transaction-history response. |
page | OmsTokenBalancesPage, null, or undefined | Pagination metadata from the transaction-history response. |
transactions | OmsTransaction[] | Transactions returned for the wallet. |
Token Balance Shape
EachOmsTokenBalance can include:
| Field | Type | Description |
|---|---|---|
contractType | string or null | Token contract type, such as ERC20, ERC721, or NATIVE. |
contractAddress | string or null | Token contract address. Native token balances do not include a contract address. |
accountAddress | string or null | Wallet address queried. |
tokenId | string or null | Token ID for token types that use IDs. |
name | string, null, or undefined | Token name. |
symbol | string, null, or undefined | Token symbol. |
balance | string or null | Raw base-unit balance as a string. |
balanceUSD | string, null, or undefined | Balance value in USD when prices are included. |
priceUSD | string, null, or undefined | Token price in USD when prices are included. |
priceUpdatedAt | string, null, or undefined | Timestamp for the price. |
blockHash | string or null | Block hash for the balance snapshot. |
blockNumber | number, null, or undefined | Block number for the balance snapshot. |
chainId | number, null, or undefined | Numeric chain ID. |
uniqueCollectibles | string, null, or undefined | Unique collectible count for NFT summary rows. |
isSummary | boolean, null, or undefined | Whether the row summarizes a set of balances. |
contractInfo | OmsTokenContractInfo, null, or undefined | Token contract metadata when requested and available. |
tokenMetadata | OmsTokenMetadata, null, or undefined | Token metadata when requested and available. |
Transaction Shape
EachOmsTransaction can include:
| Field | Type | Description |
|---|---|---|
txnHash | string or null | On-chain transaction hash. |
blockNumber | number or null | Block number. |
blockHash | string or null | Block hash. |
chainId | number or null | Numeric chain ID. |
metaTxnId | string, null, or undefined | Wallet transaction ID when available. |
transfers | OmsTransactionTransfer[], null, or undefined | Token transfers included in the transaction. |
timestamp | string, null, or undefined | Transaction timestamp. |