Skip to main content
Use transaction history to audit what your agent has done during a session — for example, calculating total fees paid, verifying that a swap executed correctly, or building a trade log.

List Transactions

Get transaction history with asset changes.
def transactions() -> TransactionsResponse
Response:
  • success (boolean): Whether the operation succeeded
  • data (array): Array of asset changes
    • network (string): Network identifier
    • transactionHash (string): Transaction hash
    • fromAddress (string): Sender address
    • toAddress (string): Recipient address
    • amount (string): Amount transferred (string to preserve precision)
    • tokenAddress (string): Token contract address (canonical native address for native tokens)
    • tokenId (string | null): Token ID for NFTs (null for fungible tokens)
    • tokenType (string): Token type (“native”, “ERC20”, “ERC721”, etc.)
    • tokenUsdPrice (string | null): Token price in USD at transaction time
    • timestamp (string): Transaction timestamp
  • error (string | null): Error message (on failure)
Example:
result = agent.transactions()
if result.success and result.data:
    agent.log(f"Found {len(result.data)} asset changes")

    outgoing = [c for c in result.data if c.fromAddress == agent.sessionWalletAddress]
    agent.log(f"Outgoing transfers: {len(outgoing)}")

Notes

  • Indexing speed varies by chain and may have a delay, so new transactions may not appear here immediately.
  • Amounts are strings to preserve precision for large numbers.
  • The ledger covers on-chain asset changes only: "ethereum:{chainId}" for EVM chains and "solana" for Solana. Hyperliquid trades are not on-chain transfers and do not appear here — read live state via agent.platforms.hyperliquid instead.
  • Field names are camelCase in both TypeScript and Python — the sender is fromAddress, the recipient is toAddress, and the token contract is tokenAddress.
  • tokenType values: "native", "ERC20", "ERC721", "ERC1155", "SPL".
  • tokenUsdPrice may be null if the price was not available at indexing time.

See Also

  • Positions — Check current balances instead of inferring from history
  • Swap — Execute swaps that generate transaction records
  • Error Handling — Handle failures in transacting methods that generate history