> ## 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.

# Wholesale Credit Financials

> Interest paid and accrued by borrowers and credit losses on each wholesale credit line, in USD. Each series is one credit line token, keyed by protocol, chain, credit line, token and recognition basis (realized or accrued).

One row per wholesale credit financial, keyed by protocol, chain, credit line, token and recognition basis: the parent protocol and product, chain, token and the mapped protocol, project and network records. The id is the series key of the wholesale-credit-financials timeseries model.

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

## Endpoints

> [card] [List Wholesale Credit Financials](https://docs.blockworks.com/api-reference/data-api/wholesale-credit/tabular-wholesale-credit-financials.md)
>
> One page of rows with per-column filters, sorting and pagination.

> [card] [Batch Get Wholesale Credit Financial timeseries](https://docs.blockworks.com/api-reference/data-api/wholesale-credit/timeseries-wholesale-credit-financials.md)
>
> Up to 10 series in one request, named by Wholesale Credit Financial ID in `series`.

> [card] [Get Wholesale Credit Financial timeseries](https://docs.blockworks.com/api-reference/data-api/wholesale-credit/timeseries-wholesale-credit-financials-by-id.md)
>
> One series over a time window, keyed by its Wholesale Credit Financial ID.

## Metrics

3 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 | | Gross interest paid by the borrower in USD. |
| `creditLossUSD` | Credit Loss (USD) | float64 | | Credit losses in USD. |
| `grossInterestAccruedUSD` | Gross Interest Accrued (USD) | float64 | | Gross interest accrued in USD. |

## 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 wholesale-credit-financials timeseries model, the parent slug, chain, credit line id, token address and recognition basis, joined with underscores. (primary key) |
| `name` | string | `Eq`, `IsOneOf`, `Contains` | default | The display name of the series, the credit line name, token symbol and recognition basis. |
| `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. |
| `productSlug` | string | `Eq`, `IsOneOf` | | The product or version within the parent protocol. |
| `chain` | string | `Eq`, `IsOneOf` | | The short name of the chain (ethereum, base, solana). |
| `creditLineID` | string | `Eq`, `IsOneOf` | | The wholesale credit line's identifier. |
| `tokenAddress` | string | `Eq`, `IsOneOf` | | The token contract address (the mint address on Solana); null when unlabeled. |
| `recognitionBasis` | string | `Eq`, `IsOneOf` | | How the amount is recognized, for example realized or accrued. |
| `creditLineName` | string | `Eq`, `IsOneOf`, `Contains` | | The wholesale credit line's display name. |
| `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; null when unmapped. |
| `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/wholesale-credit-financials/1d/<id>?timeframe=7d&selections=grossInterestUSD,creditLossUSD" \
  -H "X-Blockworks-API-Key: $BLOCKWORKS_API_KEY"
```

See [Get Wholesale Credit Financial timeseries](https://docs.blockworks.com/api-reference/data-api/wholesale-credit/timeseries-wholesale-credit-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.