# Negative Balances

**URL:** <https://community.bitquery.io/t/negative-balances/186>\
**Category:** GraphQL API\
**Tags:** bug\
**Created:** [June 16, 2021, 10:27am UTC](https://community.bitquery.io/t/negative-balances/186 "2021-06-16T10:27:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcell033](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@marcell033](https://community.bitquery.io/u/marcell033)\
**Post date:** [June 16, 2021, 10:27am UTC](https://community.bitquery.io/t/negative-balances/186/1 "2021-06-16T10:27:45Z")

</div>

Hi all  
I’m having some issues with balances  
I frequently end up with having negative values for various addresses  
I double checked the balances against the contracts themselves by calling the balanceOf and the balance is obviously positive, no matter what the liquidity is

e.g.

{  
ethereum (network: bsc){  
address(address: {is: “0xCb7027A23Fc5aB02802DeDb6224ebe8636D0d421”}) {  
address  
balances(  
currency: {is: “0x3db6b57fbd2a71cbbef1c10d9ad35b3d1343de92”}  
time: {till: “2021-06-25”}  
) {  
currency {  
symbol  
address  
name  
decimals  
}  
value  
history {  
block  
value  
transferAmount  
timestamp  
}  
}  
}  
}  
}

or

{  
ethereum(network: bsc) {  
address(address: {is: “0xCb7027A23Fc5aB02802DeDb6224ebe8636D0d421”}) {  
balances {  
currency {  
address  
name  
symbol  
decimals  
}  
value  
}  
}  
}  
}

Maybe bitQuery calculates balances against some smart contract events, but if the tx fails on the smart contract the calculations are not reverted.

I found this happens more frequently with low liquidity tokens (and some rug pulls too lol) but still balances should be correct as they are on the smart contract balanceOf function

---

<div class="post-metadata">

**Author:** ![gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@gaurav](https://community.bitquery.io/u/gaurav)\
**Post date:** [June 16, 2021, 11:45am UTC](https://community.bitquery.io/t/negative-balances/186/2 "2021-06-16T11:45:44Z")

</div>

Thanks for reporting this, our balance APIs are old and have few bugs,…however, we are building a new set of balance APIs. meanwhile, I have reported this to the dev team.
