Skip to content

[FEATURE] Account API Endpoints — CRUD endpoints for Stellar accounts with pagination #232

@gelluisaac

Description

@gelluisaac

Description

Implement REST endpoints for querying Stellar accounts from the database.

Endpoints

  • GET /api/v1/accounts — List accounts (paginated, filterable by public_key, date range)
  • GET /api/v1/accounts/{public_key} — Get single account details
  • GET /api/v1/accounts/{public_key}/transactions — Transactions for a specific account
  • GET /api/v1/accounts/{public_key}/fraud-summary — Fraud alerts summary for an account
  • GET /api/v1/accounts/{public_key}/loyalty — Loyalty points and tier for an account

Implementation Details

  • Use FastAPI dependency injection for database sessions
  • Pagination via page and page_size query parameters
  • Return total count for pagination metadata
  • Use Pydantic schemas for request/response validation (api/schemas/)

Acceptance Criteria

  • All endpoints return correct data from the database
  • Pagination works correctly (default page_size=20, max=100)
  • Invalid account IDs return 404
  • Response format matches what the frontend expects

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