-
Notifications
You must be signed in to change notification settings - Fork 271
Can I use this API to check a specific pair or token info? #10
Comments
Hello, the API does not currently support retrieving information about a specific token/pair, but it's a planned feature and should be here soon :) |
Hi guys, do you have an idea of when it will be released ? |
hello, Thanks in advance. |
Hello! I think it would be very useful to have this information on the pairs:
Thanks for your work. |
Hello, same for a specific token please like : https://pancakeswap.info/token/0xb54cd95eea2b2f7adb4dccd5b5e1d6c4a6ffe472/price : current price BNB / USD https://pancakeswap.info/token/0xb54cd95eea2b2f7adb4dccd5b5e1d6c4a6ffe472/transaction : volume , last 10 or 100 transactions Best regards, Charles |
@ChefKai Any status update about this? |
Release plan is around next week ~ |
Any update on this? |
Since we are unable to retrieve info for a specific token/pair at present, in the interim, is there a means by which we can retrieve info for ALL tokens/pair, after which we can then filter to our hearts content ? - at present we are only getting the 'top ~1000 pairs' |
Hey, are there any updates regarding this functionality? |
We are all waiting for this fabulous endpoint 😍 |
Hey, Is there any news? We look forward to hear from you👀. |
Do you have an ETA for this? |
@ChefKai any updated ETA? Thanks. |
Still no update? People clearly want this.. |
I believe they are too busy with the LP migration. |
I'd like this, please 👍 |
Adding to the pile of people requesting an update to this... |
This would be a fantastic api endpoint! Any update? |
Why have it in the documents if it's planned but not yet released. You could have at least stated that in the documents that its coming in the future. |
Exactly, you need to go to issues to know that this endpoint is not released yet. Probably it's not even implemented yet. |
Hello everyone 👋 We have just released the endpoint for querying a token, on both Thanks for your patience! Do not forget that the code is all open-source, and pull request are welcome! |
pro stuff, thanks |
@ChefKai how is "price denominated in USD" calculated for a token? Is it based on the USDT pair or is it calculated in a different way? |
That is planned when the next subgraph is deployed (which should be after the .info bounty program is finished). If you wish to keep track of this request, please open a new issue. |
We use a selective list of trusted assets (WBNB, BUSD, USDT, USDC, UST, VAI, BTCB, WETH, BETH) 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. |
Does that explain why some tokens have a price of $0 @ChefKai? |
Yes it can be; it's either a delay in the subgraph indexing the data, or a lack of liquidity for the pair, 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, ...). |
Ah man thank you so much for this. Glad to be holding some cake! |
Nice, but it won't work for many small tokens I tried. Any idea on how to fix this? Poocoin / Bogged work fine. |
Is there a way to either get the current value (total liquidity /total supply) in USD of an LP token or get the current total supply for an LP token so I can calculate it myself? |
You can use the BSCscan API. I made it work this way, simply look at the holdings of the Pancakeswap pair address and use (USD total)/(#custom tokens) to get the price. |
Any news on this? |
Anyone managed to fetch liquidity for a few pairs? I can get it using the /pairs/ endpoint but that would mean using ~46GB bandwidth daily for 1 request/second. |
Hello Everyone, |
@ChefKai |
Currency not showing in API which occur problem in listing on Blockfolio and CMC to get tracked price |
Newbie here, can you elaborate on this? Thank you. |
You can choose a pool including that token and get the relative price. Using "Get BEP20-Token Account Balance for TokenContractAddress" section of BSCscan API docs, one call for each liquidity and divide one by another. I was using this but new API usage limits made it almost useless. |
Yeah the API limits are cumbersome, but you can set up a CRON job (if you're making a ticker for a website) to avoid polling the API all too often. |
Thanks guys, totally newbie here, I'll try to comprehend in your reply's. Maybe, it will be easier to let you know what I am trying to achieve here. Once again, thanks for helping. |
I have the same issue and looking for support here: https://api.pancakeswap.info/api/tokens/0x198deDfEB86eDa80836FE47FE8A0B496E71b71a9 |
Don't use this API for now. Because tokens aren't pooled against USD they're using some approximation that, for now, is busted. The BNB price tends to be closer for me but still bad. If you just need $CAKE prices, Binance CEX may be a good place to fetch. |
Where do you want to display the information? On a website? If so, set up a CRON job launching a PHP script which calls the BSCscan API and fetches the number of tokens (BNB/custom token) from the PancakeSwap pair address. You divide them to get the price (if you need it in dollar, you can fetch the BNB price from BSCscan API as well). That CRON job can then save the data to disk, and you fetch it from the website by importing it. |
@BoboBruno Actually these APIs(https://api.pancakeswap.info/api/v2/tokens/0x198deDfEB86eDa80836FE47FE8A0B496E71b71a9) are being used by Coingeco/CMC to list the token into their platform. and they do not accept another way/APIs unfortunately. I'm thinking that this might be to do with some syncing issues with Pancake APIs(?), I had created this token 3 days ago, and somehow in the NewPancakeSwapListings Group(https://t.me/NewPancakeSwapListings) it showed it's listed today(see attached). I tried checking other Token from this group and all of them had the same issues. so could this be syncing problem? |
+1 on this. for "ULTRA" (UltraSafe) for example... pancakeswap.exchange https://api.pancakeswap.info/api/v2/tokens/0x0b3f42481c228f70756dbfa0309d3ddc2a5e0f6a that's a 9% difference I cannot account for. even slippage, fees, etc... can't see how that much difference can occur. |
@BoboBruno @ChefKai - can you please check on this and confirm, the API needs to work before we can request CMC/CG. Thank you in advance |
Good day people of the dark realm. 🙂 Is there any method on earth to get the total liquidity of a specific token in Pancakeswap? |
hey! maybe did you find the way, how to do it? |
I'm new at this tech, and I'm kind of used to use a regular API calls, how can I start to use this one?
The pair that I'm trying to retrieve info is this: https://pancakeswap.info/pair/0xb54cd95eea2b2f7adb4dccd5b5e1d6c4a6ffe472
The text was updated successfully, but these errors were encountered: