Get Account Transactions

Once an application is connected to Martian wallet via connect method, an app can fetch an account transactions using window.martian.getAccountTransactions()and it will return a Promise that resolves when the request is successful and reject (throw when awaited) when the request is not valid/fails. It takes two parameter listed below

  • address: Any valid aptos address

  • query?: {start?: number, limit?: number}

    • query.start The start transaction version of the page. Default is the latest ledger version

    • query.limit The max number of transactions should be returned for the page. Default is 25

Below is an example code describing the way to fetch an account transactions.

// Fetch user transactions
const response = await window.martian.connect();
const address = response.address;
const transactions = await window.martian.getAccountTransactions(address);

Last updated