Total Supply details can be gathered using this method. The weightage for this API is 5
Total Supply details can be gathered under the given instance.
{
Data: 130000,
Message: "Total Supply fetched successfully",
Status: "SUCCESS"
}
{
Data: null,
Message: "Mandatory params missing",
Status: "FAILURE"
}
{
Data: null,
Message: "Error while fetching total supply Error while getting total supply no contract code at given address",
Status: "Failure"
}
Take a look at how you might call this method using our official libraries, or via curl
:
curl --location 'https://api.krypcore.com/api/v0/ft-manager/getTotalSupply' \
--header 'Authorization: xxxxxxxxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxxxxxxxx' \
--header 'ChainId: xxxx' \
--header 'Content-Type: application/json' \
--data '{
"chainId": "xxxx",
"contractAddress": "0x8E3129B655817ac4edC996425643Cbe58b905cE0"
}'
const axios = require('axios');
let data = JSON.stringify({
"chainId": "xxxx",
"contractAddress": "0x8E3129B655817ac4edC996425643Cbe58b905cE0"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.krypcore.com/api/v0/ft-manager/getTotalSupply',
headers: {
'Authorization': 'xxxxxxxxxxxxxxxxx',
'DappId': 'xxxxxxxxxxxxxxxxx',
'ChainId': 'xxxx',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
import json
url = "https://api.krypcore.com/api/v0/ft-manager/getTotalSupply"
payload = json.dumps({
"chainId": "xxxx",
"contractAddress": "0x8E3129B655817ac4edC996425643Cbe58b905cE0"
})
headers = {
'Authorization': 'xxxxxxxxxxxxxxxxx',
'DappId': 'xxxxxxxxxxxxxxxxx',
'ChainId': 'xxxx',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.krypcore.com/api/v0/ft-manager/getTotalSupply"
method := "POST"
payload := strings.NewReader(`{
"chainId": "xxxx",
"contractAddress": "0x8E3129B655817ac4edC996425643Cbe58b905cE0"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxxxxxxxxxxxxx")
req.Header.Add("DappId", "xxxxxxxxxxxxxxxxx")
req.Header.Add("ChainId", "xxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}