Returns snapshot metadata plus computed row counts for bars and instruments. This function does not mutate the database.
Details
Timestamps are returned as ISO8601 UTC strings with trailing Z.
Errors:
ledgr_invalid_conifconis not a valid DBI connection.ledgr_invalid_argsifstatusis not NULL or contains invalid values.
Examples
db_path <- tempfile(fileext = ".duckdb")
con <- ledgr_db_init(db_path)
ledgr_snapshot_create(con, snapshot_id = "snapshot_20200101_000000_abcd")
#> [1] "snapshot_20200101_000000_abcd"
ledgr_snapshot_list(con)
#> # A tibble: 1 × 9
#> snapshot_id status created_at_utc sealed_at_utc snapshot_hash bar_count
#> <chr> <chr> <chr> <chr> <chr> <int>
#> 1 snapshot_20200101… CREAT… 2026-05-15T16… NA NA 0
#> # ℹ 3 more variables: instrument_count <int>, meta_json <chr>, error_msg <chr>
ledgr_snapshot_list(db_path)
#> # A tibble: 1 × 9
#> snapshot_id status created_at_utc sealed_at_utc snapshot_hash bar_count
#> <chr> <chr> <chr> <chr> <chr> <int>
#> 1 snapshot_20200101… CREAT… 2026-05-15T16… NA NA 0
#> # ℹ 3 more variables: instrument_count <int>, meta_json <chr>, error_msg <chr>
DBI::dbDisconnect(con, shutdown = TRUE)