List vault accounts (Paginated)

Gets all vault accounts in your workspace. This endpoint returns a limited amount of results with a quick response time.


Examples on how to use this endpoint using the Javascript and Python SDKs:

const FireblocksSDK = require("fireblocks-sdk").FireblocksSDK;
const fs = require('fs');
const path = require('path');

// Fireblocks Configuration - Insert Key path and API Key here
const apiSecret = fs.readFileSync(path.resolve(__dirname, "YOUR_API_SECRET_HERE"), "utf8");
const apiKey = "YOUR_API_KEY_HERE"; 
const fireblocks = new FireblocksSDK(apiSecret, apiKey);

/*
Possible filter options:
    namePrefix (string, optional): Vault account name prefix
    nameSuffix (string, optional): Vault account name suffix
    minAmountThreshold (number, optional):  The minimum amount for asset to have in order to be included in the results
    assetId (string, optional): The asset symbol
    orderBy ("ASC"/"DESC", optional): Order of results by vault creation time (default: "DESC")
    limit (number, optional): Results page size
    before (string, optional): cursor string received from previous request
    after (string, optional): cursor string received from previous request
*/

async function getVaultAccountsPaged() {
    let nextPage = true;
    let pagedFilter = {};
    let vaults = await fireblocks.getVaultAccountsWithPageInfo(pagedFilter);
    console.log(JSON.stringify(vaults, null, 2));
    while (nextPage){
        // Your additional logic here ...
        // End of additional logic ...
        // Verify if there is an additional page of vaults
        if (vaults['paging'].after !== undefined){
            // Update pointer to next page
            pagedFilter = vaults['paging'];
            vaults = await fireblocks.getVaultAccountsWithPageInfo(pagedFilter);
            console.log(JSON.stringify(vaults, null, 2));
        }
        else{
            nextPage = false;
        }
    }
}

getVaultAccountsPaged();
from fireblocks_sdk import FireblocksSDK, PagedVaultAccountsRequestFilters
​
# Fireblocks Configuration - Insert Key path and API Key here
FBKS_SECRET = open("<YOUR_SECRET_KEY_PATH_HERE>").read()
FBKS_KEY = "<YOUR_API_KEY_HERE>"
FBKS = FireblocksSDK(private_key=FBKS_SECRET, api_key=FBKS_KEY)
# # # # # # # # # # # # # # # #
​
next_page = True
paged_filter = PagedVaultAccountsRequestFilters()
'''
Possible filter options:
    name_prefix (string, optional): Vault account name prefix
    name_suffix (string, optional): Vault account name suffix
    min_amount_threshold (number, optional):  The minimum amount for asset to have in order to be included in the results
    asset_id (string, optional): The asset symbol
    order_by (ASC/DESC, optional): Order of results by vault creation time (default: DESC)
    limit (number, optional): Results page size
    before (string, optional): cursor string received from previous request
    after (string, optional): cursor string received from previous request
'''
​
​
while next_page:
    vaults = FBKS.get_vault_accounts_with_page_info(paged_filter)
    paging = vaults['paging']
    accounts = vaults['accounts']
​
    # Your additional logic here ...
​
    # End of additional logic ...
​
    # Verify if there is an additional page of vaults
    if 'after' not in paging:
        # Update pointer to next page
        paged_filter.after = paging['after']
        next_page = False
Language