<p>The only difference between building a regular ADA-only transaction and one that contains ADA + asset(s) is in the <code>cardano-cli transaction build-raw</code> step that follows the <a href="https://docs.cardano.org/native-tokens/getting-started" rel="nofollow noreferrer">multi-asset syntax as discussed in the official cardano documentation</a></p>
<p>It would look something along the lines of:</p>
<pre><code>cardano-cli transaction build-raw \
--tx-in &lt;TX_ID&gt; \
--fee &lt;FEE&gt; \
--tx-out &lt;ADDRESS+LOVELACE+&quot;NUMBER_OF_TOKEN(s) POLICYID&quot; \
--out-file tx.raw
</code></pre>
<p>Note that in the <code>--tx-out</code> step, <code>LOVELACE</code> should be an integer value, and <code>&quot;NUMBER_OF_TOKEN(s) POLICYID&quot;</code> should all be a string.</p>
<p>The rest of the steps for caluclating min fees and signing/submitting should be the same.</p>

CC BY-SA 4.0
2022-01-23T14:09:39.093Z
2022-01-23T14:09:39.093Z
zhekson
<p>The <code>tx-out</code> of the <code>build-raw</code> command is the only thing that is different for sending assets. Instead of <code>address+1000000</code> it will be <code>address+&quot;1000000 + 5 &lt;policy id&gt;&lt;&lt;asset name&gt;&quot;</code></p>

CC BY-SA 4.0
2022-01-23T13:30:38.287Z
2022-01-23T14:08:17.223Z
2022-01-23T14:08:17.223Z
Samuel Leathers
<p>thank you so much for the link,
it was exactly what i needed and yes, it is righ.
used it, tested and worked</p>
<p>cardano-cli transaction build-raw <br />
--fee 0 <br />
--tx-in ${tx_in} <br />
--tx-in ${my_tx_in} <br />
--tx-out ${in_addr}+${amountToSendUser}+&quot;1 ${myToken}&quot; <br />
--tx-out ${paymentAddr}+${amountToDonate}+&quot;999 ${myToken}&quot; <br />
--invalid-hereafter $FINALTIP <br />
--out-file tx.draft</p>
<p>fee=$(cardano-cli transaction calculate-min-fee <br />
--tx-body-file tx.draft <br />
--tx-in-count ${TXNS} <br />
--tx-out-count 2 <br />
--witness-count 3 <br />
--mainnet <br />
--protocol-params-file protocol.json</p>
<p>cardano-cli transaction build-raw <br />
--fee ${fee} <br />
--tx-in ${tx_in} <br />
--tx-in ${my_tx_in} <br />
--tx-out ${in_addr}+${amountToSendUser}+&quot;1 ${myToken}&quot; <br />
--tx-out ${paymentAddr}+${amountToReturn}+&quot;999 ${myToken}&quot; <br />
--invalid-hereafter $FINALTIP <br />
--out-file tx.raw</p>
<p>cardano-cli transaction sign <br />
--signing-key-file $paymentSignKeyPath <br />
--tx-body-file tx.raw <br />
--out-file tx.signed <br />
--mainnet</p>
<p>cardano-cli transaction submit --tx-file tx.signed --mainnet</p>

CC BY-SA 4.0
2022-01-23T22:13:05.703Z
2022-01-23T22:13:05.703Z
TTS17
<p>i am looking so long, but till now didnt find a complete answer about :
how to send a token / asset from cardano-cli.
can you please help me to go in details about build the transaction from the CLI ?</p>
<ol>
<li>cardano-cli transaction build-raw \</li>
<li>cardano-cli transaction calculate-min-fee</li>
<li>cardano-cli transaction build-raw</li>
<li>cardano-cli transaction sign</li>
<li>cardano-cli transaction submit</li>
</ol>
<p>is the steps correct in high Level?
can we go in details to write the commands?</p>
<p>thank you in advanced,
Thomas
theTokenSquare17</p>

<cardano-cli><transaction><token><build><asset>
send token / asset by cardano-CLI
# send token / asset by cardano-CLI

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

i am looking so long, but till now didnt find a complete answer about :
how to send a token / asset from cardano-cli.
can you please help me to go in details about build the transaction from the CLI ?

1. cardano-cli transaction build-raw \
2. cardano-cli transaction calculate-min-fee
3. cardano-cli transaction build-raw
4. cardano-cli transaction sign
5. cardano-cli transaction submit

is the steps correct in high Level?
can we go in details to write the commands?

thank you in advanced,
Thomas
theTokenSquare17

**Tags:** cardano-cli, transaction, token, build, asset

---

## 3 answers

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

The only difference between building a regular ADA-only transaction and one that contains ADA + asset(s) is in the cardano-cli transaction build-raw step that follows the multi-asset syntax as discussed in the official cardano documentation
It would look something along the lines of:
cardano-cli transaction build-raw \
--tx-in  \
--fee  \
--tx-out 
Note that in the --tx-out step, LOVELACE should be an integer value, and "NUMBER_OF_TOKEN(s) POLICYID" should all be a string.
The rest of the steps for caluclating min fees and signing/submitting should be the same.


---

### Answer by username_2 on 2022-01-23. Score: 2

The `tx-out` of the `build-raw` command is the only thing that is different for sending assets. Instead of `address+1000000` it will be `address+"1000000 + 5 <"`


---

### Answer by username_0 on 2022-01-23. Score: 0

thank you so much for the link,
it was exactly what i needed and yes, it is righ.
used it, tested and worked

cardano-cli transaction build-raw   
--fee 0   
--tx-in ${tx\_in}   
--tx-in ${my\_tx\_in}   
--tx-out ${in\_addr}+${amountToSendUser}+"1 ${myToken}"   
--tx-out ${paymentAddr}+${amountToDonate}+"999 ${myToken}"   
--invalid-hereafter $FINALTIP   
--out-file tx.draft

fee=$(cardano-cli transaction calculate-min-fee   
--tx-body-file tx.draft   
--tx-in-count ${TXNS}   
--tx-out-count 2   
--witness-count 3   
--mainnet   
--protocol-params-file protocol.json

cardano-cli transaction build-raw   
--fee ${fee}   
--tx-in ${tx\_in}   
--tx-in ${my\_tx\_in}   
--tx-out ${in\_addr}+${amountToSendUser}+"1 ${myToken}"   
--tx-out ${paymentAddr}+${amountToReturn}+"999 ${myToken}"   
--invalid-hereafter $FINALTIP   
--out-file tx.raw

cardano-cli transaction sign   
--signing-key-file $paymentSignKeyPath   
--tx-body-file tx.raw   
--out-file tx.signed   
--mainnet

cardano-cli transaction submit --tx-file tx.signed --mainnet


---

