Martian Wallet Dev Docs
HomeChrome web store
  • Introduction
  • 🏗️Integration
    • Detecting the Provider
    • Establishing a Connection
    • Displaying Your App
  • ⚙️methods
    • Aptos
      • Generate Transaction
      • Sign Transaction
      • Submit Transaction
      • Sign and Submit Transaction
      • Sign Generic Transaction
      • Generate Sign and Submit Transaction
      • Create Collection
      • Create Token
      • Add Network
      • Change Network
      • Get Networks
      • Get Transaction
      • Get Transactions
      • Get Account Transactions
      • Get Account Resources
      • Get Account
      • Get Chain Id
      • Get Ledger Info
    • Sui
      • Sign Transaction Block
      • Sign and Execute Transaction
      • Get Public Key
      • Get Old Address
      • Get Accounts
    • Sign Message
    • Get Network
    • Get Current Blockchain
    • Cancel Submitted Transactions
    • Network Change Event
    • Account Change Event
Powered by GitBook
On this page
  1. methods
  2. Aptos

Get Account Transactions

PreviousGet TransactionsNextGet Account Resources

Last updated 2 years ago

Once an application is connected to Martian wallet via method, an app can fetch an account transactions using window.martian.getAccountTransactions()and it will return a 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);
⚙️
Promise
connect