wBanano / wban-dApp

GNU General Public License v3.0
20 stars 11 forks source link

Fetch wBAN and BNB prices from ApeSwap instead of CoinGecko #64

Closed wrap-that-potassium closed 3 years ago

wrap-that-potassium commented 3 years ago

This request should make it hopefully more reliable: https://graph2.apeswap.finance/subgraphs/name/ape-swap/apeswap-testign/graphql?query=query%20%7B%0A%20%20pair(id%3A%20%220x7898466cacf92df4a4e77a3b4d0170960e43b896%22)%20%7B%0A%20%20%20%20token1Price%0A%20%20%7D%0A%20%20bundle(id%3A%20%221%22)%20%7B%0A%20%20%20%20ethPrice%0A%20%20%7D%0A%7D%0A

image where bundle.ethPrice is the price of BNB (in $USD, I assume) and pair.token1Price is the price of 1 wBAN in BUSD.

I would assume, though, that 1 BUSD == 1 USD, which is usually pretty pretty close anyway.