<p>In most cases you should use the unconfirmedBalanceNQT. Think about it as spendable balance i.e. your total balance minus coins/asset shares/currency units locked for various reasons such unfulfilled coin exchange orders.</p>

CC BY-SA 4.0
2018-12-30T20:21:32.517Z
2018-12-30T20:21:32.517Z
lyaffe
<p>My (Javascript) frontend needs to decide whether the user can send an Ardor/Ignis asset in his account. My code checked for:</p>

<pre><code>quantityQNT &gt;= amount_to_send
</code></pre>

<p>But I realise that this doesn't work if the user has the asset offered on the asset exchange.</p>

<p>So just checking for unconfirmedQuantityQNT wouldnt be clever either, as it might want to send an asset which ownership never confirms (phasing or fork).</p>

<p>Would it be safe to check this way:</p>

<pre><code>min(quantityQNT,unconfirmedQuantity) &gt;= amount_to_send
</code></pre>

<p>Thanks for your opinions</p>

<ardor><javascript><ardor-asset-exchange>
Ardor: How to decide if an asset can be send?
Mal Nemark
# Ardor: How to decide if an asset can be send?

(Asked by: username_0 on 2018-12-23)

My (Javascript) frontend needs to decide whether the user can send an Ardor/Ignis asset in his account. My code checked for:

```
quantityQNT >= amount_to_send

```

But I realise that this doesn't work if the user has the asset offered on the asset exchange.

So just checking for unconfirmedQuantityQNT wouldnt be clever either, as it might want to send an asset which ownership never confirms (phasing or fork).

Would it be safe to check this way:

```
min(quantityQNT,unconfirmedQuantity) >= amount_to_send

```

Thanks for your opinions

**Tags:** ardor, javascript, ardor-asset-exchange


---

## 1 answers

### Answer by username_1 on 2018-12-30. Score: 1

In most cases you should use the unconfirmedBalanceNQT. Think about it as spendable balance i.e. your total balance minus coins/asset shares/currency units locked for various reasons such unfulfilled coin exchange orders.


---

