'How to get Cardano unspent transaction outputs (UTxO) via API?

Currently, I can get only Cardano (ADA) "balance" via blockchain API but it does not include UTXOs. I want to find the way how to get UTXO of Cardano address.

I use Python to get API.



Solution 1:[1]

You can setup cardano rosetta server and fetch account coins and balance details from here:

https://www.rosetta-api.org/docs/AccountApi.html

and then you can create the utxo formats from here:

https://github.com/input-output-hk/cardano-rosetta/blob/master/examples/commons.ts

Solution 2:[2]

In Python module for Cardano, the Wallet object has a utxo_stats() method which returns a histogram of UTxO statistics. The result consists of three elements: total balance, histogram and scale.

wallet.utxo_stats()

Solution 3:[3]

Found the BlockFrost API was able to do this with minimal effort.

I was using the .Net API but they have API for python. Seems to be the best service I have found so far.

https://docs.blockfrost.io/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rajkumar Tiwari
Solution 2 Andy Jazz
Solution 3