Skip to main content
GET
/
onchain_data
/
base_asset_id
/
{baseAssetId}
/
contract_address
/
{contractAddress}
/
balances
TypeScript
const response: Promise<FireblocksResponse<AddressBalancePagedResponse>> = fireblocks.onchainData.getLatestBalancesForContract(onchainDataApiGetLatestBalancesForContractRequest);
{
  "data": [
    {
      "accountAddress": "0x1234567890123456789012345678901234567890",
      "balance": "1000000000000000000",
      "lastUpdated": "2023-12-01T12:00:00.000Z"
    }
  ],
  "next": "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==",
  "prev": "dGhpcyBpcyBhIHByZXZpb3VzIGN1cnNvcg==",
  "total": 150
}

Documentation Index

Fetch the complete documentation index at: https://fireblocks-43c4b3ee-chore-add-cli.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

baseAssetId
string
required

The blockchain base assetId

contractAddress
string
required

The contract address

Query Parameters

accountAddress
string

Optional filter to get balance for a specific account address

Example:

"0x1234567890abcdef1234567890abcdef12345678"

pageCursor
string

Page cursor to get the next page"

pageSize
integer

Number of items per page (max 100), requesting more then 100 will return 100 items

Required range: 1 <= x <= 100
sortBy
enum<string>
default:blockTimestamp

Sorting field for balances

Available options:
accountAddress,
blockTimestamp
order
enum<string>
default:DESC

ASC / DESC ordering (default DESC)

Available options:
ASC,
DESC

Response

Successfully retrieved the latest balances for the contract

data
object[]
required

Array of address balance data

next
string

Cursor for next page

Example:

"MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="

prev
string

Cursor for previous page (reserved for future support)

Example:

"dGhpcyBpcyBhIHByZXZpb3VzIGN1cnNvcg=="

total
number

Total count of items

Example:

150