> For the complete documentation index, see [llms.txt](https://docs.yifi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yifi.io/docs/earn/core-concepts/strategy.md).

# Strategy

The executable, human-readable yield product built on top of one or more markets.

A strategy is what a user actually deposits into. It's the human-readable, executable layer on top of one or more [markets](/docs/earn/core-concepts/market.md) – carrying everything a market doesn't: input/output tokens, a risk rating, fees, deposit limits, and a routing path to execute.

`GET /strategies` is the primary discovery endpoint for a yield UI – filter it the way you'd filter a product catalog: by chain, category, token, TVL, or APR.

### Fields

#### Classification and tokens

* **`category_ids[]`**, **`chain_ids[]`** – see [Market → Category](/docs/earn/core-concepts/market.md#category).
* **`input_tokens[]`** – what a user can deposit with.&#x20;
* **`output_tokens[]`** – what the user ends up holding: the protocol's own receipt token (an aToken, a vault share, an LP token).

#### Rate and risk

* **`metrics.annual_rate`**, **`rate_format`**, **`yield_type`**, **`metrics.tvl_usd`** – same shape as on a market; see [Market → Rate](https://claude.ai/chat/market.md#rate).
* **`risk`** – a risk rating from `GET /risks`:

| `risk_score` | Name   | Meaning                                                                                |
| ------------ | ------ | -------------------------------------------------------------------------------------- |
| 1            | Low    | Blue-chip protocol, $100M+ TVL, multiple independent audits                            |
| 2            | Medium | Established protocol with limited smart-contract risk, or complex multi-step mechanics |
| 3            | High   | Significant liquidation, impermanent-loss, or leverage risk – use with caution         |

#### Fees and limits

* **`fee_breakdown`** – `total_fee`, `yifi_fee`, `partner_fee`, each a percent string.&#x20;
* **`limits`** – `min_deposit_usd`, `max_deposit_usd`, and two independent flags: `deposits_paused` and `withdrawals_paused`. Check these before showing a deposit button – a strategy can have deposits paused while withdrawals stay open (or vice versa), independent of the top-level `status`.

#### Execution

* **`routing_engine`** – which execution provider a zap into this strategy uses. See [Architecture Overview](/docs/earn/getting-started/architecture-overview.md).
* **`execution_config`** – the resolved `input_token_ids[]` / `output_token_ids[]`.
* **`market_ids[]`** – the underlying [market(s)](/docs/earn/core-concepts/market.md) this strategy wraps.
* **`platforms[]`** – the protocol(s) behind those markets, with `platform_id`, `platform_name`, and the chains each operates on.

### Historical data

For APR/TVL history instead of a snapshot, use `GET /strategies/{strategy_id}/history` – up to a year of daily points. Handy for a yield chart on a strategy detail page.

### Example – `GET /strategies/{strategy_id}`

```json
{
  "success": true,
  "data": {
    "strategy_id": "eth-eth-lending-aave",
    "name": "ETH Lending on Aave v3",
    "description": "Supply ETH on Aave v3 and earn variable lending yield",
    "yield_type": "floating",
    "rate_format": "apy",
    "status": "active",
    "routing_engine": "portals",
    "category_ids": ["lending"],
    "input_tokens": [
      { "token_id": "ethereum:0x0000000000000000000000000000000000000000", "symbol": "ETH", "decimals": 18, "price_usd": "3200.00" }
    ],
    "output_tokens": [
      { "token_id": "ethereum:0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8", "symbol": "aWETH", "decimals": 18, "price_usd": "3201.20" }
    ],
    "metrics": { "annual_rate": "3.84", "tvl_usd": "1842000000", "timestamp": "2026-05-07T10:00:00Z" },
    "risk": { "risk_score": 1, "name": "Low", "description": "Battle-tested protocol with $1B+ TVL and multiple audits" },
    "fee_breakdown": { "total_fee": "0.60", "yifi_fee": "0.30", "partner_fee": "0.30" },
    "limits": { "min_deposit_usd": "100", "max_deposit_usd": "10000000", "deposits_paused": false, "withdrawals_paused": false },
    "market_ids": ["ethereum:0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8"],
    "platforms": [{ "platform_id": "aave-v3", "platform_name": "Aave v3", "chain_ids": ["ethereum"] }]
  },
  "error": null
}
```

### Try querying Strategy yourself!

## List strategies

> Get paginated strategies with filters.

```json
{"openapi":"3.1.1","info":{"title":"YiFi Yield Aggregator – Data Gateway API","version":"v1"},"tags":[{"description":"Strategies – list, details by strategyId (future extension)","name":"Strategies"}],"servers":[{"url":"https://core-dev.yifi.io/api/v1"}],"security":[{"BearerToken":[]},{"PartnerApiKey":[]}],"components":{"securitySchemes":{"BearerToken":{"description":"Admin key for privileged operations (create/edit/delete).","type":"apiKey","name":"Authorization","in":"header"},"PartnerApiKey":{"description":"Partner API key used for B2B attribution (wallets, platforms). Requests authenticated with this key are attributed to the owning partner.","type":"apiKey","name":"X-Partner-Api-Key","in":"header"}},"schemas":{"rest.Response":{"type":"object","properties":{"code":{"type":"string"},"data":{},"isError":{"type":"boolean"},"message":{"type":"string"},"success":{"type":"boolean"}}},"common.Pagination-core_StrategiesResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/core.StrategiesResponse"}},"page":{"$ref":"#/components/schemas/common.Page"}}},"core.StrategiesResponse":{"type":"object","properties":{"category_ids":{"type":"array","items":{"type":"string"}},"chain_ids":{"type":"array","items":{"$ref":"#/components/schemas/common.Chain"}},"description":{"type":"string"},"input_tokens":{"type":"array","items":{"$ref":"#/components/schemas/common.TokenAddress"}},"metrics":{"$ref":"#/components/schemas/core.Metrics"},"name":{"type":"string"},"output_tokens":{"type":"array","items":{"$ref":"#/components/schemas/common.TokenAddress"}},"risk":{"description":"upd (new)","allOf":[{"$ref":"#/components/schemas/common.Risk"}]},"status":{"type":"string"},"strategy_id":{"type":"string"},"updated_at":{"type":"integer"}}},"common.Chain":{"type":"object","properties":{"chain_id":{"description":"e.g.: \"ethereum\"","type":"string"},"ecosystem":{"type":"string"},"explorer_url":{"type":"string"},"image_url":{"type":"string"}}},"common.TokenAddress":{"type":"object","properties":{"address":{"type":"string"},"chain":{"type":"string"},"decimals":{"type":"integer"},"logo_url":{"description":"new","type":"string"},"price_usd":{"type":"string"},"role":{"type":"string"},"symbol":{"type":"string"},"token_id":{"type":"string"}}},"core.Metrics":{"type":"object","properties":{"annual_rate":{"description":"out of meta summin up all []meta metrics","type":"string"},"timestamp":{"description":"Meta      common.Meta `json:\"meta,omitempty\"` // временно забиваем // won't be shown on getStrategies()","type":"string"},"tvl_usd":{"type":"string"}}},"common.Risk":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"risk_score":{"type":"integer"}}},"common.Page":{"type":"object","properties":{"currentPage":{"description":"page-based pagination","type":"integer"},"id":{"description":"keyset-based pagination","type":"string"},"limit":{"description":"common","type":"integer"},"nextCursor":{"type":"string"},"offset":{"description":"offset-based pagination","type":"integer"},"pageSize":{"type":"integer"},"prevCursor":{"description":"cursor-based pagination","type":"string"},"totalItems":{"type":"integer"},"totalPages":{"type":"integer"},"type":{"type":"string"}}},"core.Msg":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/strategies":{"get":{"description":"Get paginated strategies with filters.","tags":["Strategies"],"summary":"List strategies","parameters":[{"schema":{"type":"string"},"description":"search","name":"search","in":"query"},{"schema":{"type":"string"},"description":"strategy ids","name":"ids","in":"query"},{"schema":{"type":"string"},"description":"status","name":"status","in":"query"},{"schema":{"type":"string"},"description":"group","name":"group","in":"query"},{"schema":{"type":"string"},"description":"category ids comma separated","name":"category_ids","in":"query"},{"schema":{"type":"string"},"description":"chain ids comma separated","name":"chain_ids","in":"query"},{"schema":{"type":"string"},"description":"token ids comma separated","name":"token_ids","in":"query"},{"schema":{"type":"string"},"description":"platform ids comma separated","name":"platform_ids","in":"query"},{"schema":{"type":"string"},"description":"min tvl usd","name":"minTvlUsd","in":"query"},{"schema":{"type":"string"},"description":"max tvl usd","name":"maxTvlUsd","in":"query"},{"schema":{"type":"string"},"description":"min apr","name":"minApr","in":"query"},{"schema":{"type":"string"},"description":"max apr","name":"maxApr","in":"query"},{"schema":{"type":"string"},"description":"updatedAt|createdAt|apr|apy|tvlUsd","name":"sortBy","in":"query"},{"schema":{"type":"string"},"description":"asc|desc","name":"sortDirection","in":"query"},{"schema":{"type":"integer"},"description":"limit","name":"limit","in":"query"},{"schema":{"type":"integer"},"description":"offset","name":"offset","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/rest.Response"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/common.Pagination-core_StrategiesResponse"}}}]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core.Msg"}}}}}}}}}
```

## Get strategy

> Get strategy by id.

```json
{"openapi":"3.1.1","info":{"title":"YiFi Yield Aggregator – Data Gateway API","version":"v1"},"tags":[{"description":"Strategies – list, details by strategyId (future extension)","name":"Strategies"}],"servers":[{"url":"https://core-dev.yifi.io/api/v1"}],"security":[{"BearerToken":[]},{"PartnerApiKey":[]}],"components":{"securitySchemes":{"BearerToken":{"description":"Admin key for privileged operations (create/edit/delete).","type":"apiKey","name":"Authorization","in":"header"},"PartnerApiKey":{"description":"Partner API key used for B2B attribution (wallets, platforms). Requests authenticated with this key are attributed to the owning partner.","type":"apiKey","name":"X-Partner-Api-Key","in":"header"}},"schemas":{"rest.Response":{"type":"object","properties":{"code":{"type":"string"},"data":{},"isError":{"type":"boolean"},"message":{"type":"string"},"success":{"type":"boolean"}}},"core.StrategyResponse":{"type":"object","properties":{"category_ids":{"type":"array","items":{"type":"string"}},"chain_ids":{"description":"upd","type":"array","items":{"$ref":"#/components/schemas/common.Chain"}},"created_at":{"type":"integer"},"description":{"type":"string"},"execution_config":{"$ref":"#/components/schemas/core.ExecutionConfig"},"fee_breakdown":{"$ref":"#/components/schemas/core.Fees"},"input_tokens":{"type":"array","items":{"$ref":"#/components/schemas/common.TokenAddress"}},"limits":{"$ref":"#/components/schemas/core.Limits"},"metrics":{"$ref":"#/components/schemas/core.Metrics"},"name":{"type":"string"},"output_tokens":{"type":"array","items":{"$ref":"#/components/schemas/common.TokenAddress"}},"platforms":{"description":"upd (new)","type":"array","items":{"$ref":"#/components/schemas/common.Platform"}},"rate_format":{"type":"string"},"risk":{"description":"upd (new)","allOf":[{"$ref":"#/components/schemas/common.Risk"}]},"routing_engine":{"type":"string"},"status":{"type":"string"},"strategy_id":{"type":"string"},"updated_at":{"type":"integer"},"yield_type":{"type":"string"}}},"common.Chain":{"type":"object","properties":{"chain_id":{"description":"e.g.: \"ethereum\"","type":"string"},"ecosystem":{"type":"string"},"explorer_url":{"type":"string"},"image_url":{"type":"string"}}},"core.ExecutionConfig":{"type":"object","properties":{"input_token_ids":{"type":"array","items":{"type":"string"}},"output_token_ids":{"type":"array","items":{"type":"string"}}}},"core.Fees":{"type":"object","properties":{"max_fee":{"description":"maximum possible fee","type":"string"},"partner_fee":{"type":"string"},"total_fee":{"type":"string"},"yifi_fee":{"type":"string"}}},"common.TokenAddress":{"type":"object","properties":{"address":{"type":"string"},"chain":{"type":"string"},"decimals":{"type":"integer"},"logo_url":{"description":"new","type":"string"},"price_usd":{"type":"string"},"role":{"type":"string"},"symbol":{"type":"string"},"token_id":{"type":"string"}}},"core.Limits":{"type":"object","properties":{"deposits_paused":{"type":"boolean"},"withdrawals_paused":{"type":"boolean"}}},"core.Metrics":{"type":"object","properties":{"annual_rate":{"description":"out of meta summin up all []meta metrics","type":"string"},"timestamp":{"description":"Meta      common.Meta `json:\"meta,omitempty\"` // временно забиваем // won't be shown on getStrategies()","type":"string"},"tvl_usd":{"type":"string"}}},"common.Platform":{"type":"object","properties":{"category_ids":{"type":"array","items":{"type":"string"}},"chain_ids":{"description":"\"ethereum\"","type":"array","items":{"type":"string"}},"image":{"type":"string"},"platform_id":{"description":"\"gyroscope\"","type":"string"},"platform_name":{"description":"\"Gyroscope\"","type":"string"}}},"common.Risk":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"risk_score":{"type":"integer"}}},"core.Msg":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/strategies/{strategy_id}":{"get":{"description":"Get strategy by id.","tags":["Strategies"],"summary":"Get strategy","parameters":[{"schema":{"type":"string"},"description":"strategy id","name":"strategy_id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/rest.Response"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/core.StrategyResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core.Msg"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core.Msg"}}}}}}}}}
```

## Strategy history

> Get strategy history metrics for period.

```json
{"openapi":"3.1.1","info":{"title":"YiFi Yield Aggregator – Data Gateway API","version":"v1"},"tags":[{"description":"Strategies – list, details by strategyId (future extension)","name":"Strategies"}],"servers":[{"url":"https://core-dev.yifi.io/api/v1"}],"security":[{"BearerToken":[]},{"PartnerApiKey":[]}],"components":{"securitySchemes":{"BearerToken":{"description":"Admin key for privileged operations (create/edit/delete).","type":"apiKey","name":"Authorization","in":"header"},"PartnerApiKey":{"description":"Partner API key used for B2B attribution (wallets, platforms). Requests authenticated with this key are attributed to the owning partner.","type":"apiKey","name":"X-Partner-Api-Key","in":"header"}},"schemas":{"rest.Response":{"type":"object","properties":{"code":{"type":"string"},"data":{},"isError":{"type":"boolean"},"message":{"type":"string"},"success":{"type":"boolean"}}},"core.StrategyHistoryResponse":{"type":"object","properties":{"history":{"type":"array","items":{"$ref":"#/components/schemas/core.Metrics"}},"rate_format":{"type":"string"},"strategy_id":{"description":"key in portals","type":"string"},"yield_type":{"type":"string"}}},"core.Metrics":{"type":"object","properties":{"annual_rate":{"description":"out of meta summin up all []meta metrics","type":"string"},"timestamp":{"description":"Meta      common.Meta `json:\"meta,omitempty\"` // временно забиваем // won't be shown on getStrategies()","type":"string"},"tvl_usd":{"type":"string"}}},"core.Msg":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/strategies/{strategy_id}/history":{"get":{"description":"Get strategy history metrics for period.","tags":["Strategies"],"summary":"Strategy history","parameters":[{"schema":{"type":"string"},"description":"strategy id","name":"strategy_id","in":"path","required":true},{"schema":{"type":"string"},"description":"start time RFC3339","name":"from","in":"query"},{"schema":{"type":"string"},"description":"end time RFC3339","name":"to","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/rest.Response"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/core.StrategyHistoryResponse"}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core.Msg"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core.Msg"}}}}}}}}}
```

### Relationship to Market and Position

A strategy references one or more [markets](/docs/earn/core-concepts/market.md) by `market_id` and adds the execution and business layer on top. Once a user deposits into a strategy, that deposit becomes a position – tracked by wallet address, independent of the strategy's own listing.
