pancakeswap / pancake-info-api

Serverless API implementation for PancakeSwap on-chain data query.
328 stars 272 forks source link

Current price API not updating #77

Closed CasualEngineerZombie closed 3 years ago

CasualEngineerZombie commented 3 years ago

Hey, is there any problem with the token price end point? It's not updating.

JairaSummer commented 3 years ago

Its updating every 5 minutes

ChefKai commented 3 years ago

We use a selective list of trusted assets (WBNB, BUSD, USDT, USDC, UST, VAI, BTCB, WETH) that a token must have a pair with in order to start indexing his price in USD and BNB; this avoid getting corrupted data when a token is having low liquidity as well, and/or a will to harm the ecosystem. You can check the logic within the pancakeswap/pancake-subgraph repository.

If your token meet the above criteria, it's either a delay in the subgraph indexing the data, or a lack of liquidity for the pair (must to at least 10 BNB eq.), or a lack of 'trusted' pairs; in such case, it's advised to directly query the token price though a Binance Smart Chain node; or use a 3rd-party API that might fill this needs (BitQuery, Covalent, ...).