<p>A relatively simple bit of SQL should allow you to grab this from <code>cardano-db-sync</code>. IN the git repo there is a file <code>doc/interesting-queries,md</code> that may give some clues.</p>

CC BY-SA 4.0
2022-04-21T08:02:02.973Z
2022-04-21T08:02:02.973Z
Erik de Castro Lopo
<p>Thanks to Erik I've found a query for historical queries for a UTxO set of a specific address that can be found here:</p>
<p><a href="https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/interesting-queries.md#get-historical-utxo-set-for-a-given-timestamp" rel="nofollow noreferrer">Get historical UTxO set for given timestamp</a></p>

CC BY-SA 4.0
2022-04-21T08:10:06.020Z
2022-04-21T08:10:06.020Z
Will
<p>I would like to create snapshots of the set of UTxOs at the end of each epoch for a particular address.</p>
<p><strong>What would be best ways to do something like that?</strong></p>
<p><em>Constraints/ Ideas</em></p>
<p>The current tools I am aware of is just querying the address' UTxOs using the cardano-cli. But I'd like ensure that I get the exact UTxO set of a specific address at the start of the next epoch and using the cli seems error prone since rollbacks may happen or my node may not have all UTxOs synched during epoch boundaries.</p>

<cardano-cli><cardano-db-sync><chain>
Best ways to create UTxO snapshots at epoch boundary
# Best ways to create UTxO snapshots at epoch boundary

(Asked by: username_0 on 2022-04-21)

I would like to create snapshots of the set of UTxOs at the end of each epoch for a particular address.

**What would be best ways to do something like that?**

*Constraints/ Ideas*

The current tools I am aware of is just querying the address' UTxOs using the cardano-cli. But I'd like ensure that I get the exact UTxO set of a specific address at the start of the next epoch and using the cli seems error prone since rollbacks may happen or my node may not have all UTxOs synched during epoch boundaries.

**Tags:** cardano-cli, cardano-db-sync, chain

---

## 2 answers

### Answer by username_1 on 2022-04-21. Score: 1 | Accepted answer

A relatively simple bit of SQL should allow you to grab this from `cardano-db-sync`. IN the git repo there is a file `doc/interesting-queries,md` that may give some clues.


---

### Answer by username_0 on 2022-04-21. Score: 2

Thanks to Erik I've found a query for historical queries for a UTxO set of a specific address that can be found here:

[Get historical UTxO set for given timestamp](https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/interesting-queries.md#get-historical-utxo-set-for-a-given-timestamp)


---

