Aggregate Max
opportunities-aggregate-maxCompute the maximum value of a chosen numeric field, such as APR or TVL, across Merkl opportunities filtered by chain, protocol, or status.
Instructions
GET /v4/opportunities/aggregate/max/{field}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Filter by name | |
| tags | No | Filter by tag | |
| test | No | Include opportunities with test campaigns | |
| type | No | A comma separated list of Opportunity type | |
| field | Yes | Numeric field to compute max on (e.g. apr, tvl, dailyRewards) | |
| point | No | Include opportunities with point campaigns | |
| action | No | A comma separated list actions. Legal values: POOL,HOLD,DROP,LEND,BORROW,LONG,SHORT,SWAP,INVALID | |
| search | No | Search amongst multiple values (token, protocols, tags, campaigns) | |
| status | No | A comma separated list of status. Legal values: LIVE,PAST,SOON | |
| tokens | No | A comma separated list of token symbol. Use to filter by token | |
| chainId | No | A comma separated list of chain ids. Example: ?chainId=1,42161 | |
| campaigns | No | Include campaign data. Will slow down the request | |
| chainName | No | A comma separated list of chain names. Example: ?chainName=ethereum,arbitrum | |
| campaignId | No | Search the opportunity linked to a given campaignId | |
| identifier | No | Filter by identifier (mainParameter) | |
| maximumApr | No | Maximum APR threshold | |
| maximumTvl | No | Maximum TVL threshold in USD | |
| minimumApr | No | Minimum APR threshold | |
| minimumTvl | No | Minimum TVL threshold in USD | |
| tokenTypes | No | Filter by token type. Use POINT to include point campaigns and PRETGE to include preTGE campaigns. | |
| creatorSlug | No | ||
| programSlugs | No | A comma separated list of program ids or slugs. See GET /v4/programs | |
| creatorAddress | No | Filter by creator address | |
| mainProtocolId | No | A comma separated list of protocol ids. See GET /v4/protocols | |
| distributionTypes | No | Filter by distribution type. Legal values: FIX_REWARD, MAX_REWARD, DUTCH_AUCTION | |
| rewardTokenSymbol | No | Filter by opportunity with at least 1 campaign where the reward token has this symbol | |
| excludeSubCampaigns | No | Exclude sub-campaigns from the results |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Maximum value for the requested field across matching opportunities |