Get Contract Detail
1. Overview & Typical Use
Returns complete detailed information for a contract by address, including verification status, creator, method signature map, label info, and token info.
- Typical use: contract detail page rendering, contract security audit lookup, method signature reverse lookup.
- When not to use: to query a list of contracts use “Get Contract List”; to query contract call statistics use “Get Contract Call Statistics”.
2. Endpoint & Authentication
GET /api/contract
For Base URL and authentication, see Common Network & Authentication.
3. Request
Fields
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
contract | string | Yes | — | Contract address (Base58, starts with T) |
source | string | No | — | Data source identifier |
session-id | string | No | — | Session ID |
word | string | No | — | Keyword search |
type | string | No | — | Contract type filter |
address | string | No | — | Filter by issuer address |
direction | string | No | — | Filter direction |
issueName | string | No | — | TRC10 issuer address or name |
order | integer | No | -1 | Sort direction: 1 ascending / -1 descending |
4. Response
Fields
Top-level
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
type | string | Required | Response type | — |
count | integer | Required | Number of records returned; this field always returns 0 on this detail endpoint regardless of data[] length — use array length instead | — |
status | object | Required | Status code and message | — |
data | array | Required | Array of contract data | — |
data[] element
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
address | string | Required | Contract address | — |
balance | integer | Required | TRX balance | sun (1 TRX = 10^6 sun) |
balanceInUsd | number | Required | TRX balance in USD | — |
verify_status | integer | Required | Verification status: 0 unverified, 1 partially verified, 2 fully verified | — |
is_proxy | boolean | Required | Whether it is a proxy contract | — |
proxy_implementation | string | Required | Implementation address of the proxy contract (empty string if not a proxy) | — |
old_proxy_implementation | string | Required | Old proxy implementation address (empty string if not a proxy) | — |
trxCount | integer | Required | Cumulative transaction count | — |
date_created | integer | Required | Creation time | ms timestamp |
call_value | integer | Required | TRX value attached at contract creation | sun |
call_token_value | integer | Required | TRC10 token value attached at contract creation | — |
call_token_id | integer | Required | TRC10 token ID attached at contract creation | — |
call_token_info | object | Required | Detailed info of the token attached at creation; object containing a tokenInfo key — inner schema see call_token_info.tokenInfo sub-table below | — |
name | string | Required | Contract name | — |
description | string | Required | Contract description (may be empty) | — |
tag1 | string | Optional | Primary contract label | — |
tag1Url | string | Optional | Primary label link | — |
vip | boolean | Required | Whether it is a VIP contract | — |
feedbackRisk | boolean | Required | Whether there is a risk feedback | — |
announcement | string | Required | Announcement content (may be empty) | — |
license | string | Required | Open-source license identifier (e.g. "0" means none) | — |
blueTag | string | Optional | Blue tag (official verification label) | — |
blueTagUrl | string | Optional | Blue tag link | — |
greyTag | string | Required | Grey tag (may be empty) | — |
redTag | string | Required | Red tag (risk marker, may be empty) | — |
publicTag | string | Optional | Public label | — |
publicTagDesc | string | Required | Public label description (may be empty) | — |
activeDay | integer | Required | Number of active days | days |
creator | object | Required | Creator info (see sub-table) | — |
auditReportUrl | string | Required | Audit report URL (may be empty) | — |
auditDep | string | Required | Auditing organization (may be empty) | — |
auditDate | string | Required | Audit date (may be empty) | — |
destroyed | integer | Optional | Returned only for destroyed contracts; value is fixed at 1 (destruction marker — note the type is integer, not boolean; under strict typing 1 === true does not hold); active contracts omit this field. Evidence: TCySpKjSp8SGW7g6eVnzVYtbY2WeC5MBZF returns destroyed: 1 | — |
destroyed_hash | string | Optional | Destruction transaction hash; paired with destroyed, returned only for destroyed contracts; omitted for active contracts | — |
methodMap | object | Required | Method selector → method signature map | — |
energy_factor | number | Required | Energy factor | — |
tokenInfo | object | Required | Token metadata (value schema below); non-token contracts also return this object, with contents reflecting the contract’s owning token (e.g. TRX placeholder) | — |
balanceWithTokens | number | Required | Total balance including token assets | TRX |
balanceWithTokensInUsd | number | Required | Total balance including token assets in USD | USD |
call_token_info.tokenInfo object schema (9 common fields):
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
tokenId | string | Required | Token contract address (Base58); TRX placeholder is _ | — |
tokenAbbr | string | Required | Token abbreviation (e.g. USDT / TRX) | — |
tokenName | string | Required | Token name | — |
tokenDecimal | integer | Required | Decimal precision (required to convert the amount field) | — |
tokenCanShow | integer | Required | Whether displayable (1 yes / 0 no) | — |
tokenType | string | Required | Token type (trc10 / trc20 / trc721 / trc1155) | — |
tokenLogo | string | Required | Token logo URL | — |
tokenLevel | string | Required | Token level | — |
vip | boolean | Required | Whether it is a VIP token | — |
tokenInfo object schema (9 common fields + issuerAddr):
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
tokenId | string | Required | Token contract address (Base58); TRX placeholder is _ | — |
tokenAbbr | string | Required | Token abbreviation (e.g. USDT / TRX) | — |
tokenName | string | Required | Token name | — |
tokenDecimal | integer | Required | Decimal precision (required to convert the amount field) | — |
tokenCanShow | integer | Required | Whether displayable (1 yes / 0 no) | — |
tokenType | string | Required | Token type (trc10 / trc20 / trc721 / trc1155) | — |
tokenLogo | string | Required | Token logo URL | — |
tokenLevel | string | Required | Token level | — |
vip | boolean | Required | Whether it is a VIP token | — |
issuerAddr | string | Required | Issuer address (Base58) | — |
creator object
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
address | string | Required | Creator address | — |
address_is_contract | boolean | Required | Whether the creator is a contract | — |
txHash | string | Required | Creation transaction hash | — |
token_balance | integer | Required | Creator token balance | — |
consume_user_resource_percent | integer | Required | User resource consumption percentage | % |
energy_remaining | integer | Required | Remaining energy | — |
energy_limit | integer | Required | Energy limit | — |
energy_ratio | number | Required | Energy ratio | — |
5. Errors
For HTTP status codes, see Common Errors. Key points for this endpoint:
- Contract address does not exist: returns
200+data: [],count: 0; no 4xx is raised. - Empty result is not an error: when the address is invalid or the contract does not exist, an empty array is returned as a normal response.
Last updated on: