How to use StaySAFU API's

StaySAFU's API is simply : one endpoint, 3 parameters, and a lot of data in reply.

Endpoint

Endpoint : app.staysafu.org/api/scan (GET)

Parameters

tokenAddress (string) (mandatory) : the token (BEP20) address you want to scan
holdersAnalysis (boolean) (optional) : whether you want to get the holders analysis or not. A call with holders analysis takes approximately 8 seconds while only 1.5 seconds without, but the scores are less accurate without holders analysis
key (string) (mandatory) : your API key (if you don't have an API key, click here)
chain (string) (optional) : default 'BSC' if not set, else 'ETH' for Ethereum

Example : http://app.staysafu.org/api/scan?tokenAddress=THETOKENADDRESS&key=YOURAPIKEY&holdersAnalysis=true

Reply

Example of complete reply (without holders analysis)

{
"result":{
"rugScore":"99.9",
"delayedHoneyScore": "99.9",
"totalScore":"99.9",
"trade":{
"error":false,
"buyFee":10,
"sellFee": 10,
"buyGas":"725,854",
"sellGas":"585,484",
"isHoneypot":false,
"maxTXAmount":"1,000,000,000,000",
"tokenDecimals":9
},
"liquidity":{
"status":"success",
"riskAmount":1.4338,
"whaleHolder":{
"supplyHold":1.3749,
"address":"0x888888888888888888888888888888888888888"
}
},
"code":{
"verified":true,
"detectedScams":[
{
"line":"function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner {\r",
"fee":"function setLiquidityFeePercent()",
"proximityScore":0,
"type":"fee"
},
{
"line":" require(_tradingEnabled, '');\r",
"disableTrading":"require(tradingEnabled",
"proximityScore":0,
"type":"disableTrading"
}
]
},
"ownership":"0x888888888888888888888888888888888888888"
}
}


Notes

isHoneypot doesn't mean the token is or isn't an honeypot : it only means that the trade has been successful or not. To know if a token is an honeypot, you must also take in consideration the error string (if it's insufficient liquidity or PancakeSwap error, it means that the token isn't listed so we can't know if it's really an honeypot, else it is one)
riskAmount is the percentage of liquidity that isn't locked
Scores are always from 0 to 100, from risky to safe
Buy and sell fees are in %
Here is the list of all the types detected in the code : fee (ability to modify fees), maxTX (ability to modify max TX), maxSell (ability to modify max sell), honeypot (code looks like existing honeypots), blacklist (ability to blacklist addresses), rebase (rebase token), reflect (reflections token), reward (rewards token)

If you have any questions,
You can contact us on Telegram @NBMSacha

_

StaySAFU is the best App to invest in DeFI safely.
Minimize the risk of your investments and avoid DeFI scams by using our Audits, Scanner, ApeBoard ...

Website: StaySAFU.org
App: App.staySAFU.org
Telegram: https://t.me/StaySAFUOrg
Twitter: https://twitter.com/staysafuorg
Was this article helpful?
Cancel
Thank you!