Giter VIP home page Giter VIP logo

pancake-info-api's Introduction

[DEPRECATED]

PancakeSwap API

The PancakeSwap API is a set of endpoints used by market aggregators (e.g. coinmarketcap.com) to surface PancakeSwap liquidity and volume information. All information is fetched from the underlying subgraphs.

v1 Documentation

The documentation of the endpoints, for PancakeSwap v1, can be found here.

v2 Documentation

The documentation of the endpoints, for PancakeSwap v2, can be found here.

Development

Install requirements

yarn global add vercel

Build

# Install dependencies
yarn

# Build project
vercel dev

Endpoints are based on filename inside the api/ folder.

# api/pairs.ts
curl -X GET 'localhost:3000/api/pairs'

# ...

Production

Deploy

Deployments to production are triggered by a webhook when a commit, or a pull-request is merged to master.

If you need to force a deployment, use the following command:

vercel --prod

pancake-info-api's People

Contributors

chef-jojo avatar chefkai avatar dependabot[bot] avatar ianlapham avatar moodysalem avatar noahzinsmeister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pancake-info-api's Issues

ASSG Token not found in Pancakeswap API

To whom it may concern,

My token Assgard (ASSG) CA: 0x7c52e19e4d350189bcdfb7f7a0868117e9f195e5 is not showing up in your pancakeswap api. Because of this Blockfolio will not let me list on their site. Can you please correct ASAP.

We ended up relaunching our project with a new contract address but it looks like your api has our old contract address.

New contract address: 0x7c52e19e4d350189bcdfb7f7a0868117e9f195e5
Old contract address: 0x9B2411dD7002aef8e27C436EA0f0A75C640361f7

Can you please correct.

Error 500 after installing

Hi folks,

I've followed the install instruction but when I query my endpoints I get

"error": {
        "code": 500,
        "message": "Store error: query execution failed: Subgraph `pancakeswap/exchange-lite` not found"
    }

Did I miss something?

Huge Price Differences Between Frontend & APIs

Hello

Lately I noticed that the difference between frontend and APIs are getting bigger.

Pancakeswap V2 Frontend
0.0000000992146
image

https://api.pancakeswap.info/api/v2/tokens
0.0000000219983
image

https://api.pancakeswap.info/api/v2/tokens/0x4A824eE819955A7D769e03fe36f9E0C3Bd3Aa60b
0.0000000343884
image

This coin is just an example, lots of coins has this issue right now. Even though API says prices updates 5-10 minutes ago, its not even close to the actual price

building the api

Could you give me a little idea of how to build this API?
I've been looking around with no success.
Tnx a lot

LP token price API or formula

I want to create a query in Excel for getting LP price for some pairs. How can I do that?
The 3 API-s that exist won-t do this.

Missing Authentication Token

When I try to return token information based on address.

GET https://api.pancakeswap.info/api/tokens/0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82

I get the "Missing Authentication Token" error.

Specific Token

Hi when i want to get specific Token data i get response thst i need authenticatione token , any idea where to get that from ?

Regards

token price in v1 and v2 is reversed?

hello there
Recently I made a check on AIOZ token: API v2. The result returns price which seems to be of v1. Meanwhile API v1 - which I presume to be a v1 - returns the correct price of v2

Can you guys confirm on this, please?
Thank you

404: NOT_FOUND when visiting the site.

What did i do wrong. I followed the instructions tho never could get curl to connect to the local host.

`

22:25:05.299 Retrieving list of deployment files...
22:25:06.890 Downloading 32 deployment files...
22:25:07.321 Analyzing source code...
22:25:08.570 Installing build runtime...
22:25:09.438 Build runtime installed: 867.872ms
22:25:10.325 Installing build runtime...
22:25:11.150 Build runtime installed: 825.058ms
22:25:12.037 Installing build runtime...
22:25:12.866 Build runtime installed: 828.288ms
22:25:13.750 Installing build runtime...
22:25:14.583 Build runtime installed: 832.965ms
22:25:18.325 Looking up build cache...
22:25:18.337 Looking up build cache...
22:25:18.344 Looking up build cache...
22:25:18.412 Looking up build cache...
22:25:18.654 Build Cache not found
22:25:18.675 Build Cache not found
22:25:18.701 Build Cache not found
22:25:18.752 Build Cache not found
22:25:20.454 Installing dependencies...
22:25:20.492 Installing dependencies...
22:25:20.520 Installing dependencies...
22:25:20.583 Installing dependencies...
22:25:21.036 yarn install v1.22.10
22:25:21.148 [1/4] Resolving packages...
22:25:21.507 [2/4] Fetching packages...
22:25:38.915 info [email protected]: The platform "linux" is incompatible with this module.
22:25:38.915 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
22:25:38.932 [3/4] Linking dependencies...
22:25:46.227 [4/4] Building fresh packages...
22:25:46.475 Done in 25.45s.
22:25:46.736 yarn install v1.22.10
22:25:46.769 Using TypeScript 4.2.3 (local user-provided)
22:25:46.865 [1/4] Resolving packages...
22:25:47.405 [2/4] Fetching packages...
22:25:48.193 info [email protected]: The platform "linux" is incompatible with this module.
22:25:48.193 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
22:25:48.215 [3/4] Linking dependencies...
22:25:52.990 Uploading build outputs...
22:25:53.119 Deploying build outputs...
22:25:56.342 [4/4] Building fresh packages...
22:25:56.596 Done in 9.87s.
22:25:56.865 yarn install v1.22.10
22:25:56.916 Using TypeScript 4.2.3 (local user-provided)
22:25:57.012 [1/4] Resolving packages...
22:25:57.636 [2/4] Fetching packages...
22:25:58.375 info [email protected]: The platform "linux" is incompatible with this module.
22:25:58.376 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
22:25:58.392 [3/4] Linking dependencies...
22:26:02.854 Uploading build outputs...
22:26:02.947 Deploying build outputs...
22:26:05.378 Done with "api/summary.ts"
22:26:06.187 [4/4] Building fresh packages...
22:26:06.440 Done in 9.58s.
22:26:06.690 yarn install v1.22.10
22:26:06.738 Using TypeScript 4.2.3 (local user-provided)
22:26:06.834 [1/4] Resolving packages...
22:26:07.403 [2/4] Fetching packages...
22:26:08.138 info [email protected]: The platform "linux" is incompatible with this module.
22:26:08.138 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
22:26:08.147 [3/4] Linking dependencies...
22:26:12.918 Uploading build outputs...
22:26:13.036 Deploying build outputs...
22:26:15.298 Done with "api/tokens/index.ts"
22:26:15.952 [4/4] Building fresh packages...
22:26:16.215 Done in 9.53s.
22:26:16.492 Using TypeScript 4.2.3 (local user-provided)
22:26:20.913 Uploading build outputs...
22:26:21.029 Deploying build outputs...
22:26:23.393 Done with "api/pairs.ts"
22:26:25.653 Uploading build outputs...
22:26:25.874 Deploying build outputs...
22:26:27.917 Done with "."
22:26:31.927 Build completed. Populating build cache...
22:26:44.815 Uploading build cache [34.25 MB]...
22:26:47.624 Build cache uploaded: 2.809s
22:26:48.144 Done with "api/tokens/tokens.ts"

`
Capture

Adding more information

Hi
I've just used this API for a telegram price bot and it's working amazing. However, I had one issue which was that only the USD value and BNB value of the coins are visible. It would be great if you could add values for USDT, EUR, GBP and all the main currencies.

API /api/v2/tokens/ return price is 0

I send request to API /api/v2/tokens/ to receive price of TBAKE token.
Contract of token is: 0x26D6e280F9687c463420908740AE59f712419147
But i receive price of this token is 0.

image

Problem when cloning

I'm cloning this project and trying to build and use as api without cache.
But when I start my vercel server and try to access an endpoint, I receive the follow error:

"Store error: query execution failed: Subgraph pancakeswap/exchange-lite not found"

How can I fix it?

Specifics token show 0 price

Do you know why in several tokens when I get the price in v1, and v2, both oh them shows 0... and in pancake.exchange I can see the price??

examplhttps://api.pancakeswap.info/api/v2/tokens/0xad070194f0644cec996b9a8076eabf09e82921ea

Missing Authentication Token

The single token fetch endpoint is throwing an error message:

{"message":"Missing Authentication Token"}

No parameter was meant to be passed to it.

Pancakeswap API doesn't recognize cMATIC token- Please help

Dear Team,

It seems Pancakeswap API doesn't recognize our token which is being listed for over two weeks now. could you please check?
https://api.pancakeswap.info/api/v2/tokens/0xf19438b660067d2b68f766ff63dabf1d4f603253
https://api.pancakeswap.info/api/tokens/0xf19438b660067d2b68f766ff63dabf1d4f603253

BSCScan: https://bscscan.com/token/0xf19438b660067d2b68f766ff63dabf1d4f603253

To check this deeper, I created another token just to ensure we did not miss anything on our side we created another one but the same result, can you please assist here?
https://api.pancakeswap.info/api/v2/tokens/0x198deDfEB86eDa80836FE47FE8A0B496E71b71a9
https://api.pancakeswap.info/api/tokens/0x198deDfEB86eDa80836FE47FE8A0B496E71b71a9

BSCScan: https://bscscan.com/token/0x198deDfEB86eDa80836FE47FE8A0B496E71b71a9

They all throw error with
{"error":{"code":404,"message":"Not found"}}

v2 API not working for a Token - Prices /volume not updating

Hello

We've been trying to workaround our API not showing values since days

Any way for you to look into this?
https://api.pancakeswap.info/api/v2/tokens/0xaecf6d1aff214fef70042740054f0f6d0caa98ab

https://pancakeswap.info/token/0xaecf6d1aff214fef70042740054f0f6d0caa98ab
It's the BNB pair that's not being shown in the .info , we really need it to go forward with our project since we can't seem to have a working price for CMC and CG or Blockfolio

Thanks!

How do I retrieve from this endpoint in PHP?

How do I retrieve from this endpoint in PHP: https://api.pancakeswap.info/api?

When I originally used it in the browser it showed me a list of tokens and their data. Now, it tells me I don't have an auth token. Where do I get this auth token and how do I connect and query via PHP? I'm trying to get all tokens, token prices and position values for my TrustWallet.

Pancake api is down?

What's wrong with following apis?

https://api.pancakeswap.info/api/v2/tokens
https://api.pancakeswap.info/api/v2/pairs

It suddenly stops working and is returning 500 error now.
Not sure what's wrong there.

REST API access to current prices - not working?

Bug Description
No price data available?

Expected Behavior
Get the price data.

Additional Context
documentation: https://github.com/pancakeswap/pancake-info-api/blob/develop/documentation.md

tickers

https://api.pancakeswap.info/api/tickers
{"error":{"code":500,"message":"Failed to decode block.number value: subgraph QmUf1YRkpWGSp867mLb6ab8aGPCnircwN17SKbrM5UeUW2 has only indexed up to block number 5035529 and data for block number 5600791 is therefore not yet available"}}

assets

https://api.pancakeswap.info/api/assets
{"error":{"code":500,"message":"Failed to decode block.number value: subgraph QmUf1YRkpWGSp867mLb6ab8aGPCnircwN17SKbrM5UeUW2 has only indexed up to block number 5035531 and data for block number 5600792 is therefore not yet available"}}

summary

https://api.pancakeswap.info/api/summary
{"error":{"code":500,"message":"Failed to decode block.number value: subgraph QmUf1YRkpWGSp867mLb6ab8aGPCnircwN17SKbrM5UeUW2 has only indexed up to block number 5035532 and data for block number 5600794 is therefore not yet available"}}

404: not found

https://api.pancakeswap.info/
404: NOT_FOUND
Code: NOT_FOUND
ID: lhr1::mxvlf-1615593631770-80e8f574ef62
Click here to learn more about this error.

how i get data from api endpoints

i try to access https://api.pancakeswap.info/api/summary but this page shows

{"error":{"code":500,"message":"Failed to decode `block.number` value: `subgraph QmUf1YRkpWGSp867mLb6ab8aGPCnircwN17SKbrM5UeUW2 has only indexed up to block number 4626465 and data for block number 5306317 is therefore not yet available`"}}

how can i access endpoints? is it graphql? or rest ?

Subgraph `pancakeswap/exchange-lite` not found

{"error":{"code":500,"message":"Store error: query execution failed: Subgraph pancakeswap/exchange-lite not found"}}

  1. I deployed through vercel.
  2. Opened the deployment link appmainurl/api/tokens
  3. I get the above error.

Please let me know how to fix it. How do I connect subgraph

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.