Price API Problem in case of low liquidity

it could be no liquidity in quickswap if there is no trading pair there for that token, it is the same error when there is no trading pair

for xBTRFLY:


  "token0": {
    "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "name": "Wrapped Ether",
    "symbol": "WETH",
    "decimals": "18",
    "logo": "",
    "logo_hash": "0a7fc292596820fe066ce8ce3fd6e2ad9d479c2993f905e410ef74f2062a83ec",
    "thumbnail": "",
    "block_number": null,
    "validated": null,
    "created_at": "2022-01-20T10:39:55.818Z"
  "token1": {
    "address": "0xcc94faf235cc5d3bf4bed3a30db5984306c86abc",
    "name": "xBTRFLY",
    "symbol": "xBTRFLY",
    "decimals": "9",
    "logo": null,
    "logo_hash": null,
    "thumbnail": null,
    "block_number": "13825631",
    "validated": 1,
    "created_at": "2022-01-20T10:39:55.818Z"
  "pairAddress": "0xed9193c3c0a9d5f77cd6d1ca18f14ce9e19ccad9"


  "reserve0": "19729909330800231",
  "reserve1": "535678"
  1. For POLYCUB: You said it could be no liquidity. Is it actually no liquidity on Quickswap?
  2. For xBTRYFLY is this enough liquidity? How much is required? What’s the threshold that throws the error?

Gentle reminder on the two items above. Thanks.

1 Like

I’m not able to find this address 0x7cc15fef543f205bf21018f038f591c6bada941c on quickswap interface:

for xBTRYFLY, it looks like it has close to 0.2 WETH

The logic is the following one:

  • we calculate the price based on the average of all stablecoin pairs (with at least 250USD liquidity)
  • we look for WETH (or any other whitelisted tokens) to calculate the price. This has no liquidity threshold