DeFi API

Query product list#

Description: This API allows you to query a paginated list of investment products based on specified criteria.

Request URL#

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

Request parameters#

ParameterDescriptionLocationRequiredData type
simplifyInvestTypeQuery investment product types (100: Stablecoin, 101: Single, 102: Multi, 103: Vaults)Request bodyYesString
networkQuery network name (refer to here)Request bodyYesString
poolVersionPool version (default to V2, distinguishing between V2 and V3)Request bodyNoString
platformIdsPlatform ID list (refer to here)Request bodyNoArray[String]
sortSorting criteriaRequest bodyNoStruct
>ordersOrder-based sorting criteriaRequest bodyNoArray[Struct]
>>directionSorting direction: (ascending - ASC, descending - DESC)Request bodyNoString
>>propertyProperty name for sorting results (sortable fields: Total Value Locked - TVL, APY Rate - RATE)Request bodyNoString
tokenIdsToken ID list (refer to here)Request bodyNoArray[String]
offsetPaginated offsetRequest bodyNoString
limitPaginated limitRequest bodyYesString

Response Parameters#

ParameterDescriptionData type
investmentIdInvestment product IDString
investmentNameInvestment product nameString
chainIdBlockchain IDString
rateYield rateString
investTypeInvestment product type: 1. Saving; 2. Liquidity Pool; 3. Farming; 4. Vaults; 5. StakingString
platformNamePlatform nameString
platformIdPlatform IDString
rateTypeYield rate calculation type: 0: APY; 1: APRString
tvlTotal Value LockedString
underlyingTokenUnderlying token for stakingStruct
>isBaseTokenWhether the underlying token is the base token of the networkBoolean
>tokenContractSmart contract address of the underlying tokenString
>tokenSymbolSymbol of the underlying tokenString
totalTotal count based on the query criteriaString

Request example#

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"]
}'

Response example#

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"
    }
}