> ## Documentation Index
> Fetch the complete documentation index at: https://anypay-edge.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# YieldGetMarkets

> List and filter DeFi markets available through the Trails earn system

## Overview

`YieldGetMarkets` returns DeFi markets available for deposit through Trails, including lending markets (Aave, Morpho) and yield vaults (Yearn, ERC-4626). Use this to power market selection UIs or discover `marketId` values for composable actions.

The SDK's `useEarnMarkets` hook wraps this endpoint with typed filters and caching — prefer it in React apps.

## Request Parameters

All fields are optional.

| Field      | Type   | Description                                               |
| ---------- | ------ | --------------------------------------------------------- |
| `provider` | string | Filter by protocol (e.g. `"aave"`, `"morpho"`, `"yearn"`) |
| `chainId`  | string | Filter by chain ID (e.g. `"8453"` for Base)               |
| `type`     | string | Market category: `"lending"` or `"vault"`                 |
| `search`   | string | Free-text search over market names and tokens             |
| `sort`     | string | Sort order (e.g. `"rewardRateDesc"`)                      |
| `limit`    | number | Number of results to return                               |
| `offset`   | number | Pagination offset                                         |

## Response

Returns `payload` containing an array of market objects. Each market includes:

| Field               | Description                                                                |
| ------------------- | -------------------------------------------------------------------------- |
| `id`                | Unique market ID — pass this to `lend()` or `deposit()` composable actions |
| `providerId`        | Protocol identifier (e.g. `"aave"`, `"morpho"`)                            |
| `rewardRate`        | Current APY as a decimal (e.g. `0.045` = 4.5%)                             |
| `statistics.tvlUsd` | Total value locked in USD                                                  |
| `metadata.name`     | Human-readable market name                                                 |
| `metadata.token`    | Underlying token info (symbol, address, decimals)                          |

## Examples

### List all markets on Base

```typescript theme={null}
const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetMarkets', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Access-Key': 'YOUR_ACCESS_KEY',
  },
  body: JSON.stringify({
    chainId: '8453',
    limit: 20,
    offset: 0,
  }),
})

const { payload } = await response.json()
const markets = JSON.parse(payload)

markets.forEach(market => {
  console.log(`${market.id}: ${(market.rewardRate * 100).toFixed(2)}% APY`)
})
```

### Filter lending markets by protocol

```typescript theme={null}
const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetMarkets', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Access-Key': 'YOUR_ACCESS_KEY',
  },
  body: JSON.stringify({
    provider: 'aave',
    type: 'lending',
    sort: 'rewardRateDesc',
  }),
})

const { payload } = await response.json()
const markets = JSON.parse(payload)
```

### Search for USDC markets

```typescript theme={null}
const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetMarkets', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Access-Key': 'YOUR_ACCESS_KEY',
  },
  body: JSON.stringify({
    search: 'usdc',
    sort: 'rewardRateDesc',
    limit: 10,
  }),
})
```

## SDK alternative

In React, use the typed `useEarnMarkets` hook instead of calling this endpoint directly:

```tsx theme={null}
import { useEarnMarkets } from '0xtrails'

const { data: markets, isLoading } = useEarnMarkets({
  chain: 'base',
  type: 'lending',
  provider: 'aave',
  search: 'usdc',
  sortBy: 'rewardRateDesc',
  limit: 20,
})

// markets[i].id → pass to lend() or deposit() actions
```

## See also

* [YieldGetProviders](/api-reference/endpoints/yield-get-providers) — List available protocols
* [Markets & Providers](/sdk/composable-actions/markets-and-providers) — SDK hooks reference


## OpenAPI

````yaml trails-api.gen.json post /rpc/Trails/YieldGetMarkets
openapi: 3.0.0
info:
  title: Trails API
  version: 0.0.1
servers:
  - url: https://trails-api.sequence.app
    description: Trails API
security: []
paths:
  /rpc/Trails/YieldGetMarkets:
    post:
      tags:
        - Trails
      summary: YieldGetMarkets returns Yield markets with optional filters.
      operationId: Trails-YieldGetMarkets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetYieldMarketsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetYieldMarketsResponse'
        4XX:
          description: Client error
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorWebrpcEndpoint'
                  - $ref: '#/components/schemas/ErrorWebrpcRequestFailed'
                  - $ref: '#/components/schemas/ErrorWebrpcBadRoute'
                  - $ref: '#/components/schemas/ErrorWebrpcBadMethod'
                  - $ref: '#/components/schemas/ErrorWebrpcBadRequest'
                  - $ref: '#/components/schemas/ErrorWebrpcClientAborted'
                  - $ref: '#/components/schemas/ErrorWebrpcStreamLost'
                  - $ref: '#/components/schemas/ErrorUnauthorized'
                  - $ref: '#/components/schemas/ErrorPermissionDenied'
                  - $ref: '#/components/schemas/ErrorSessionExpired'
                  - $ref: '#/components/schemas/ErrorMethodNotFound'
                  - $ref: '#/components/schemas/ErrorRequestConflict'
                  - $ref: '#/components/schemas/ErrorAborted'
                  - $ref: '#/components/schemas/ErrorGeoblocked'
                  - $ref: '#/components/schemas/ErrorRateLimited'
                  - $ref: '#/components/schemas/ErrorProjectNotFound'
                  - $ref: '#/components/schemas/ErrorAccessKeyNotFound'
                  - $ref: '#/components/schemas/ErrorAccessKeyMismatch'
                  - $ref: '#/components/schemas/ErrorInvalidOrigin'
                  - $ref: '#/components/schemas/ErrorInvalidService'
                  - $ref: '#/components/schemas/ErrorUnauthorizedUser'
                  - $ref: '#/components/schemas/ErrorQuotaExceeded'
                  - $ref: '#/components/schemas/ErrorQuotaRateLimit'
                  - $ref: '#/components/schemas/ErrorNoDefaultKey'
                  - $ref: '#/components/schemas/ErrorMaxAccessKeys'
                  - $ref: '#/components/schemas/ErrorAtLeastOneKey'
                  - $ref: '#/components/schemas/ErrorTimeout'
                  - $ref: '#/components/schemas/ErrorInvalidArgument'
                  - $ref: '#/components/schemas/ErrorUnavailable'
                  - $ref: '#/components/schemas/ErrorQueryFailed'
                  - $ref: '#/components/schemas/ErrorIntentStatus'
                  - $ref: '#/components/schemas/ErrorIntentProtocolDeprecated'
                  - $ref: '#/components/schemas/ErrorNotFound'
                  - $ref: '#/components/schemas/ErrorUnsupportedNetwork'
                  - $ref: '#/components/schemas/ErrorClientOutdated'
                  - $ref: '#/components/schemas/ErrorIntentsSkipped'
                  - $ref: '#/components/schemas/ErrorQuoteExpired'
                  - $ref: '#/components/schemas/ErrorHighPriceImpact'
                  - $ref: '#/components/schemas/ErrorIntentsDisabled'
        5XX:
          description: Server error
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorWebrpcBadResponse'
                  - $ref: '#/components/schemas/ErrorWebrpcServerPanic'
                  - $ref: '#/components/schemas/ErrorWebrpcInternalError'
                  - $ref: '#/components/schemas/ErrorUnexpected'
                  - $ref: '#/components/schemas/ErrorChainNodeHealth'
components:
  schemas:
    GetYieldMarketsRequest:
      type: object
      properties:
        provider:
          type: string
        chainId:
          type: string
        type:
          type: string
        search:
          type: string
        sort:
          type: string
        limit:
          type: number
        offset:
          type: number
    GetYieldMarketsResponse:
      type: object
      required:
        - items
        - total
        - offset
        - limit
      properties:
        items:
          type: array
          description: '[]YieldMarket'
          items:
            $ref: '#/components/schemas/YieldMarket'
        total:
          type: number
        offset:
          type: number
        limit:
          type: number
    ErrorWebrpcEndpoint:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcEndpoint
        code:
          type: number
          example: 0
        msg:
          type: string
          example: endpoint error
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcRequestFailed:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcRequestFailed
        code:
          type: number
          example: -1
        msg:
          type: string
          example: request failed
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcBadRoute:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcBadRoute
        code:
          type: number
          example: -2
        msg:
          type: string
          example: bad route
        cause:
          type: string
        status:
          type: number
          example: 404
    ErrorWebrpcBadMethod:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcBadMethod
        code:
          type: number
          example: -3
        msg:
          type: string
          example: bad method
        cause:
          type: string
        status:
          type: number
          example: 405
    ErrorWebrpcBadRequest:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcBadRequest
        code:
          type: number
          example: -4
        msg:
          type: string
          example: bad request
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcClientAborted:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcClientAborted
        code:
          type: number
          example: -8
        msg:
          type: string
          example: request aborted by client
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcStreamLost:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcStreamLost
        code:
          type: number
          example: -9
        msg:
          type: string
          example: stream lost
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorUnauthorized:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Unauthorized
        code:
          type: number
          example: 1000
        msg:
          type: string
          example: Unauthorized access
        cause:
          type: string
        status:
          type: number
          example: 401
    ErrorPermissionDenied:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: PermissionDenied
        code:
          type: number
          example: 1001
        msg:
          type: string
          example: Permission denied
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorSessionExpired:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: SessionExpired
        code:
          type: number
          example: 1002
        msg:
          type: string
          example: Session expired
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorMethodNotFound:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: MethodNotFound
        code:
          type: number
          example: 1003
        msg:
          type: string
          example: Method not found
        cause:
          type: string
        status:
          type: number
          example: 404
    ErrorRequestConflict:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: RequestConflict
        code:
          type: number
          example: 1004
        msg:
          type: string
          example: Conflict with target resource
        cause:
          type: string
        status:
          type: number
          example: 409
    ErrorAborted:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Aborted
        code:
          type: number
          example: 1005
        msg:
          type: string
          example: Request aborted
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorGeoblocked:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Geoblocked
        code:
          type: number
          example: 1006
        msg:
          type: string
          example: Geoblocked region
        cause:
          type: string
        status:
          type: number
          example: 451
    ErrorRateLimited:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: RateLimited
        code:
          type: number
          example: 1007
        msg:
          type: string
          example: Rate-limited. Please slow down.
        cause:
          type: string
        status:
          type: number
          example: 429
    ErrorProjectNotFound:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: ProjectNotFound
        code:
          type: number
          example: 1008
        msg:
          type: string
          example: Project not found
        cause:
          type: string
        status:
          type: number
          example: 401
    ErrorAccessKeyNotFound:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: AccessKeyNotFound
        code:
          type: number
          example: 1101
        msg:
          type: string
          example: Access key not found
        cause:
          type: string
        status:
          type: number
          example: 401
    ErrorAccessKeyMismatch:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: AccessKeyMismatch
        code:
          type: number
          example: 1102
        msg:
          type: string
          example: Access key mismatch
        cause:
          type: string
        status:
          type: number
          example: 409
    ErrorInvalidOrigin:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: InvalidOrigin
        code:
          type: number
          example: 1103
        msg:
          type: string
          example: Invalid origin for Access Key
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorInvalidService:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: InvalidService
        code:
          type: number
          example: 1104
        msg:
          type: string
          example: Service not enabled for Access key
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorUnauthorizedUser:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: UnauthorizedUser
        code:
          type: number
          example: 1105
        msg:
          type: string
          example: Unauthorized user
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorQuotaExceeded:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: QuotaExceeded
        code:
          type: number
          example: 1200
        msg:
          type: string
          example: Quota request exceeded
        cause:
          type: string
        status:
          type: number
          example: 429
    ErrorQuotaRateLimit:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: QuotaRateLimit
        code:
          type: number
          example: 1201
        msg:
          type: string
          example: Quota rate limit exceeded
        cause:
          type: string
        status:
          type: number
          example: 429
    ErrorNoDefaultKey:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: NoDefaultKey
        code:
          type: number
          example: 1300
        msg:
          type: string
          example: No default access key found
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorMaxAccessKeys:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: MaxAccessKeys
        code:
          type: number
          example: 1301
        msg:
          type: string
          example: Access keys limit reached
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorAtLeastOneKey:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: AtLeastOneKey
        code:
          type: number
          example: 1302
        msg:
          type: string
          example: You need at least one Access Key
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorTimeout:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Timeout
        code:
          type: number
          example: 1900
        msg:
          type: string
          example: Request timed out
        cause:
          type: string
        status:
          type: number
          example: 408
    ErrorInvalidArgument:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: InvalidArgument
        code:
          type: number
          example: 2000
        msg:
          type: string
          example: Invalid argument
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorUnavailable:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Unavailable
        code:
          type: number
          example: 2002
        msg:
          type: string
          example: Unavailable resource
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorQueryFailed:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: QueryFailed
        code:
          type: number
          example: 2003
        msg:
          type: string
          example: Query failed
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorIntentStatus:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: IntentStatus
        code:
          type: number
          example: 2004
        msg:
          type: string
          example: Invalid intent status
        cause:
          type: string
        status:
          type: number
          example: 422
    ErrorIntentProtocolDeprecated:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: IntentProtocolDeprecated
        code:
          type: number
          example: 3000
        msg:
          type: string
          example: >-
            Requested intent protocol version is outdated/deprecated. Please
            upgrade your Trails SDK, see https://docs.sequence.build for more
            information.
        cause:
          type: string
        status:
          type: number
          example: 422
    ErrorNotFound:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: NotFound
        code:
          type: number
          example: 8000
        msg:
          type: string
          example: Resource not found
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorUnsupportedNetwork:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: UnsupportedNetwork
        code:
          type: number
          example: 8008
        msg:
          type: string
          example: Unsupported network
        cause:
          type: string
        status:
          type: number
          example: 422
    ErrorClientOutdated:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: ClientOutdated
        code:
          type: number
          example: 8009
        msg:
          type: string
          example: Client is outdated
        cause:
          type: string
        status:
          type: number
          example: 422
    ErrorIntentsSkipped:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: IntentsSkipped
        code:
          type: number
          example: 7000
        msg:
          type: string
          example: >-
            Intents skipped as client is attempting a transaction that does not
            require intents
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorQuoteExpired:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: QuoteExpired
        code:
          type: number
          example: 7001
        msg:
          type: string
          example: Intent quote has expired. Please try again.
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorHighPriceImpact:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: HighPriceImpact
        code:
          type: number
          example: 7002
        msg:
          type: string
          example: Quote unavailable due to high price impact
        cause:
          type: string
        status:
          type: number
          example: 422
    ErrorIntentsDisabled:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: IntentsDisabled
        code:
          type: number
          example: 9000
        msg:
          type: string
          example: Intents service is currently unavailable
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcBadResponse:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcBadResponse
        code:
          type: number
          example: -5
        msg:
          type: string
          example: bad response
        cause:
          type: string
        status:
          type: number
          example: 500
    ErrorWebrpcServerPanic:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcServerPanic
        code:
          type: number
          example: -6
        msg:
          type: string
          example: server panic
        cause:
          type: string
        status:
          type: number
          example: 500
    ErrorWebrpcInternalError:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcInternalError
        code:
          type: number
          example: -7
        msg:
          type: string
          example: internal error
        cause:
          type: string
        status:
          type: number
          example: 500
    ErrorUnexpected:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Unexpected
        code:
          type: number
          example: 2001
        msg:
          type: string
          example: Unexpected server error
        cause:
          type: string
        status:
          type: number
          example: 500
    ErrorChainNodeHealth:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: ChainNodeHealth
        code:
          type: number
          example: 9001
        msg:
          type: string
          example: Intent quote is unavailable due to interrupted chain node access
        cause:
          type: string
        status:
          type: number
          example: 503
    YieldMarket:
      type: object
      required:
        - id
        - network
        - inputTokens
        - token
        - tokens
        - rewardRate
        - status
        - metadata
        - mechanics
        - providerId
        - supportsBeneficiary
      properties:
        id:
          type: string
        network:
          type: string
        chainId:
          type: string
        inputTokens:
          type: array
          description: '[]YieldToken'
          items:
            $ref: '#/components/schemas/YieldToken'
        outputToken:
          $ref: '#/components/schemas/YieldToken'
        token:
          $ref: '#/components/schemas/YieldToken'
        tokens:
          type: array
          description: '[]YieldToken'
          items:
            $ref: '#/components/schemas/YieldToken'
        rewardRate:
          $ref: '#/components/schemas/YieldRewardRate'
        statistics:
          $ref: '#/components/schemas/YieldStatistics'
        risk:
          $ref: '#/components/schemas/YieldRiskSummary'
        status:
          $ref: '#/components/schemas/YieldStatus'
        metadata:
          $ref: '#/components/schemas/YieldMetadata'
        mechanics:
          $ref: '#/components/schemas/YieldMechanics'
        providerId:
          type: string
        curator:
          $ref: '#/components/schemas/YieldCurator'
        tags:
          type: array
          description: '[]string'
          items:
            type: string
        state:
          $ref: '#/components/schemas/YieldState'
        supportsBeneficiary:
          type: boolean
    YieldToken:
      type: object
      required:
        - symbol
        - name
        - decimals
        - network
      properties:
        symbol:
          type: string
        name:
          type: string
        decimals:
          type: number
        network:
          type: string
        address:
          type: string
        logoURI:
          type: string
        isPoints:
          type: boolean
        coinGeckoId:
          type: string
    YieldRewardRate:
      type: object
      required:
        - total
        - rateType
        - components
      properties:
        total:
          type: number
        rateType:
          type: string
        components:
          type: array
          description: '[]YieldReward'
          items:
            $ref: '#/components/schemas/YieldReward'
    YieldStatistics:
      type: object
      properties:
        tvlUsd:
          type: string
        tvl:
          type: string
        tvlRaw:
          type: string
        uniqueUsers:
          type: number
        averagePositionSizeUsd:
          type: string
        averagePositionSize:
          type: string
    YieldRiskSummary:
      type: object
      required:
        - ratings
      properties:
        ratings:
          type: array
          description: '[]YieldRiskEntry'
          items:
            $ref: '#/components/schemas/YieldRiskEntry'
    YieldStatus:
      type: object
      required:
        - enter
        - exit
      properties:
        enter:
          type: boolean
        exit:
          type: boolean
    YieldMetadata:
      type: object
      required:
        - name
        - logoURI
        - description
        - documentation
        - underMaintenance
        - deprecated
        - supportedStandards
      properties:
        name:
          type: string
        logoURI:
          type: string
        description:
          type: string
        documentation:
          type: string
        underMaintenance:
          type: boolean
        deprecated:
          type: boolean
        supportedStandards:
          type: array
          description: '[]string'
          items:
            type: string
    YieldMechanics:
      type: object
      required:
        - type
        - rewardSchedule
        - rewardClaiming
        - gasFeeToken
      properties:
        type:
          type: string
        requiresValidatorSelection:
          type: boolean
        rewardSchedule:
          type: string
        rewardClaiming:
          type: string
        gasFeeToken:
          $ref: '#/components/schemas/YieldToken'
        lockupPeriod:
          $ref: '#/components/schemas/YieldTimePeriod'
        cooldownPeriod:
          $ref: '#/components/schemas/YieldTimePeriod'
        warmupPeriod:
          $ref: '#/components/schemas/YieldTimePeriod'
        fee:
          $ref: '#/components/schemas/YieldFee'
        entryLimits:
          $ref: '#/components/schemas/YieldEntryLimits'
        requirements:
          $ref: '#/components/schemas/YieldRequirements'
        supportsLedgerWalletApi:
          type: boolean
        extraTransactionFormatsSupported:
          type: array
          description: '[]string'
          items:
            type: string
        arguments:
          $ref: '#/components/schemas/YieldMechanicsArguments'
        possibleFeeTakingMechanisms:
          $ref: '#/components/schemas/YieldPossibleFeeTakingMechanisms'
    YieldCurator:
      type: object
      properties:
        name:
          type: object
        description:
          type: object
        logoURI:
          type: object
    YieldState:
      type: object
      properties:
        pricePerShareState:
          $ref: '#/components/schemas/YieldPricePerShareState'
        concentratedLiquidityPoolState:
          $ref: '#/components/schemas/YieldConcentratedLiquidityPoolState'
        capacityState:
          $ref: '#/components/schemas/YieldCapacity'
        liquidityState:
          $ref: '#/components/schemas/YieldLiquidityState'
        allocations:
          type: array
          description: '[]YieldAllocation'
          items:
            $ref: '#/components/schemas/YieldAllocation'
    YieldReward:
      type: object
      required:
        - rate
        - rateType
        - token
        - yieldSource
      properties:
        rate:
          type: number
        rateType:
          type: string
        token:
          $ref: '#/components/schemas/YieldToken'
        yieldSource:
          type: string
        description:
          type: string
    YieldRiskEntry:
      type: object
      required:
        - rating
        - source
      properties:
        rating:
          type: string
        source:
          type: string
    YieldTimePeriod:
      type: object
      required:
        - seconds
      properties:
        seconds:
          type: number
    YieldFee:
      type: object
      properties:
        deposit:
          type: string
        withdrawal:
          type: string
        management:
          type: string
        performance:
          type: string
    YieldEntryLimits:
      type: object
      properties:
        minimum:
          type: string
        maximum:
          type: string
    YieldRequirements:
      type: object
      required:
        - kycRequired
      properties:
        kycRequired:
          type: boolean
        kycUrl:
          type: string
    YieldMechanicsArguments:
      type: object
      properties:
        enter:
          $ref: '#/components/schemas/YieldArgumentSchema'
        exit:
          $ref: '#/components/schemas/YieldArgumentSchema'
        manage:
          type: object
          description: map<string,YieldArgumentSchema>
          additionalProperties:
            $ref: '#/components/schemas/YieldArgumentSchema'
        balance:
          $ref: '#/components/schemas/YieldArgumentSchema'
    YieldPossibleFeeTakingMechanisms:
      type: object
      required:
        - depositFee
        - managementFee
        - performanceFee
        - validatorRebates
      properties:
        depositFee:
          type: boolean
        managementFee:
          type: boolean
        performanceFee:
          type: boolean
        validatorRebates:
          type: boolean
    YieldPricePerShareState:
      type: object
      required:
        - price
        - shareToken
        - quoteToken
      properties:
        price:
          type: number
        shareToken:
          $ref: '#/components/schemas/YieldToken'
        quoteToken:
          $ref: '#/components/schemas/YieldToken'
    YieldConcentratedLiquidityPoolState:
      type: object
      required:
        - baseApr
        - price
        - tickSpacing
        - minTick
        - maxTick
        - feeTier
        - baseToken
        - quoteToken
      properties:
        baseApr:
          type: number
        price:
          type: number
        tickSpacing:
          type: number
        minTick:
          type: number
        maxTick:
          type: number
        volume24hUsd:
          type: number
        fee24hUsd:
          type: number
        tvlUsd:
          type: number
        feeTier:
          type: number
        baseToken:
          $ref: '#/components/schemas/YieldToken'
        quoteToken:
          $ref: '#/components/schemas/YieldToken'
    YieldCapacity:
      type: object
      required:
        - current
      properties:
        current:
          type: string
        max:
          type: string
        remaining:
          type: string
    YieldLiquidityState:
      type: object
      properties:
        liquidity:
          type: object
        utilization:
          type: object
    YieldAllocation:
      type: object
      required:
        - address
        - network
        - name
        - allocation
        - weight
        - targetWeight
      properties:
        address:
          type: string
        network:
          type: string
        name:
          type: string
        yieldId:
          type: string
        providerId:
          type: string
        allocation:
          type: string
        allocationUsd:
          type: string
        weight:
          type: number
        targetWeight:
          type: number
        rewardRate:
          $ref: '#/components/schemas/YieldAllocationRewardRate'
        tvl:
          type: string
        tvlUsd:
          type: string
        maxCapacity:
          type: string
        remainingCapacity:
          type: string
    YieldArgumentSchema:
      type: object
      required:
        - fields
      properties:
        fields:
          type: array
          description: '[]YieldArgumentField'
          items:
            $ref: '#/components/schemas/YieldArgumentField'
        notes:
          type: string
    YieldAllocationRewardRate:
      type: object
      required:
        - total
        - rateType
      properties:
        total:
          type: number
        rateType:
          type: string
    YieldArgumentField:
      type: object
      required:
        - name
        - type
        - label
      properties:
        name:
          type: string
        type:
          type: string
        label:
          type: string
        description:
          type: string
        required:
          type: boolean
        options:
          type: array
          description: '[]string'
          items:
            type: string
        optionsRef:
          type: string
        default:
          type: object
        placeholder:
          type: string
        minimum:
          type: string
        maximum:
          type: string
        isArray:
          type: boolean

````