投资品搜索#
这是 DeFi 投资流程的第一步。当用户想要查找 DeFi 投资机会时,使用此接口按代币名称(如 "USDC"、"ETH")搜索可用的投资品。返回结果包含投资品 ID、名称、协议、APY、TVL 等信息。获取到 investmentId 后,可调用 /product/detail 获取详情,或调用 /product/detail/prepare 准备交易参数。
URL:POST /api/v6/defi/product/search
请求参数#
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| tokenKeywordList | Array | 是 | Token 关键词列表(如 ["USDC", "ETH"]) |
| platformKeywordList | Array | 否 | Platform 关键词列表(如 ["AAVE V3"]) |
| pageNum | Integer | 否 | 页码,最小 1;当前固定pageSize=20 |
| chainIndex | String | 否 | 链 ID(如 1=ETH, 56=BSC等) |
| productGroup | String | 否 | 投资类型过滤,默认SINGLE_EARN;包含:SINGLE_EARN, DEX_POOL, LENDING |
请求示例#
示例 1: 仅搜索 USDC Token#
Json
{
"tokenKeywordList": ["USDC"],
"pageNum": 1
}
示例 2: 搜索多个 Token + 指定链#
Json
{
"tokenKeywordList": ["USDC", "ETH"],
"chainIndex": "1",
"pageNum": 1
}
示例 3: 搜索 + 过滤协议 + 投资类型#
Json
{
"tokenKeywordList": ["USDC"],
"platformKeywordList": ["Aave"],
"productGroup": "SINGLE_EARN",
"pageNum": 1
}
Json
{
"tokenKeywordList": ["USDC"],
"platformKeywordList": ["Uniswap"],
"productGroup": "DEX_POOL",
"pageNum": 1
}
Json
{
"tokenKeywordList": ["USDC"],
"platformKeywordList": ["AAVE V3"],
"productGroup": "LENDING",
"pageNum": 1
}
示例 4: 搜索多链数据#
Json
{
"tokenKeywordList": ["USDT"],
"pageNum": 1
}
响应参数#
| 字段 | 类型 | 说明 |
|---|---|---|
| total | Integer | 总条数 |
| list | Array | 产品列表 |
| > investmentId | String | 投资品ID |
| > name | String | 投资品名称 |
| > platformName | String | 协议名称 |
| > rate | String | APY |
| > tvl | String | TVL |
| > chainIndex | String | 链ID |
| > detailPath | String | 详情页路径 |
| > feeRate | BigDecimal | 手续费率 |
| > productGroup | String | 投资品类型 |
响应示例#
搜索 USDC + 协议 Aave
Json
{
"code": 0,
"msg": "",
"data": {
"total": 8,
"list": [
{
"investmentId": 9502,
"name": "USDC",
"platformName": "Aave V3",
"rate": "0.02140",
"tvl": "3423591587.48413",
"detailPath": null,
"feeRate": null,
"productGroup": "SINGLE_EARN",
"chainIndex": "1"
},
{
"investmentId": 378532533,
"name": "USDC",
"platformName": "Aave V3",
"rate": "0.02590",
"tvl": "370145418.65238",
"detailPath": null,
"feeRate": null,
"productGroup": "SINGLE_EARN",
"chainIndex": "8453"
},
{
"investmentId": 124,
"name": "USDC",
"platformName": "Aave V3",
"rate": "0.03510",
"tvl": "100947767.28590",
"detailPath": null,
"feeRate": null,
"productGroup": "SINGLE_EARN",
"chainIndex": "43114"
}
]
}
}
实际返回 8 条结果,此处仅展示前 3 条。
rate为小数格式(0.02140 = 2.14%),tvl单位为 USD。