Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

paginate_accounts

Fetch every account in the indexer's accounts connection, paginating forward.

Signature

pub async fn paginate_accounts(
    &self,
    page_size: i64,
    variables: accounts::Variables,
) -> Result<Vec<accounts::AccountsAccountsNodes>, anyhow::Error>;

Example

use {
    anyhow::Result,
    dango_sdk::{HttpClient, accounts},
};
 
#[tokio::main]
async fn main() -> Result<()> {
    let client = HttpClient::new("https://api-mainnet.dango.zone")?;
 
    let accounts = client
        .paginate_accounts(100, accounts::Variables::default())
        .await?;
 
    println!("{} accounts", accounts.len());
    Ok(())
}

Parameters

page_sizei64. Number of items per request. The indexer caps first at 100.

variablesaccounts::Variables. Query filters. Pagination fields (after, before, first, last) are overwritten by the loop; only the filter fields you set are honored.

Returns

Vec<accounts::AccountsAccountsNodes> — every node in the connection, in the indexer's natural order.

Notes

  • This wrapper only does forward pagination. Use paginate_all for backward traversal.
  • Stops when page_info.has_next_page is false or end_cursor is None.

See also