Subscribe to the account-related transaction events.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "portfolio.transactions.subscribe",
  "params": {
    "with_snapshot": true
  }
}

Parameters:

  • with_snapshot: Whether to include the snapshot in the response. It may incur additional API credit spending.
  • from_block_id: Specifies the block from which to start sending the events. See more information about this in the Managing Data Integrity section.

Snapshots

The snapshot format is the same as v1/portfolio/history/transactions endpoint response. Returns the last 100 transactions.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "portfolio.transactions.snapshot",
  "params": {
    "data": [
      {
        "type": "deposit", // or "withdraw", "fee..."
        "amount": "100",
        "tx_info": {
          "tx_hash": "0xb427d9f5c2ecb41fd1e4741dbe52181091d530908c819b35d0401c6d835a2a22",
          "event_id": "123456-4",
          "block_timestamp": "2024-05-07T10:30:00Z"
        }
      }
    ]
  }
}

Events

The event format is the same as v1/portfolio/history/transactions endpoint response.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "portfolio.transactions.event",
  "params": {
    "data": {
      "type": "deposit",
      "amount": "100",
      "tx_info": {
        "tx_hash": "0xb427d9f5c2ecb41fd1e4741dbe52181091d530908c819b35d0401c6d835a2a22",
        "event_id": "123456-4",
        "block_timestamp": "2024-05-07T10:30:00Z"
      }
    }
  }
}