1

I created a liquidity pool on pancakeswap for an asset pair for goerli network. I get this error when i try and fetch the price.

here is the api request https://goerli.api.0x.org/swap/v1/price?sellToken=0x3870419Ba2BBf0127060bCB37f69A1b1C090992B&buyToken=0x3820a50d5670012d296AB1DDf75bB97790A8c9e1&sellAmount=1000000000000000000

here is the response { "code": 100, "reason": "Validation Failed", "validationErrors": [ { "field": "sellAmount", "code": 1004, "reason": "INSUFFICIENT_ASSET_LIQUIDITY", "description": "We are not able to fulfill an order for this token pair at the requested amount due to a lack of liquidity" } ] }

Is there any way to fix this issue ? what if i do the same on mainnet. Will this still be the issue ? Is there a given list of dexes that 0x api fetches the data from? is pancakeswap not in the list ?

3
  • This can happen at any time and any chain due to the lack of liquidity and for Pancake Swap, I don't think 0x is a good option because it focuses more on Ethereum and Ethereum sidechains.
    – Mehran Ra
    Commented Sep 2, 2023 at 13:14
  • But the network i used was goerli which is an ethereum testnet. The dex i used was pancakeswap. Commented Sep 3, 2023 at 15:17
  • The error you received says there is insufficient liquidity for this item , Your only way to solve this error is to add liquidity to this currency pair in this network and in this DEX
    – Mehran Ra
    Commented Sep 3, 2023 at 16:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.