跳转到主要内容
POST
/
api
/
v1
/
risk
/
check-transaction
交易风险检查
curl --request POST \
  --url https://api.example.com/api/v1/risk/check-transaction \
  --header 'Content-Type: application/json' \
  --data '
{
  "chainId": 8453,
  "from": "0xabc1230000000000000000000000000000000000",
  "to": "0xrouter00000000000000000000000000000000000",
  "value": "0",
  "data": "0x095ea7b3000000000000000000000000router000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
  "origin": "https://app.uniswap.org"
}
'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "riskLevel": "medium",
    "warnings": [
      {
        "type": "approval_unlimited",
        "message": "Unlimited approval detected"
      }
    ],
    "decoded": {
      "method": "approve",
      "token": "USDC",
      "spender": "0xrouter00000000000000000000000000000000000"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.nexfi.robert.dpdns.org/llms.txt

Use this file to discover all available pages before exploring further.

请求体

application/json

待签名交易风控请求。

chainId
integer
必填

链 ID。

示例:

8453

from
string
必填

发起地址。

示例:

"0xabc1230000000000000000000000000000000000"

to
string
必填

目标地址或合约地址。

示例:

"0xrouter00000000000000000000000000000000000"

value
string
必填

交易附带的原生币金额。

示例:

"0"

data
string

交易 calldata。

示例:

"0xa9059cbb"

origin
string

请求来源域名。

示例:

"https://app.uniswap.org"

响应

200 - application/json

成功返回交易风险

统一响应包裹结构。

code
integer
必填

业务状态码,0 表示成功。

示例:

0

msg
string
必填

可读返回消息。

示例:

"ok"

data
object

交易风控结果。