Skip to main content

Token Security API

Endpoint

https://api.hashdit.io/security-api/public/chain/v1/detect/address
HeaderDescription
Content-Typeapplication/json;charset=UTF-8
X-Signature-appidAppid, unique code
X-Signature-timestampTimestamp, millisecond
X-Signature-nonceRandom uuid, replace “-” with “”,32 byte length
X-Signature-signatureSignature,lowercase,check below for sign details

Body

NameRequiredTypeDescriptionExample
chain_idYesStringThe chain id of the blockchain56 - BSC
addressYesStringAddress that needs to be analyzed0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c

Response

NameNullableTypeExample
statusNoStringOK/ERROR
codeNoString00001:verify signature error
> appid, timestamp, nonce, signature headers can not be null or empty
> nonce is illegal
> timestamp has illegal
> timestamp is expired
> invalid appid
> appid has expired
> invalid signature
> replay request
> app is out of count limit
00002:unknown server error occurred during verifying signature
00003:unknown server error occurred during detection
dataYes
data.request_idNoStringUnique request id
data.has_resultNoBooleanWhether there is already a definite result, if False, it needs to be requested in [polling_interval] million seconds
data.polling_intervalYesLongRecommended waiting time(million seconds) to the next repeat request. seconds
data.risk_levelYesInteger-1: Invalid
0: Very Low Risk
1: Some Risk
2: Low Risk
3: Medium Risk
4: High Risk
5: Significant Risk
data.resultYesString{
"proxy": {
"proxy_implementation_verified": “”,
"is_proxy": “0” },
"verified": “1”
}
data.risk_categoryYesString"[\"CONTRACT_SECURITY\"]"
data.risk_codeYesString"[\"CONTRACT_UNVERIFIED\"]"
data.trust_scoreYesInteger60

Result

The result will comprise of a dict of object, the object contain the following fields
Name: Name of the check.
Type: The representation of the check’s details. Can be one of the followings: dict, string, list.

NameTypeDescription
anti_whaledictContains information about the anti-whale mechanism in the contract.
anti_whale_modifiablestringIndicates if the anti-whale mechanism is modifiable (0 or 1).
is_anti_whalestringIndicates if the contract has an anti-whale mechanism (0 or 1).
bad_function_encodestringIndicates if the contract contains badly encoded functions (0 or 1).
balance-external-callstringIndicates if the "balanceOf(address)" function depends on external calls, potentially making it vulnerable to flashloan attacks (0 or 1).
code_obfuscationstringIndicates if the contract contains obfuscated code or names (0 or 1).
dev_addressstringContract's deployer address
dev_token_balancestringDeployer's token balance for the target token
dev_token_percentstringDeployer's token balance percent for the target token
dex_infolistInformation on decentralized exchange listings. Each item is a dictionary with keys: dex, factory_address, pair, pair_create_dt, target_token.
fake_tokendictContains information about whether the token is fake or not.
is_fakestringIndicates if the token is fake (0 or 1).
mimic_token_addressstringAddress of the token being mimicked (if any).
mimic_token_namestringName of the token being mimicked (if any).
mimic_token_symbolstringSymbol of the token being mimicked (if any).
hidden_ownerstringIndicates if there is a hidden owner, which is risky since the contract’s ownership has not been abandoned (0 or 1).
holderslistERC20 token holders information. Each item is a dictionary with keys: accountAddress, tokenBalance.
holders_countstringERC20 token holders count.
is_in_dexstringIndicates if the token is listed on a decentralized exchange (0 or 1).
is_mintablestringIndicates if the contract allows minting of new tokens (0 or 1).
low_level_external_callstringIndicates if the contract makes low-level external calls, which can be risky (0 or 1).
lp_holderslistDex LP token holders information. Each item is a dictionary with keys: dex, pair, and holders. holders is a list of dictionaries with keys: accountAddress, tokenBalance.
lp_holders_countstringList of dictionaries containing LP holders count information for each pair. Each item has keys: dex, holders_count, pair.
owner_addressstringContract's owner address
owner_change_balancestringIndicates the balance change of the owner.
owner_token_balancestringOwner's token balance for the target token.
owner_token_percentstringOwner's token balance percent for the target token.
owner_typestringContract's owner type (e.g., contract or EOA - Externally Owned Account).
proxydictContains information about the contract's proxy status.
is_proxystringIndicates if the contract is an upgradable proxy (0 or 1).
proxy_admin_addressstringThe address of the proxy admin.
proxy_admin_typestringThe type of proxy admin.
proxy_implementation_addressstringThe address of the proxy implementation.
proxy_implementation_verifiedstringIndicates if the proxy implementation is verified (0 or 1).
self_destructstringIndicates if the contract can be self-destructed (0 or 1).
token_decimalsstringToken decimals information
token_namestringToken name
token_symbolstringToken symbol
token_supplystringToken total supply
transfer_blackliststringIndicates if there is a blacklist mechanism that can block users from transferring (0 or 1).
transfer_cooldownstringIndicates if there is a cooldown period for transfers (0 or 1).
transfer_pausablestringIndicates if token transfers can be paused (0 or 1).
transfer_whiteliststringIndicates if there is a whitelist mechanism that only allows certain users to do transfers (0 or 1).
unlimited_mintablestringIndicates if the contract allows unlimited minting of tokens (0 or 1).
verifiedstringContract's verification status on blockchain explorer

Result example:

{
  "status": "OK",
  "type": "GENERAL",
  "code": “000000000”,
  "errorData": “null”,
  "data": {
    "result": {
      "anti_whale": {
        "is_anti_whale": "0",
        "anti_whale_modifiable": "0",
      },
      "owner_token_percent": "0.0",
      "lp_holders": [],
      "lp_total_supply": [],
      "transfer_pausable": "0",
      "hidden_owner": "0",
      "dev_address": "0xf6912c877ce99715211c63e23515353749045e64",
      "transfer_blacklist": "0",
      "transfer_whitelist": "0",
      "holders": [
        {
          "accountAddress": "0xA9bB6BB9F20D4FeeD6513dA2397e4474895eb524",
          "tokenBalance": "32521447491708590405973390"
        },
        {
          "accountAddress": "0xEfC4F11E8ca5B36bd62e2Cb936d6AFCCC2261140",
          "tokenBalance": "12709776155950624567460705"
        }
      ],
      "fake_token": null,
      "dev_token_percent": "0.0",
      "token_name": "VLaunch",
      "low_level_external_call": "0",
      "bad_function_encode": "0",
      "unlimited_mintable": "0",
      "code-obfuscation": "0",
      "self_destruct": "0",
      "dev_token_balance": "0",
      "is_in_dex": "0",
      "balance_external_call": "0",
      "total_supply": "52460367000000000000000000",
      "verified": "1",
      "dex_info": [],
      "owner_address":       "0xe4EEd73B6cc31111D3dc18D57c6D0126ceE22EB9",
      "proxy": {
        "proxy_implementation_verified": "",
        "proxy_admin_address": "",
        "is_proxy": "0",
        "proxy_admin_type": "",
        "proxy_implementation_address": ""
      },
      "holders_count": "7518",
      "is_mintable": "1",
      "transfer_cooldown": "0",
      "owner_token_balance": "0",
      "token_decimals": "18",
      "token_symbol": "VPAD",
      "owner_type": "contract"
    },
    "risk_category": "[\"CONTRACT_SECURITY\"]",
    "has_result": true,
    "risk_code": "[\"MINTABLE\"]",
    "request_id": "3980693728e145dbbf8fa7e42f9c672d",
    "polling_interval": null,
    "trust_score": 90
  },
  "subData": null,
  "params": null
}