Zerion clone problem: No pools found

I’m trying to follow this tutorial (https://github.com/IAmJaysWay/Moralis-Cross-Chain) but no token balances are displayed. Getting this error message in the log:
2021-11-10T02:53:40.812Z - Failed running cloud function getTokenPrice for user undefined with:
Input: {“chain”:“polygon”,“address”:“0x0ef2603cd156e1934e19d0b07cd64f415e1e7940”}
Error: {“message”:“No pools found with enough liquidity, to calculate the price”,“code”:141}
2021-11-10T02:53:40.755Z - Error: No pools found with enough liquidity, to calculate the price
at fetch (/moralis-server/lib/cloud-code/plugins/convenience/web3Api.js:128:11)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Would appreciate your help.

it looks like this works for me:

x = await Moralis.Web3API.token.getTokenPrice({address: “0x0ef2603cd156e1934e19d0b07cd64f415e1e7940”, chain: “polygon”})

Great to hear, but that’s not the code in the GitHub / video tutorial. I think the error comes from this line:

Can you get that code working?


I’m not familiar with that code, you could adapt it to debug on what parameters gives an error, somehow to handle an error when it happens

there may be addresses that may not work, that would give that error that you receive, in particular it looks that it wasn’t that address the case, but it may be another address

The code comes from a Moralis video tutorial, here:

Hoping someone on the Moralis team can support it.

x = await Moralis.Web3API.token.getTokenPrice({address: “0x0ef2603cd156e1934e19d0b07cd64f415e1e7940”, chain: “polygon”})

still works fine for me now

you get that error all the time for that specific address?

Can you get the code from the Moralis video tutorial working?

1 Like

Hi @jswift24

I guess the problem is because the Promise.all() fails in case if one of promises return error. So I suggest you use Promise.allSettled() instead

Promises can fail because of not enough liquidity to calculate the price of asked tokens :man_factory_worker:

If you make this change, can you get the tutorial code working?