DeFi API
查询产品列表

查询产品列表#

描述:当你输入搜索条件后,该 API 将提供指定条件的可分页投资品列表。

请求地址#

POST https://www.okx.com/api/v5/defi/explore/product/list

请求参数#

参数名称相关描述参数类型必传数据类型
simplifyInvestType查询投资品类型 (100:稳定币;101:单币赚币;102;多币赚币;103:机枪池)请求体String
network查询网络名称 (从这里获取)请求体String
poolVersion区别 V2 和 V3 类型流动池,默认为 V2请求体String
platformIds平台 ID (从这里获取)请求体Array[String]
sort分类查询请求体Struct
>orders按订单分类查询请求体Array[Struct]
>>direction排序方向:(升序 - ASC、降序 - DESC)请求体String
>>property结果排序的属性名 (可排序字段:锁仓量 - TVL、APY利率 - RATE)请求体String
tokenIds查询币种 ID 列表 (从这里获取)请求体Array[String]
offset可分页的偏移量请求体String
limit可分页限制请求体String

响应参数#

参数名称相关描述数据类型
investmentId投资品 IDString
investmentName投资品名称String
chainId区块链 IDString
rate收益率String
investType投资品类型:1. 存币;2. 流动性池;3. 挖矿;4. 机枪池;5. 质押String
platformName平台名称String
platformId平台 IDString
rateType收益率计算类型:0:APY;1:APRString
tvl总锁定价值String
underlyingToken质押代币Struct
>isBaseToken质押代币是否为主网基准代币Boolean
>tokenContract质押代币的智能合约地址String
>tokenSymbol质押代币标识String
total查询条件总数String

请求示例#

shell
curl --location 'https://www.okx.com/api/v5/defi/explore/product/list' \
--header 'OK-ACCESS-KEY: 4b****53' \
--header 'OK-ACCESS-PASSPHRASE: p****d' \
--header 'Content-Type: application/json' \
--data '{
    "network":"ETH",
    "offset":"0",
    "limit":"10",
    "sort": {
        "orders":[
            {
                "direction":"DESC",
                "property":"TVL"
            }
        ]
    },
    "platformIds": ["89"]
}'

响应示例#

200
{
    "code": 0,
    "msg": "",
    "data": {
        "investments": [
            {
                "investmentId": "21033",
                "investmentName": "DAI",
                "chainId": "1",
                "rate": "0.04879",
                "investType": "4",
                "platformName": "MakerDAO",
                "platformId": "89",
                "poolVersion": "1",
                "rateType": "0",
                "tvl": "1211124903.92264",
                "underlyingToken": [
                    {
                        "tokenSymbol": "DAI",
                        "tokenAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
                        "isBaseToken": false
                    }
                ]
            }
        ],
        "total": "1"
    }
}