Error Messages using API

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.

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

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

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

Thanks

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.