Skip to main content

Transaction Analysis API

Endpoint

https://api.hashdit.io/security-api/public/chain/v1/detect/transaction
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 blockchain1 - Ethereum
56 - BSC
137 - Polygon
urlYesStringUrl or Domainhttp://pancakak.com/
Pancakak.com
PANCAKAK.COM
http://a.b.pancakak.com/abc
transactionYesStringThe transaction hash of the transaction in hex string format0x6b2b333c62ae791da49ffb261b16634fb9eb07da407b55a43748d7fbcaab45e0
fromYesStringThe source address of the transaction in hex string format0x8894E0a0c962CB723c1976a4421c95949bE2D4E3
toYesStringThe destination address of the transaction in hex string format0x55d398326f99059fF775485246999027B3197955
dataYesStringThe encoded call data of the transaction in hex string format0x095ea7b300000000000000000000000019eb37315a0df7155c06600ebd7a1c4019c0bf8effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
valueNoStringThe value of the transaction in Wei in hex string format
gasNoStringThe gas required for the transaction in hex string format
gas_priceNoStringThe gas price for the transaction in hex string format

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.typeNoStringinvalid_type
contract_invoke
direct_transfer
contract_creation
not_supported_chain_id
data.valueYesString
data.functionYesStringapprove
data.paramsYesArray[{
"name": "_spender",
"type": "address",
"value":
"0x67f51179B59D32563A1aD370B717A82CFB081cED"
},
{ "name": "_value",
"type": "uint256",
"value": "7237005577332262213973186563042994240829374041602535252466099000494570602495"
}]
data.risk_levelNoInteger-1: Invalid
0: Very Low Risk
1: Some Risk
2: Low Risk
3: Medium Risk
4: High Risk
5: Significant Risk
data.risk_detailYesStringSee Risk Detail
[{
"name": "approve-to-eoa",
"value": "Approving to an EOA address."
},
{
"name": "approve-huge-amount",
"value": "Approving a huge amount of assets."
}]
data.risk_itemYes
data.risk_item.urlYesJson{
"risk_level": 3,
"risk_detail":
" [{\"name\":\"threat_researcher\",\"value\":\"The website is referenced in reports by Threat researchers.\"}]"
}
data.risk_item.addressYesJson{
"0x67f51179b59d32563a1ad370b717a82cfb081ced": {
"risk_level": 2,
"risk_detail":
"[{\"name\":\"is_in_blist\",\"value\":\"There are potential risks related to this address based on the threat intelligence.\"}]"
},
"0x67f51179b59d32563a1ad370b717a82cfb081ced": {
"risk_level": 2,
"risk_detail":
"[{\"name\":\"modify-fee\",\"value\":\"The contract transaction fee is modifiable, if it is increased dramatically, users may encounter honeypot/rugpull risks.\"}]"
}
}

Risk Detail

The risk_detail will comprise of an array of objects, the object contain the following fields name : name of the check. value: check result

NameValue
url-high-risk-transactionTransaction triggered on a malicious website.
transfer-recipient-high-riskRecipient is a high risk address.
contract-high-riskInteracting with a high risk contract.
approve-huge-amountApproving a huge amount of assets.
approve-to-eoaApproving to an EOA address.
approve-to-high-riskApproving to a high risk address.
transfer-to-high-riskTransfer to a high risk address.
fake-receiverThis recipient is potentially a spoofing related address. Please check again if this is your intended receiver address.
function-suspiciousHighly suspicious function
mismatched-chain-idThis is a meaningless transaction with a mismatched chain id.