[SOLVED] /{token0_address}/{token1_address}/pairAddress Invalid Exchange

Hello, we are using this endpoint:

defi GET /{token0_address}/{token1_address}/pairAddress

https://deep-index.moralis.io/api-docs/#/defi/getPairAddress

We’re getting 400 errors for the exchange query param.

From the docs,

exchange *

string

(query) The factory name or address of the token exchange

*Available values* : uniswapv2, uniswapv3, sushiswapv2, pancakeswapv2, pancakeswapv1, quickswap

Some values work, others don’t.

Working: uniswapv2, uniswapv3, sushiswapv2
Not working: pancakeswapv2, pancakeswapv1, quickswap

We tried the alternative query string suggestion for factory name for PancakeSwap, which has the name PancakeFactory and address 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73. Neither works.

Is this issue as simple as the variable names being typos in the docs or is there currently no support for them?

did you also change the chain for that specific case?

can you give examples of token addresses from pancakeswap and quickswap that don’t work?

1 Like

That solved our issue, thank you so much cryptokid!

We specified the chain bsc for pancakeswap exchanges and now it works.

1 Like