跳转到主要内容
POST
/
api
/
v1
/
staking
/
transactions
/
build
构建申购或赎回交易
curl --request POST \
  --url https://api.example.com/api/v1/staking/transactions/build \
  --header 'Content-Type: application/json' \
  --data '
{
  "productId": "base_usdc_nexfi_vault",
  "orderType": "subscribe",
  "walletAddress": "0xabc1230000000000000000000000000000000000",
  "amount": "1000"
}
'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "buildId": "build_20260511_0001",
    "chainId": 8453,
    "to": "0xvault000000000000000000000000000000000001",
    "value": "0",
    "data": "0xb6b55f25",
    "gasLimit": "280000",
    "warnings": [
      "APY is estimated and not guaranteed"
    ],
    "sharesPreview": "998.12",
    "feePreview": "1.50",
    "vaultAddress": "0xvault000000000000000000000000000000000001"
  }
}

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

质押交易构建请求。

productId
string
必填

产品 ID。

示例:

"base_usdc_nexfi_vault"

orderType
enum<string>
必填

订单类型。

可用选项:
subscribe,
redeem
示例:

"subscribe"

walletAddress
string
必填

钱包地址。

示例:

"0xabc1230000000000000000000000000000000000"

amount
string
必填

申购或赎回金额。

示例:

"1000"

响应

200 - application/json

成功返回交易构建结果

统一响应包裹结构。

code
integer
必填

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

示例:

0

msg
string
必填

可读返回消息。

示例:

"ok"

data
object

钱包本地签名所需的交易载荷。