# Calculate fee API question

**URL:** <https://talk.jelurida.com/t/calculate-fee-api-question/433>\
**Category:** Developers\
**Created:** [4 July 2021 07:03 UTC](https://talk.jelurida.com/t/calculate-fee-api-question/433 "2021-07-04T07:03:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KPho](https://talk.jelurida.com/letter_avatar_proxy/v4/letter/k/8491ac/32.png) [@KPho](https://talk.jelurida.com/u/KPho)\
**Post date:** [4 July 2021 07:03 UTC](https://talk.jelurida.com/t/calculate-fee-api-question/433/1 "2021-07-04T07:03:33Z")

</div>

I can't understand well. What is transactionBytes and how can I calculate this?

> **[Calculate Fee - Transactions](https://ardordocs.jelurida.com/Transactions#Calculate_Fee)**
>
> Calculate the minimum fee for a transaction.

---

<div class="post-metadata">

**Author:** ![sergi](https://talk.jelurida.com/user_avatar/talk.jelurida.com/sergi/32/21_2.png) [@sergi](https://talk.jelurida.com/u/sergi)\
**Post date:** [5 July 2021 06:30 UTC](https://talk.jelurida.com/t/calculate-fee-api-question/433/2 "2021-07-05T06:30:25Z")

</div>

`transactionBytes` and `transactionJSON` are representations of a transaction in JSON and binary form. You can build those yourself (very hard) or you can just let the server generate those for you just by using any of the multiple transaction APIs.

There are some low level APIs like `calculateFee`, `signTransaction`, `broadcastTransaction` and `sendTransaction` that are useful if you are handling the building of the transaction yourself or [signing locally](https://ardordocs.jelurida.com/API#Creating_Unsigned_Transactions).

Otherwise, if you just want to send a transaction using any of the APIs like `sendMoney` or `sendMessage` but you don't know which fee to set then it's easier to let the server calculate that for you.

First invoke the API without anything set as the `feeNQT` parameter and with the rest of parameters set as desired. The server will parse and prepare a transaction, and it will return the best current fee for that transaction in the same `feeNQT` response field. You can just use that value to invoke the API again and you're good to go.
