> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CDP Market Financials

> Daily interest (stability fees), liquidation penalties, flash loan fees, fees and revenue in USD for one token in one collateralized debt position (CDP) market. Each gross amount splits into the share paid on and the share the protocol keeps; fees sum the gross amounts and revenue the kept shares. Each series is one market token, keyed by protocol, product, chain, market and token. Sky MCD vaults so far. Many series per market, so name the series you need.

One row per token in a CDP market, keyed by protocol, product, chain, market and token: the market and token, the parent protocol and product, chain and the mapped protocol, project and network records. The id is the series key of the cdp-market-financials timeseries model.

| | |
| - | - |
| Access | Lending-protocols-dataset |
| Tabular model | `cdp-market-financials`: primary key `id` |
| Timeseries model | `cdp-market-financials`: intervals `1d`, series key `id` (CDP Market Financial ID), series must be named (up to 10 per call) |

## Endpoints

> [card] [List CDP Market Tokens](https://docs.blockworks.com/api-reference/data-api/collateralized-debt-positions-cdps/tabular-cdp-market-financials.md)
>
> One page of rows with per-column filters, sorting and pagination.

> [card] [Batch Get CDP Market Financial timeseries](https://docs.blockworks.com/api-reference/data-api/collateralized-debt-positions-cdps/timeseries-cdp-market-financials.md)
>
> Up to 10 series in one request, named by CDP Market Financial ID in `series`.

> [card] [Get CDP Market Financial timeseries](https://docs.blockworks.com/api-reference/data-api/collateralized-debt-positions-cdps/timeseries-cdp-market-financials-by-id.md)
>
> One series over a time window, keyed by its CDP Market Financial ID.

## Metrics

13 metrics. Use the `Field` value in `selections`; every point starts with the timestamp and continues in this order.

| Field | Name | Type | Unit | Description |
| - | - | - | - | - |
| `grossInterestUSD` | Gross Interest (USD) | float64 | | Interest (stability fees) paid by borrowers in USD. |
| `netInterestUSD` | Net Interest (USD) | float64 | | Share of gross interest passed on to lenders in USD (0 for Sky). |
| `treasuryInterestUSD` | Treasury Interest (USD) | float64 | | Share of gross interest kept by the protocol treasury in USD. |
| `grossInterestAccruedUSD` | Gross Interest Accrued (USD) | float64 | | Gross interest accrued but not yet collected in USD. |
| `treasuryInterestAccruedUSD` | Treasury Interest Accrued (USD) | float64 | | Treasury interest accrued but not yet collected in USD. |
| `liquidationFeesGrossUSD` | Gross Liquidation Fees (USD) | float64 | | Liquidation penalty paid by liquidated borrowers in USD. |
| `liquidationFeesNetUSD` | Net Liquidation Fees (USD) | float64 | | Share of the liquidation penalty paid on to keepers in USD. |
| `liquidationFeeRevenueUSD` | Liquidation Fee Revenue (USD) | float64 | | Share of the liquidation penalty kept by the protocol in USD. |
| `flashLoanFeesGrossUSD` | Gross Flash Loan Fees (USD) | float64 | | Flash loan fees paid in USD. |
| `flashLoanFeesNetUSD` | Net Flash Loan Fees (USD) | float64 | | Share of flash loan fees paid on in USD. |
| `flashLoanFeeRevenueUSD` | Flash Loan Fee Revenue (USD) | float64 | | Share of flash loan fees kept by the protocol in USD. |
| `feesUSD` | Fees (USD) | float64 | | Total fees in USD, gross interest plus gross liquidation and flash loan fees. |
| `revenueUSD` | Revenue (USD) | float64 | | Protocol revenue in USD, treasury interest plus liquidation and flash loan fee revenue. |

## Columns

Use the `Field` value in `selections`, `sortBy`, and as the base of a filter parameter (`Field` plus one of its `Filters` suffixes).

| Field | Type | Filters | Sort | Description |
| - | - | - | - | - |
| `id` | string | `Eq`, `IsOneOf` | | The series key of the cdp-market-financials timeseries model, the parent slug, product slug, chain, market key and token key, joined with underscores. (primary key) |
| `name` | string | `Eq`, `IsOneOf`, `Contains` | default | The display name of the series, the market name and token symbol. |
| `slug` | string | `Eq`, `IsOneOf` | yes | The parent protocol's project slug, the slug used for the same protocol across the API. |
| `parentSlug` | string | `Eq`, `IsOneOf` | yes | The parent protocol's short name, for example sky. |
| `productSlug` | string | `Eq`, `IsOneOf` | | The product or version within the parent protocol (sky-mcd-vaults). |
| `chain` | string | `Eq`, `IsOneOf` | | The short name of the chain the market lives on (ethereum, bnb, solana). |
| `marketID` | string | `Eq`, `IsOneOf` | | The market or pool address; null when the protocol does not label markets. |
| `marketName` | string | `Eq`, `IsOneOf`, `Contains` | | The market display name (for Sky, the vault ilk such as ETH-A). |
| `marketType` | string | `Eq`, `IsOneOf` | | The market type where the protocol distinguishes one (for example vault, lp or lockstake); null otherwise. |
| `tokenAddress` | string | `Eq`, `IsOneOf` | | The token contract address (the mint address on Solana); null when unlabeled. |
| `tokenSymbol` | string | `Eq`, `IsOneOf`, `Contains` | yes | The token's ticker symbol. |
| `protocolSlug` | string | `Eq`, `IsOneOf` | | The slug of the protocol record mapped to the product; null when unmapped. |
| `protocolName` | string | `Eq`, `IsOneOf` | | The name of the protocol record mapped to the product; null when unmapped. |
| `projectID` | string | `Eq`, `IsOneOf` | | The identifier of the parent protocol's project record. |
| `networkID` | string | `Eq`, `IsOneOf` | | The chain's networkID in the blockchains model; null when unmapped. |

## Example

```bash curl theme={null}
curl "https://api.blockworks.com/query/timeseries/cdp-market-financials/1d/<id>?timeframe=7d&selections=grossInterestUSD,netInterestUSD" \
  -H "X-Blockworks-API-Key: $BLOCKWORKS_API_KEY"
```

See [Get CDP Market Financial timeseries](https://docs.blockworks.com/api-reference/data-api/collateralized-debt-positions-cdps/timeseries-cdp-market-financials-by-id.md) for the response and the errors.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.