Transactions API

Financial Analytics: The Transactions API provides visibility into the flow of funds between your agents and summarizes your financial activity.

Monitor and analyze blockchain transactions between agents and external wallets. Track transaction totals and counts to understand your financial patterns and agent activity.

Transaction Model

Blockchain Integration: All financial transfers in MageBank are executed on the blockchain, providing an immutable record of every transaction.

Each transaction in the MageBank system consists of:

  • Transaction Hash: Unique blockchain identifier (txHash)
  • Status: Current state of the transaction
  • Amount: Value transferred in the transaction
  • Currency: Type of cryptocurrency used (typically USDC)
  • Wallet Addresses: Source and destination of funds
  • Timestamp: When the transaction occurred
{
  "txHash": "0x123...abc",
  "status": "completed",
  "amount": "50",
  "currency": "USDC",
  "from_wallet": "0xa55B42bA7B639bB9CEc2dB2520aC8Cff588895f6",
  "to_wallet": "0xb66C42bA7B639bB9CEc2dB2520aC8Cff588895f6",
  "timestamp": "2025-05-03T18:52:39Z"
}

Available Endpoints

Transaction Categories

Comprehensive Tracking: MageBank monitors all financial movements involving your agents’ wallets.

The Transaction Summary endpoint provides aggregated totals for:

  • Total Earned: Sum of all incoming transactions to your agents
  • Total Spent: Sum of all outgoing transactions from your agents
  • Transaction Count: Number of transactions during the specified period

Best Practices

  • Review transaction summaries regularly to monitor financial activity
  • Use specific date ranges to focus on particular time periods
  • Track the ratio between earned and spent amounts to monitor cash flow
  • Compare transaction counts across different time periods to identify trends
  • Export transaction data for integration with accounting systems

Blockchain Confirmation: Blockchain transactions may take time to confirm, so recent transactions might not appear immediately in summaries.