<p>You don't need your payment signing key nor your staking signing key to get the list of UTxOs of any address, as this is public information. Though, you will need your spending private key to use a UTxO as input for a transaction.</p>
<p>With that said, you can get the list of UTxOs using function <code>utxos</code> from <code>pycardano</code>. Check the code here: <a href="https://github.com/cffls/pycardano/blob/22ab109fcfd75f4ba23d0aea620c09d92e1201c1/pycardano/backend/blockfrost.py#L111" rel="nofollow noreferrer">https://github.com/cffls/pycardano/blob/22ab109fcfd75f4ba23d0aea620c09d92e1201c1/pycardano/backend/blockfrost.py#L111</a></p>
<p>What this function will do is to get the list of UTxOs using <a href="https://docs.blockfrost.io/#tag/Cardano-Addresses/paths/%7E1addresses%7E1%7Baddress%7D%7E1utxos/get" rel="nofollow noreferrer">this Blockfrost API</a> under the hood.</p>

CC BY-SA 4.0
2022-06-09T21:09:07.253Z
Thank you for reply, but this method returns this `{'index': 1,
 'transaction_id': TransactionId(hex='2a4c7fb343a525d6bd044dce725882eed41a1f20cad9fdc21855dbb250eec761')},
 'output': {'address': addr1q8r32a0d8a6lp6ycrd02g9j5xljnzqvx2mkntpg4lzd6zkcyvp55w2vasj3favjz3uqcccef4vhet3z29596j2lf6shscxdf4y,
 'amount': 20099765,
 'datum_hash': None}`, and I expect exactly another value like in my topic.
Pavel R
CC BY-SA 4.0
2022-06-09T21:13:33.537Z
I am trying to automate the nft purchase process on jpeg.store. Purchase trx build request contains this value `"collateral":["82825820733717b579bfdace...8eafb97d2e60b0951a004c4b40"]`. But I have no idea how to get it.
Pavel R
CC BY-SA 4.0
2022-06-09T22:56:36.757Z
If I deserialize it from CBOR I will recive follow data `[[h'0E5569B3E2A645A849E5DB422A86F4705E947A294DFB0E7D04D88A5162482428', 1], [h'01709C2F10828D291925C6887375E90289B001C1521DEB3D3AA2F779E6C0E49B65E74CDDEAADA2C3A37CDC01416A6269ADAF84D82F49DA3BD9', 14320544]]`
Pavel R
CC BY-SA 4.0
2022-07-10T02:30:11.170Z
I don't know what is that value you are expecting really. Can you explain a little more where did you get that value from?
Falcon Stakepool
CC BY-SA 4.0
2022-08-03T11:53:07.017Z
I want to automate the purchase process on jpg.store and to build the transaction I need to send this data to the server. https://imgur.com/a/E5Nbr4R
Pavel R
CC BY-SA 4.0
2022-06-09T01:11:41.663Z
2022-06-09T01:11:41.663Z
Falcon Stakepool
<p>I have payment signing key and staking signing key of my wallet. How can I get transaction unspent outputs with <code>cardano-cli/cardano-serialization-lib/pycardano</code>.</p>
<p>I expect to get string like this <code>82825820eef507b798abbb8a1360efbd113f51eda22e2fbaae3cc32c78724c8644c164a40082583900756e62ff9667b187209b6fe1b577061491cf6f93a81e1f91741e2e3accb864ae67087f69bbd9ab74f71781d13ae40aab86e1de30ca7e21171a1dcd6500</code>.</p>
<p>Thank you.</p>

<cardano-cli><cardano-serialization-lib><utxo><python><output>
Get transaction unspent output value
# Get transaction unspent output value

(Asked by: username_0 on 2022-06-07)

I have payment signing key and staking signing key of my wallet. How can I get transaction unspent outputs with `cardano-cli/cardano-serialization-lib/pycardano`.

I expect to get string like this `82825820eef507b798abbb8a1360efbd113f51eda22e2fbaae3cc32c78724c8644c164a40082583900756e62ff9667b187209b6fe1b577061491cf6f93a81e1f91741e2e3accb864ae67087f69bbd9ab74f71781d13ae40aab86e1de30ca7e21171a1dcd6500`.

Thank you.

**Tags:** cardano-cli, cardano-serialization-lib, utxo, python, output

---

## 1 answers

### Answer by username_1 on 2022-06-09. Score: 0

You don't need your payment signing key nor your staking signing key to get the list of UTxOs of any address, as this is public information. Though, you will need your spending private key to use a UTxO as input for a transaction.

With that said, you can get the list of UTxOs using function `utxos` from `pycardano`. Check the code here: <https://github.com/cffls/pycardano/blob/22ab109fcfd75f4ba23d0aea620c09d92e1201c1/pycardano/backend/blockfrost.py#L111>

What this function will do is to get the list of UTxOs using [this Blockfrost API](https://docs.blockfrost.io/#tag/Cardano-Addresses/paths/%7E1addresses%7E1%7Baddress%7D%7E1utxos/get) under the hood.

> **Comments:**
> **username_0**: Thank you for reply, but this method returns this `{'index': 1,  'transaction_id': TransactionId(hex='2a4c7fb343a525d6bd044dce725882eed41a1f20cad9fdc21855dbb250eec761')},  'output': {'address': addr1q8r32a0d8a6lp6ycrd02g9j5xljnzqvx2mkntpg4lzd6zkcyvp55w2vasj3favjz3uqcccef4vhet3z29596j2lf6shscxdf4y,  'amount': 20099765,  'datum_hash': None}`, and I expect exactly another value like in my topic.  
> **username_0**: I am trying to automate the nft purchase process on jpeg.store. Purchase trx build request contains this value `"collateral":["82825820733717b579bfdace...8eafb97d2e60b0951a004c4b40"]`. But I have no idea how to get it.  
> **username_0**: If I deserialize it from CBOR I will recive follow data `[[h'0E5569B3E2A645A849E5DB422A86F4705E947A294DFB0E7D04D88A5162482428', 1], [h'01709C2F10828D291925C6887375E90289B001C1521DEB3D3AA2F779E6C0E49B65E74CDDEAADA2C3A37CDC01416A6269ADAF84D82F49DA3BD9', 14320544]]`  
> **username_1**: I don't know what is that value you are expecting really. Can you explain a little more where did you get that value from?  
> **username_0**: I want to automate the purchase process on jpg.store and to build the transaction I need to send this data to the server. https://imgur.com/a/E5Nbr4R  

---

