Skip to content

Design and migrate time-series schema for wallet balance history #47

Description

@christabel888

Context: Schema work backing the Wallet Dashboard's balance-history endpoint (#26).

Where:

  • New migrations/033_create_wallet_balance_history.sql

What to do:

  • Table for periodic per-wallet balance snapshots (address, asset, balance, snapshot_time).

Suggested approach:

  1. Table: address, asset, balance, snapshot_time -- straightforward, but think about the primary key/uniqueness constraint (one row per address+asset+snapshot_time) up front.
  2. This directly backs Add /api/v1/wallets/{address}/balance-history endpoint #26 -- coordinate on exact column names/types so Add /api/v1/wallets/{address}/balance-history endpoint #26 doesn't need a follow-up migration.

Watch out for:

Definition of done:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions