# Error Messages using API

**URL:** <https://community.bitquery.io/t/error-messages-using-api/1476>\
**Category:** GraphQL API\
**Tags:** support\
**Created:** [May 3, 2023, 10:25pm UTC](https://community.bitquery.io/t/error-messages-using-api/1476 "2023-05-03T22:25:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![twinnie](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@twinnie](https://community.bitquery.io/u/twinnie)\
**Post date:** [May 3, 2023, 10:25pm UTC](https://community.bitquery.io/t/error-messages-using-api/1476/1 "2023-05-03T22:25:13Z")

</div>

I’m getting errors running some queries in a Python script. I can get the info for these in Poocoin and the data doesn’t seem that old, 2021 I think. I don’t know when BitQuery started collecting data for the BSC network but I think it was before then.

Here’s my queries with the error messages as taken from my account/errors page:

{  
ethereum(network: bsc) {  
dexTrades(buyCurrency: {is: “0xc35f46aAEb8aD17bCbAa78c03540FEffa44790”}) {  
minimum(of: time)  
}  
}  
}  
[{“message”:“Currency not found by symbol 0xc35f46aAEb8aD17bCbAa78c03540FEffa44790”,“locations”:[{“line”:4,“column”:13}],“path”:[“ethereum”,“dexTrades”],“error\_type”:“client”,“query\_id”:“jk5gfufpKZHYEBz4”}]

query{  
ethereum(network: bsc) {  
address(address: {is: “0xa8da060ebd32a753005c6ee476a0d79177c6ea”}) {  
smartContract {  
currency {  
decimals  
}  
}  
}  
}  
}  
System error: Address 0xa8da060ebd32a753005c6ee476a0d79177c6ea should start from 0x and contain hex digits

The errors I’m getting back from the API calls are mostly 500, with the occasional 504. I can’t find anything telling me what this means.

---

<div class="post-metadata">

**Author:** ![Omkar](https://avatars.discourse-cdn.com/v4/letter/o/bb73d2/32.png) [@Omkar](https://community.bitquery.io/u/Omkar)\
**Post date:** [May 5, 2023, 6:16pm UTC](https://community.bitquery.io/t/error-messages-using-api/1476/2 "2023-05-05T18:16:13Z")

</div>

Hello,

Where are you getting the address from ? They are not correct

Both of the address you mentioned in the query

`0xc35f46aAEb8aD17bCbAa78c03540FEffa44790` , `0xa8da060ebd32a753005c6ee476a0d79177c6ea`

cannot be found also in [Bscscan](https://bscscan.com/search?f=0&q=0xc35f46aAEb8aD17bCbAa78c03540FEffa44790)

The correct address which would work are

0xc35f46aaeb8ad17bcbaa78c03540feffa44790cb  
0xa8da060ebd32a753005c6ee476a0d79177c6ea8b

These can be found on BscScan and also work with our API

For example the second query you mentioned

```auto
{
  ethereum(network: bsc) {
    address(address: {is: "0xa8da060ebd32a753005c6ee476a0d79177c6ea8b"}) {
      smartContract {
        currency {
          decimals
        }
      }
    }
  }
}

```

Thanks

---

<div class="post-metadata">

**Author:** ![twinnie](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@twinnie](https://community.bitquery.io/u/twinnie)\
**Post date:** [May 6, 2023, 7:33am UTC](https://community.bitquery.io/t/error-messages-using-api/1476/3 "2023-05-06T07:33:07Z")

</div>

Thank you so much for replying, that completely fixed it. My script was truncating a string to get the address and it had been taking a little too much off the end. I’d been testing addresses myself but I’d been doing that before the truncating.

All working now, thanks.
