> For the complete documentation index, see [llms.txt](https://gitbook-docs.coinmetrics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook-docs.coinmetrics.io/cm-api-spec/timeseries/timeseries-rest/defi-balance-sheets-experimental.md).

# DeFi balance sheets (experimental)

Returns Defi Balance Sheet records for specified DeFi protocols.\
The data is being updated on an end-of-day frequency.\
Results are ordered by tuple (`defi_protocol`, `block_height`).\
To fetch the next page of results use the `next_page_url` JSON response field.

```json
{"openapi":"3.0.2","info":{"title":"Coin Metrics API v4","version":"4.0.0"},"tags":[{"name":"Timeseries REST","description":"Endpoints for fetching metrics, market data, indexes and other time series data.\n\n**Endpoints on this page:**\n- `GET /timeseries/asset-alerts` — Asset alerts (deprecated)\n- `GET /timeseries/asset-chains` — Asset chains (experimental)\n- `GET /timeseries/asset-metrics` — Asset metrics\n- `GET /timeseries/defi-balance-sheets` — DeFi balance sheets (experimental)\n- `GET /timeseries/exchange-asset-metrics` — Exchange-asset metrics\n- `GET /timeseries/exchange-metrics` — Exchange metrics\n- `GET /timeseries/exchange-pair-metrics` — Exchange-pair metrics\n- `GET /timeseries/index-candles` — Index candles\n- `GET /timeseries/index-constituents` — Index constituents\n- `GET /timeseries/index-levels` — Index levels\n- `GET /timeseries/institution-metrics` — Institution metrics\n- `GET /timeseries/market-candles` — Market candles\n- `GET /timeseries/market-contract-prices` — Market contract prices\n- `GET /timeseries/market-funding-rates` — Market funding rates\n- `GET /timeseries/market-funding-rates-predicted` — Predicted Market funding rates\n- `GET /timeseries/market-greeks` — Market greeks\n- `GET /timeseries/market-implied-volatility` — Market implied volatility\n- `GET /timeseries/market-liquidations` — Market liquidations\n- `GET /timeseries/market-metrics` — Market metrics\n- `GET /timeseries/market-openinterest` — Market open interest\n- `GET /timeseries/market-orderbooks` — Market orderbooks\n- `GET /timeseries/market-quotes` — Market quotes\n- `GET /timeseries/market-trades` — Market trades\n- `GET /timeseries/mempool-feerates` — Mempool feerates (deprecated)\n- `GET /timeseries/mining-pool-tips-summary` — Mining pool tips summary (experimental)\n- `GET /timeseries/pair-candles` — Pair candles\n- `GET /timeseries/pair-metrics` — Pair metrics\n- `GET /timeseries/protocol-metrics` — Protocol metrics"}],"servers":[{"url":"https://api.coinmetrics.io/v4"},{"url":"wss://api.coinmetrics.io/v4"},{"url":"https://community-api.coinmetrics.io/v4"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"description":"Coin Metrics API key can be specified as `?api_key=` query parameter.","in":"query","name":"api_key","type":"apiKey"}},"parameters":{"DefiProtocols":{"description":"Comma separated list of DeFi protocols like `aave_v2_eth` or protocol patterns like `aave_v2_*` or `aave_*_eth` or `*_eth`.","in":"query","name":"defi_protocols","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},"StartTimeMutuallyExclusiveWithHeight":{"description":"Start of the time interval.<br/> This field refers to the `time` field in the response.<br/> Multiple formats of ISO 8601 are supported: `2006-01-20T00:00:00Z`, `2006-01-20T00:00:00.000Z`, `2006-01-20T00:00:00.123456Z`, `2006-01-20T00:00:00.123456789Z`, `2006-01-20`, `20060120`.<br/> Inclusive by default. Mutually exclusive with `start_height`.<br/> UTC timezone by default. `Z` suffix is optional and `timezone` parameter has a priority over it.<br/> If `start_time` is omitted, response will include time series from the **earliest** time available.","in":"query","name":"start_time","schema":{"type":"string"}},"EndTimeMutuallyExclusiveWithHeight":{"description":"End of the time interval.<br/> This field refers to the `time` field in the response.<br/> Multiple formats of ISO 8601 are supported: `2006-01-20T00:00:00Z`, `2006-01-20T00:00:00.000Z`, `2006-01-20T00:00:00.123456Z`, `2006-01-20T00:00:00.123456789Z`, `2006-01-20`, `20060120`.<br/> Inclusive by default. Mutually exclusive with `end_height`.<br/> UTC timezone by default. `Z` suffix is optional and `timezone` parameter has a priority over it.<br/> If `end_time` is omitted, response will include time series up to the **latest** time available.","in":"query","name":"end_time","schema":{"type":"string"}},"StartHeightMutuallyExclusiveWithTime":{"description":"The start height indicates the beginning block height for the set of data that are returned.<br/> Inclusive by default. Mutually exclusive with `start_time`.","in":"query","name":"start_height","schema":{"type":"integer","format":"int64","minimum":0}},"EndHeightMutuallyExclusiveWithTime":{"description":"The end height indicates the ending block height for the set of data that are returned.<br/> Inclusive by default. Mutually exclusive with `end_time`.","in":"query","name":"end_height","schema":{"type":"integer","format":"int64","minimum":0}},"StartInclusive":{"description":"Inclusive or exclusive corresponding `start_*` parameters.","in":"query","name":"start_inclusive","schema":{"default":true,"type":"boolean"}},"EndInclusive":{"description":"Inclusive or exclusive corresponding `end_*` parameters.","in":"query","name":"end_inclusive","schema":{"default":true,"type":"boolean"}},"Timezone":{"description":"Timezone name for `start_time` and `end_time` timestamps.<br/> This parameter does not modify the output times, which are always `UTC`.<br/> Format is defined by [TZ database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).","in":"query","name":"timezone","schema":{"default":"UTC","type":"string"}},"PageSize":{"description":"Number of items per single page of results.<br/> The value of this parameter is ignored if the endpoint supports the `format` parameter and its value is set to `json_stream`.","in":"query","name":"page_size","schema":{"default":100,"type":"integer","format":"int32","minimum":1,"maximum":10000}},"PagingFrom":{"description":"Where does the first page start, at the start of the interval or at the end.<br/> The value of this parameter is ignored if the endpoint supports the `format` parameter and its value is set to `json_stream`.","in":"query","name":"paging_from","schema":{"default":"end","enum":["start","end"],"type":"string","format":"PagingFrom"}},"Pretty":{"description":"Human-readable formatting of JSON responses.","in":"query","name":"pretty","schema":{"type":"boolean","default":false}},"Format":{"description":"Format of the response.","in":"query","name":"format","schema":{"enum":["json","csv"],"type":"string","default":"json"}},"NextPageToken":{"description":"Token for receiving the results from the next page of a query.<br/> Should not be used directly. To iterate through pages just use `next_page_url` response field.","in":"query","name":"next_page_token","schema":{"type":"string"}}},"responses":{"DefiBalanceSheets":{"description":"DeFi balance sheets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefiBalanceSheetsResponse"}}}},"DefiProtocolNotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"DeFi protocol not found."},"Unauthorized":{"description":"Requested resource requires authorization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Requested resource is not available with supplied credentials."},"UriTooLong":{"description":"Provided URI is too long. It must not be greater than 10000 symbols."}},"schemas":{"DefiBalanceSheetsResponse":{"description":"DeFi balance sheets response.","properties":{"data":{"$ref":"#/components/schemas/DefiBalanceSheets"},"next_page_token":{"$ref":"#/components/schemas/NextPageToken"},"next_page_url":{"$ref":"#/components/schemas/NextPageUrl"}},"required":["data"],"type":"object"},"DefiBalanceSheets":{"type":"array","items":{"$ref":"#/components/schemas/DefiBalanceSheet"}},"DefiBalanceSheet":{"properties":{"defi_protocol":{"$ref":"#/components/schemas/DefiProtocol"},"block_height":{"$ref":"#/components/schemas/DefiBalanceSheetBlockHeight"},"time":{"$ref":"#/components/schemas/DefiBalanceSheetTime"},"assets_total_usd":{"$ref":"#/components/schemas/DefiBalanceSheetAssetsTotalUsd"},"assets_total_count":{"$ref":"#/components/schemas/DefiBalanceSheetAssetsTotalCount"},"liabilities_total_usd":{"$ref":"#/components/schemas/DefiBalanceSheetLiabilitiesTotalUsd"},"liabilities_total_count":{"$ref":"#/components/schemas/DefiBalanceSheetLiabilitiesTotalCount"},"loans_lent_total_usd":{"$ref":"#/components/schemas/DefiBalanceSheetLoansLentTotalUsd"},"tvl_total_usd":{"$ref":"#/components/schemas/DefiBalanceSheetTvlTotalUsd"},"net_working_capital_usd":{"$ref":"#/components/schemas/DefiBalanceSheetNetWorkingCapitalUsd"},"protocol_utilization_ratio":{"$ref":"#/components/schemas/DefiBalanceSheetProtocolUtilizationRatio"},"liquid_supply_ratio":{"$ref":"#/components/schemas/DefiBalanceSheetLiquidSupplyRatio"},"current_ratio":{"$ref":"#/components/schemas/DefiBalanceSheetCurrentRatio"},"debt_to_assets_ratio":{"$ref":"#/components/schemas/DefiBalanceSheetDebtToAssetRatio"},"assets":{"$ref":"#/components/schemas/DefiBalanceSheetAssets"},"liabilities":{"$ref":"#/components/schemas/DefiBalanceSheetLiabilities"}},"required":["defi_protocol","block_height","time","assets_total_usd","assets_total_count","liabilities_total_usd","liabilities_total_count","loans_lent_total_usd","tvl_total_usd","net_working_capital_usd","assets","liabilities"]},"DefiProtocol":{"description":"DeFi protocol name (e.g. `aave_v2_eth` or `uniswap_v3_eth`).","type":"string"},"DefiBalanceSheetBlockHeight":{"description":"The block height at which this DeFi balance sheet is calculated.","type":"string","format":"int64"},"DefiBalanceSheetTime":{"description":"The time near or equal to the block creation time this DeFi balance sheet is calculated at. The time in ISO 8601 date-time format. Always with nanoseconds precision.","type":"string","format":"date-time"},"DefiBalanceSheetAssetsTotalUsd":{"description":"Total USD value of all assets in the DeFi balance sheet.","type":"string","format":"decimal"},"DefiBalanceSheetAssetsTotalCount":{"description":"Total count of all assets in the DeFi balance sheet.","type":"string","format":"int64"},"DefiBalanceSheetLiabilitiesTotalUsd":{"description":"Total USD value of all liabilities in the DeFi balance sheet.","type":"string","format":"decimal"},"DefiBalanceSheetLiabilitiesTotalCount":{"description":"Total count of all liabilities in the DeFi balance sheet.","type":"string","format":"int64"},"DefiBalanceSheetLoansLentTotalUsd":{"description":"Total USD value of loans lent in the DeFi balance sheet.","type":"string","format":"decimal"},"DefiBalanceSheetTvlTotalUsd":{"description":"Total USD value of TVL in the DeFi balance sheet.","type":"string","format":"decimal"},"DefiBalanceSheetNetWorkingCapitalUsd":{"description":"DeFi balance sheet net working capital USD value.","type":"string","format":"decimal"},"DefiBalanceSheetProtocolUtilizationRatio":{"description":"DeFi balance sheet protocol utilization ratio.","type":"string","format":"decimal"},"DefiBalanceSheetLiquidSupplyRatio":{"description":"DeFi balance sheet liquid supply ratio.","type":"string","format":"decimal"},"DefiBalanceSheetCurrentRatio":{"description":"DeFi balance sheet current ratio.","type":"string","format":"decimal"},"DefiBalanceSheetDebtToAssetRatio":{"description":"DeFi balance sheet debt to asset.","type":"string","format":"decimal"},"DefiBalanceSheetAssets":{"description":"DeFi balance sheet assets.","type":"array","items":{"$ref":"#/components/schemas/DefiBalanceSheetAssetItem"}},"DefiBalanceSheetAssetItem":{"description":"DeFi balance sheet asset item.","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"total_units":{"$ref":"#/components/schemas/DefiBalanceSheetItemBalanceUnits"},"loans_lent_units":{"$ref":"#/components/schemas/DefiBalanceSheetItemBalanceUnits"},"tvl_units":{"$ref":"#/components/schemas/DefiBalanceSheetItemBalanceUnits"},"total_usd":{"$ref":"#/components/schemas/DefiBalanceSheetItemBalanceUsd"},"loans_lent_usd":{"$ref":"#/components/schemas/DefiBalanceSheetItemBalanceUsd"},"tvl_usd":{"$ref":"#/components/schemas/DefiBalanceSheetItemBalanceUsd"},"total_share":{"$ref":"#/components/schemas/DefiBalanceSheetItemShare"},"loans_lent_share":{"$ref":"#/components/schemas/DefiBalanceSheetItemShare"},"tvl_share":{"$ref":"#/components/schemas/DefiBalanceSheetItemShare"}},"required":["asset","total_units"]},"Asset":{"description":"Name of the asset.","type":"string"},"DefiBalanceSheetItemBalanceUnits":{"description":"Balance units value.","type":"string","format":"decimal"},"DefiBalanceSheetItemBalanceUsd":{"description":"Balance USD value.","type":"string","format":"decimal"},"DefiBalanceSheetItemShare":{"description":"The percentage that this item represents relative to the total value.","type":"string","format":"decimal"},"DefiBalanceSheetLiabilities":{"description":"DeFi balance sheet liabilities.","type":"array","items":{"$ref":"#/components/schemas/DefiBalanceSheetLiabilityItem"}},"DefiBalanceSheetLiabilityItem":{"description":"DeFi balance sheet liability item.","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"total_units":{"$ref":"#/components/schemas/DefiBalanceSheetItemBalanceUnits"},"total_usd":{"$ref":"#/components/schemas/DefiBalanceSheetItemBalanceUsd"},"total_share":{"$ref":"#/components/schemas/DefiBalanceSheetItemShare"}},"required":["asset","total_units"]},"NextPageToken":{"description":"Token of the next page results for a given request.","type":"string"},"NextPageUrl":{"description":"URL of the next page results for a given request.","type":"string"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorObject"}},"required":["error"],"type":"object"},"ErrorObject":{"properties":{"type":{"description":"Error type string. Can be used for error identification.","type":"string"},"message":{"description":"Human-friendly error description. Can be amended without prior notification. Do not use for error identification in your code.","type":"string"}},"required":["type","description"],"type":"object"}}},"paths":{"/timeseries/defi-balance-sheets":{"get":{"summary":"DeFi balance sheets (experimental)","description":"Returns Defi Balance Sheet records for specified DeFi protocols.</br> The data is being updated on an end-of-day frequency.</br> Results are ordered by tuple (`defi_protocol`, `block_height`).</br> To fetch the next page of results use the `next_page_url` JSON response field.","operationId":"getDefiBalanceSheets","tags":["Timeseries REST"],"parameters":[{"$ref":"#/components/parameters/DefiProtocols"},{"$ref":"#/components/parameters/StartTimeMutuallyExclusiveWithHeight"},{"$ref":"#/components/parameters/EndTimeMutuallyExclusiveWithHeight"},{"$ref":"#/components/parameters/StartHeightMutuallyExclusiveWithTime"},{"$ref":"#/components/parameters/EndHeightMutuallyExclusiveWithTime"},{"$ref":"#/components/parameters/StartInclusive"},{"$ref":"#/components/parameters/EndInclusive"},{"$ref":"#/components/parameters/Timezone"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PagingFrom"},{"$ref":"#/components/parameters/Pretty"},{"$ref":"#/components/parameters/Format"},{"$ref":"#/components/parameters/NextPageToken"}],"responses":{"200":{"$ref":"#/components/responses/DefiBalanceSheets"},"400":{"$ref":"#/components/responses/DefiProtocolNotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"414":{"$ref":"#/components/responses/UriTooLong"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook-docs.coinmetrics.io/cm-api-spec/timeseries/timeseries-rest/defi-balance-sheets-experimental.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
