<p>You need to specify the Ada and asset in the output so it balances. Something like <code>--tx-out &quot;address+5000000 + 5 policyid.assethexname&quot;</code> with your remaining balance needed to balance the transaction.</p>

CC BY-SA 4.0
2022-01-28T00:35:03.723Z
2022-01-28T00:35:03.723Z
Samuel Leathers
<p>here is an example of a transaction i send from 2 TxHash, sending ADA + Token
remember, the summary of 2 tx-out must be equal to 2 tx-in.</p>
<p>cardano-cli transaction build-raw <br />
--fee {fee} <br />
--tx-in b98eb283dflkh4582402u40480253c23c0fc35e1a2bcf445e18#0 <br />
--tx-in eebb2a5sldfjkdlkfjo485u30ruwldkfjs45346352126b220de8f6f#1 <br />
--tx-out addr1qy4hewroi045398753987923oriwrio2u034urrt5rz0vdpmc8lzlpqcj0yznqwaelpl+2000000+&quot;1 0fd9819234872935727sdf7027400df7hg077dc15.5692847553&quot; <br />
--tx-out addr1v9uh244h55jk5k6jk4b2kn42kln53um+7049462+&quot;8 0fd9819234872935727sdf7027400df7hg077dc15.5692847553&quot; <br />
--out-file tx.raw</p>

CC BY-SA 4.0
2022-01-29T10:04:01.757Z
can one Utxo have more than one asset?
user3755529
CC BY-SA 4.0
2022-01-29T10:11:21.167Z
like:
`--tx-out "address+5000000 + 5 policyid.assethexname + 100 policyid2.assethexname2"` ?
user3755529
CC BY-SA 4.0
2022-01-29T11:55:30.263Z
yes for sure
, and you text it the correct way.
TTS17
CC BY-SA 4.0
2022-01-28T05:03:09.973Z
2022-01-28T05:03:09.973Z
TTS17
<p>I am getting an error when trying to send a transaction with the following Utxos:</p>
<pre><code>                             TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
3a197302622324ebda7b96b39bf566fb408309b8947e635675cbce94efb90bf6     1        2822751 lovelace + TxOutDatumNone
c84758dbea49a9bfd4ce143b074c2f89486027b0595e5e7ca6da5f32a63a3edf     0        5000000 lovelace + 1344000000 698a6ea0ca99f315034072af31eaac6ec11fe8558d3f48e9775aab9d.7444524950 + TxOutDatumNone
</code></pre>
<p>and here is the error:</p>
<pre><code>Command failed: cardano-cli transaction submit                  --tx-file ./testnet/trial23_tx.signed                   --testnet-magic 1097911063
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 7822751 (fromList [(PolicyID {policyID = ScriptHash &quot;698a6ea0ca99f315034072af31eaac6ec11fe8558d3f48e9775aab9d&quot;},fromList [(&quot;tDRIP&quot;,1344000000)])])) (Value 7822751 (fromList [])))))])
</code></pre>
<p>is this error due to the fact I am using a Utxo which holds an asset?
I was following this tutorial: <a href="https://developers.cardano.org/docs/stake-pool-course/handbook/create-simple-transaction/" rel="nofollow noreferrer">https://developers.cardano.org/docs/stake-pool-course/handbook/create-simple-transaction/</a></p>
<p>is there a tutorial that would help me understand how to create a NOT simple transaction with Utxos + assets?</p>

<cardano-cli><transaction><native-assets>
Cardano-Cli Transactions with Assets Utxo
# Cardano-Cli Transactions with Assets Utxo

(Asked by: username_0 on 2022-01-27)

I am getting an error when trying to send a transaction with the following Utxos:
                             TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
3a197302622324ebda7b96b39bf566fb408309b8947e635675cbce94efb90bf6     1        2822751 lovelace + TxOutDatumNone
c84758dbea49a9bfd4ce143b074c2f89486027b0595e5e7ca6da5f32a63a3edf     0        5000000 lovelace + 1344000000 698a6ea0ca99f315034072af31eaac6ec11fe8558d3f48e9775aab9d.7444524950 + TxOutDatumNone

and here is the error:
Command failed: cardano-cli transaction submit                  --tx-file ./testnet/trial23_tx.signed                   --testnet-magic 1097911063
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 7822751 (fromList [(PolicyID {policyID = ScriptHash "698a6ea0ca99f315034072af31eaac6ec11fe8558d3f48e9775aab9d"},fromList [("tDRIP",1344000000)])])) (Value 7822751 (fromList [])))))])

is this error due to the fact I am using a Utxo which holds an asset?
I was following this tutorial: https://developers.cardano.org/docs/stake-pool-course/handbook/create-simple-transaction/
is there a tutorial that would help me understand how to create a NOT simple transaction with Utxos + assets?

**Tags:** cardano-cli, transaction, native-assets

---

## 2 answers

### Answer by username_2 on 2022-01-28. Score: 2 | Accepted answer

here is an example of a transaction i send from 2 TxHash, sending ADA + Token
remember, the summary of 2 tx-out must be equal to 2 tx-in.

cardano-cli transaction build-raw   
--fee {fee}   
--tx-in b98eb283dflkh4582402u40480253c23c0fc35e1a2bcf445e18#0   
--tx-in eebb2a5sldfjkdlkfjo485u30ruwldkfjs45346352126b220de8f6f#1   
--tx-out addr1qy4hewroi045398753987923oriwrio2u034urrt5rz0vdpmc8lzlpqcj0yznqwaelpl+2000000+"1 0fd9819234872935727sdf7027400df7hg077dc15.5692847553"   
--tx-out addr1v9uh244h55jk5k6jk4b2kn42kln53um+7049462+"8 0fd9819234872935727sdf7027400df7hg077dc15.5692847553"   
--out-file tx.raw

> **Comments:**
> **username_0**: can one Utxo have more than one asset?  
> **username_0**: like: `--tx-out "address+5000000 + 5 policyid.assethexname + 100 policyid2.assethexname2"` ?  
> **username_2**: yes for sure , and you text it the correct way.  

---

### Answer by username_1 on 2022-01-28. Score: 2

You need to specify the Ada and asset in the output so it balances. Something like `--tx-out "address+5000000 + 5 policyid.assethexname"` with your remaining balance needed to balance the transaction.


---

