API Documentation

API Domain: https://data1.hexens.io

Supported Blockchains

Endpoint: GET /api/v1/chain/list

Description: Retrieve a list of all supported blockchains for contract analysis. Use the chainid value from the response when analyzing contracts.

Sample Response:

{
  "chains": [
    {"tag": "ethereum", "chainid": "1"},
    {"tag": "bsc", "chainid": "56"},
    {"tag": "optimism", "chainid": "10"},
    // ....
  ]
}

Analyze Contract Risk

Endpoint: GET /api/v1/contract/analyze-risk

Description: Run a comprehensive risk analysis on a smart contract by specifying its address and chain ID.

Request Parameters:

  • address (string): The smart contract address to analyze.

  • chain_id (string): The blockchain chain ID (use /api/v1/chain/list).

  • token (string): Your authentication token in the format {public_token}-{private_token}.

Result Parameters:

  • address – Contract address to be analyzed.

  • chain_id – chain ID.

  • info – General information about the address.

    • is_proxytrue/false. Indicates whether the provided address is a proxy contract. If it is a proxy, we scan the implementation contract instead of the proxy itself. In the results, we show both the original address provided by the user (proxy_address) and the actual implementation address that was scanned (implementation_address).

    • implementation_address – See is_proxy.

    • proxy_address – See is_proxy.

    • is_verifiedtrue/false. Indicates whether the contract provided by the user is verified. If false, it means the deployer intentionally hid the code, leaving no way for users to check its functionality.

    • is_erc20 - true/false. In case of "false", the API output will not include risk breakdown

  • results - Array of risks. Each element of the array contains:

    • key: Risk name

    • value: true / false — whether the risk exists

    • title: Risk title

    • sub_title: Risk subtitle

    • description: Risk description

    • severity: Risk severity

    • market-endorsed: Property complements the technical and code-analysis-based trust score by indicating whether a token has been broadly adopted, integrated, and trusted by traders, platforms, and end-users over time

Example Request:

Sample Response: erc_20 true

Sample Response: erc_20 false

Errors

400

MISSING_PARAMETERS

Required parameters are missing. Please provide address, chain_id, and token.

400

INVALID_TOKEN_FORMAT

Token must be in format public-private separated by a hyphen.

400

INVALID_ADDRESS_FORMAT

The address could not be parsed due to an invalid or unrecognized format.

400

INVALID_CHAIN_ID

Invalid chain ID, must be one of the supported chain IDs.

400 (or 200)

PROCESSING_TIMEOUT

The request took too long to process. Please try again later. (May still return 200)

400 (or 200)

INTERNAL_ERROR

Something went wrong. Please contact support if the issue persists. (May still return 200)

429

Rate limit exceeded.

⚠️ Note: Both timeout and internal errors may still arrive in the response body with status: 200 due to the streaming mechanism.

Last updated