Get API script

Follow vide tutorial

After completion of order you will receive a PHP script, which contains codes that’s return TOTAL and CIRCULATING supply of your token.

Login to your hosting file manager, you can you any hosting that support PHP. I’m using Hostinger in my case to deploy API script.

Follow instructions shown in the image. In future UI may be changed.

Hostinger File Manager

  • Click on File Manager highlighted red color.
  • It will redirect you to your website File Manager

Hostinger Public HTML

  • There will be a folder named pulic_html , open that folder.
  • Now you are at root of your website.
  • We need to create a folder or directory for our PHP API code.
  • In my case I have created folder named /api
  • Follow below instructions to create folder

Hostinger create new Folder

  • Click on New Folder highlighted in red color.
  • A new popup will appear.

Creating Folder

  • Click on CREATE highlighted in red.
  • Now you will be inside /api folder, if not then open the folder you have created.
  • Then we need to upload the API script, to upload you need to click the the upside arrow on right-top on your file manager.
  • Follow image instructions

Uploading API script

Select upload file

  • Locate API script where you have downloaded and saved from Fiverr.

Select script to upload

Script has been uploaded

  • Kaboom! you have just successfully deployed your API script on your hosting.
  • Now we need to find out our endpoint which returns, TOTAL and CIRCULATING supply.
  • Let’s take an example. If your website domain is:
https://example.com/
  • And the folder you created previously was /api then, you can call API by:
https://example.com/api
  • If you see it returns a message in JSON formate something like this:
{
  "status": 200,
  "contractAddress": "0x796a4503b444a71b331c9556bef0815237ddeabc",
  "decimal": 18,
  "symbol": "oDOGE"
}
  • To access TOTAL and CIRCULATING supply API endpoint, we will pass a query parameter named q in this way, here is the available query
QueryDescription
maxcoinsIt returns the maximum supply of token without burn
totalcoinsIt returns total supply of your token with burn or without burn
circulatingIt returns the circulating supply of your token
  • API endpoint for TOTAL SUPPLY:
https://example.com/api/?q=totalcoins
  • API endpoint for CIRCULATING SUPPLY:
https://example.com/api/?q=circulating

How token supply are calculated?

According to Coinmarketcap’s documentation

  • Max supply: Is the number of maximum token
  • Total supply: Max supply - burn tokens
  • Circulating supply: Total supply - (Wallet hold by team/developers)

We tried our best to describe set-up process. If you have any query please feel free to ask: