We've noticed that in one edge case the 0x API returns a weird result. We're trying to get a swap transaction for the exact same token, it works with sellAmount 0.1 BNB but fails with sellAmount of 0.00001 BNB, and returns the error INSUFFICIENT_ASSET_LIQUIDITY which doesn't seem to be the case.

Here a preview of the queries:

Query that works (Buying 0.1 BNB worth of asset)


Query that fails (Buying 0.00001 BNB worth of asset)


1 Answer 1


The sellAmount of the failed query may be too small to query due to how 0x breaks order sizes into chunks and then queries those chunks. This amount is probably too small to return any liquidity when chunked due to decimal differences.

If you remove the includedSources=PancakeSwap_V2 parameter the API will return a valid response that goes through MultiHop. MultiHop works a bit differently and doesn’t sample smaller amounts, just the user-provided amount.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.