How BSC Spotter Used Bitquery to Build a Listing Platform

BSC Spotter is a newly launched crypto listing platform for the Binance smart chain. The platform is powered by Bitquery’s DEX API to get the necessary information from the blockchain.

What is BSC Spotter?

BSC Spotter is a listing platform for low-cap coins on the Binance Smart Chain. The platform gives users the ability to search through projects by certain constraints, such as the project’s rating and whether their team is doxxed/Kyc’d. This feature gives users the ability to find low-cap gems without spending hours upon hours searching through DEX explorers.

Challenges with Fetching Blockchain Data

Sicne BSC Spotter lists all tokens on the Binance Smart Chain, we couldn’t rely on APIs from platforms like CoinMarketCap as such sites only give data for projects that they have already listed; we needed to get the data from the blockchain itself to provide our users with the best exprience. To do this, we could either get data through third-parties or fetch the data directly from the Binance Smart Chain.

Fetching the data directly from the Binance Smart Chain wouldn’t have been costly, as blockchain data is public, but this method would require tons of time and resources allocated towards building a platform that can provide us with the necessary information.

On the other hand, using third-parties is more costly on a day to day basis, but would require very minimal coding and implementation would take a very short amount of time.

After some research, it became apparent that third-parties were the way to go. Although third-parties would be more expensive on a day to day basis, the costs of creating a platform that gets data directly from the blockchain would far outweigh the day to day costs of third-parties. Also, creating a backend that gets data from third-parties is far faster than one that gets data from the blockchain, so timing wise third-parties were clearly superior. Overall, for the BSC Spotter platform, using third-parties was a no brainer.

Why Bitquery?

After deciding to use a third-party API for blockchain data, we started searching for the platform that would best suit our needs. Out of the third-parties found, choosing Bitquery was basically a no-brainer. We wanted to make development time as short as possible without sacrificing quality, and Bitquery was the perfect solution since minimal coding was needed to use the platform.

We had some concerns on how we could integrate the data we get with Tradingview charts, but Bitquery had many extensive guides written showing how to use Bitquery with Tradingview, so this concern was resolved. We also found their GraphQL IDE very useful, because we were able to find all the queries we needed pre-built by other users, so we were able to fetch our data with no coding.

All of this combined with reasonable costs, lead us to ultimately choose Bitquery as our API provider.

What is the Rating System?

BSC Spotter utilizes a unique rating system that automatically scores projects based on the size of their liquidity pool, the status of their team, and the token type. These important factors have a big effect on a project’s future success. Projects that receive high ratings have relatively high liquidity pools, a strong team, and a token with good utility. One of the easiest ways to find a low-cap gem is to simply look at highly-rated projects on BSC Spotter.

To calculate the rating, we need to get liquidity data for which, we utilize Bitquery’s DEX API to get the value of tokens held in each project’s liquidity pool. To make the system more simple and efficient, we convert the value of each liquidity pool to BNB and then find the pool’s value in USD.

Where does token Information come from?

We automatically fetch token information from the blockchain when a project is added to the platform. When project owners submit their project, they simply have to provide us with the token’s contract address and we get the supply, symbol, name, and launch date from the blockchain.

We get the supply, symbol, and name with a single query that gives the supply along with the token’s name/symbol. The launch date is fetched with a different query that returns the token’s creation date.

The supply is fetched from data on the blockchain, so burned tokens that were not reported to BSC Scan may not be accounted for. To get the most accurate supply, project owners have to contact the BSC Spotter team and report burns so that we can manually update the supply.

How is the Pricing Data Calculated?

All pricing data is found with the Bitquery DEX API. The price is found with a simple query that returns the value of each token in BNB, and then that value is converted to US dollars. To get the total market cap, the price in US dollars is multiplied by the total supply.

Since many projects have very low values, prices less than 1 cent are converted to scientific notation so that users can have an easier time understanding the information. Of course, other pricing data like the market cap and liquidity are formatted as well.

To increase efficiency, OHLC data is used for the chart as well as the daily change value. The platform gets the OHLC data for each token in 30-minute or 15-minute intervals from Bitquery and sorts through it to find the price from 24 hours ago. The price from 24 hours ago is then compared to the current price, resulting in the daily change value.

Get Charting Data in USD

When Bitquery returns OHLC data from the blockchain, for most tokens we can only get the OHLC data in BNB. Since most small projects use BNB to provide liquidity, Bitquery cannot get OHLC data in US dollars. A chart in terms of BNB can be useful, but a chart in USD can be more useful depending on the situation.

To solve this issue, BNB OHLC data is fetched along with the token’s OHLC data, and the time stamps are converted to UNIX for easier processing. After the conversion, each block of the token’s OHLC data is matched with a block of BNB OHLC data that has the same timestamp, and the closing value of BNB at that timestamp is multiplied by the token’s open, high, low, and closing value.

The reason that we multiply BNB’s closing value by the token’s OHLC data is that our API returns BNB’s OHLC blocks in very short intervals, so this simple method results in a highly accurate price for the chart.

Fetching OHLC data from the blockchain can be very time-consuming, especially for older and bigger projects. OHLC data is cached to give users an enjoyable experience that provides them with an updated chart without making them wait a few seconds for the chart to load.

Use BSC Spotter to find low-cap gems on the Binance smart chain. BSC spotter’s rating system makes it very easy to find projects that have high potential in the future without doing hours upon hours of research exploring blockchain explorers.

Check out BSC Spotter today:

1 Like