Skip to content

[FEATURE] Transaction History API — Query blockchain transactions with filtering #233

@gelluisaac

Description

@gelluisaac

Description

Build the REST API for querying blockchain transaction history with rich filtering.
This feeds the TransactionHistoryPage component in the web frontend.

Endpoints

  • GET /api/v1/transactions — List transactions with filters
    • Query params: source_account, destination_account, asset_code,
      start_date, end_date, min_amount, max_amount, operation_type,
      successful, page, page_size
  • GET /api/v1/transactions/{hash} — Get single transaction by hash
  • GET /api/v1/transactions/stats — Aggregated stats (total volume, count by asset, etc.)

Implementation Details

  • Use SQLAlchemy filtering with parameterized queries
  • Indexes on: (source_account, timestamp), (destination_account, timestamp), hash
  • Response schema matches BlockchainTransaction / TransactionHistoryResponse in web/src/lib/types.ts

Acceptance Criteria

  • All filter parameters work correctly
  • Compound filters (e.g., source + date range) are efficient
  • Missing optional filters default to no filtering
  • Transaction stats return correctly aggregated data

Labels

enhancement, api

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions