> For the complete documentation index, see [llms.txt](https://noodles-finance.gitbook.io/docs.noodles.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://noodles-finance.gitbook.io/docs.noodles.fi/lending/lending-chart.md).

# Lending Detail Chart

Retrieve historical time-series data for lending pool metrics including deposits, borrows, APRs, and utilization rates.

***

## Endpoint

```
GET /api/v1/partner/pool/lending/chart
```

## Request Parameters

| Name        | Type   | Required | Description                                                                               |
| ----------- | ------ | -------- | ----------------------------------------------------------------------------------------- |
| `coin_type` | string | Yes      | The unique identifier of the coin (e.g., `0x...::module::COIN`).                          |
| `protocol`  | string | Yes      | Lending protocol identifier. Supported values: `suilend`, `navi`, `scallop`, `alphalend`. |
| `interval`  | string | Yes      | Data aggregation interval. Supported value: `1H`.                                         |
| `timeframe` | string | Yes      | Time range for historical data. Supported values: `1d`, `2d`, `3d`, `1w`.                 |

#### Supported Protocols

| Protocol Key | Protocol Name |
| ------------ | ------------- |
| `suilend`    | Suilend       |
| `navi`       | Navi Protocol |
| `scallop`    | Scallop       |
| `alphalend`  | Alphalend     |

#### Supported Intervals

| Interval Key | Duration |
| ------------ | -------- |
| `1H`         | 1 hour   |

#### Supported Timeframes

| Timeframe Key | Duration |
| ------------- | -------- |
| `1d`          | 1 day    |
| `2d`          | 2 days   |
| `3d`          | 3 days   |
| `1w`          | 1 week   |

***

## Headers

| Header      | Required | Description                |
| ----------- | -------- | -------------------------- |
| `x-api-key` | No       | API key for authorization. |

***

## cURL Example

```bash
curl --location 'https://api.noodles.fi/api/v1/partner/pool/lending/chart?coin_type=0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7%3A%3Ausdc%3A%3AUSDC&protocol=suilend&interval=1H&timeframe=1d' \
  --header 'Accept: application/json' \
  --header 'x-api-key: YOUR_API_KEY'
```

***

## Response

### Fields

| Field     | Type   | Nullable | Description                              |
| --------- | ------ | -------- | ---------------------------------------- |
| `code`    | number | No       | HTTP-like response code (200 = success). |
| `message` | string | No       | Status message.                          |
| `data`    | object | No       | Time-series chart data object.           |

### Chart Data Object

| Field               | Type  | Description                                                     |
| ------------------- | ----- | --------------------------------------------------------------- |
| `timestamp`         | array | Array of Unix millisecond timestamps.                           |
| `deposit`           | array | Array of total deposit amounts (token units) at each timestamp. |
| `borrow`            | array | Array of total borrow amounts (token units) at each timestamp.  |
| `deposit_usd`       | array | Array of total deposit values in USD at each timestamp.         |
| `borrow_usd`        | array | Array of total borrow values in USD at each timestamp.          |
| `total_deposit_apr` | array | Array of total deposit APR percentages at each timestamp.       |
| `total_borrow_apr`  | array | Array of total borrow APR percentages at each timestamp.        |
| `utilization`       | array | Array of utilization rate percentages at each timestamp.        |

**Note:** All arrays have the same length, with each index corresponding to the same time point across all metrics.

### Success Response Example

```json
{
    "code": 200,
    "message": "OK",
    "data": {
        "timestamp": [
            1766368800000,
            1766365200000,
            1766361600000,
            1766358000000,
            1766354400000,
            1766350800000,
            1766347200000,
            1766343600000,
            1766340000000,
            1766336400000,
            1766332800000,
            1766329200000,
            1766325600000,
            1766322000000,
            1766318400000,
            1766314800000,
            1766311200000,
            1766307600000,
            1766304000000,
            1766300400000,
            1766296800000,
            1766293200000,
            1766289600000,
            1766286000000,
            1766282400000
        ],
        "deposit": [
            43994996.815583006,
            44809736.951386,
            44809138.123284996,
            44821290.304350995,
            44784753.526908,
            44781159.67276201,
            44765496.483642995,
            44767492.710338004,
            44619584.508089006,
            44505715.132097,
            44492616.342046,
            44497763.272911,
            43696458.831323,
            43696176.159753,
            43717316.792073004,
            43712301.952801,
            43712101.212232,
            43703051.778752,
            43701516.267342,
            43682423.328077,
            43667304.183324,
            43667564.233438,
            43647411.884064004,
            43647093.38762,
            43646795.145185
        ],
        "borrow": [
            39098533.322438,
            37574346.180538,
            37714430.063043,
            37717282.763395,
            37715654.893297,
            37713063.741331,
            37713654.092299,
            37713534.824069,
            37713102.911457,
            37734706.422878,
            37732709.840644,
            37724817.334725,
            37724357.574074,
            37723863.902194,
            37728973.690356,
            37728286.776691,
            37727806.891719,
            37722696.9299,
            37749530.539956,
            37749027.80549,
            37748769.272499,
            37748627.06848,
            37748329.620837,
            37749111.63801,
            37248554.816825
        ],
        "deposit_usd": [
            44016276,
            44756970,
            44783591,
            44863692,
            44853862,
            44724563,
            44716925,
            44854027,
            44662679,
            44549379,
            44547473,
            44582432,
            43664781,
            43671272,
            43695851,
            43715116,
            43760842,
            43677556,
            43726461,
            43695560,
            43671060,
            43629222,
            43602648,
            43658058,
            43640920
        ],
        "borrow_usd": [
            39117444,
            37530100,
            37692928,
            37752964,
            37773855,
            37665400,
            37672734,
            37786434,
            37749527,
            37771727,
            37779232,
            37796599,
            37697010,
            37702364,
            37710448,
            37730715,
            37769875,
            37700690,
            37771078,
            37760380,
            37752016,
            37715482,
            37709615,
            37758595,
            37243541
        ],
        "total_deposit_apr": [
            5.493555665917221,
            5.108088135676868,
            5.131727740902592,
            5.122107231459995,
            5.125850792273716,
            5.12408626727011,
            5.128054787979195,
            5.127543081182419,
            5.15012677598606,
            5.174133529737412,
            5.172687272109322,
            5.166320561915949,
            5.295297804030512,
            5.294519960225939,
            5.3095686534150826,
            5.309287525011369,
            5.310882922900082,
            5.308380688144734,
            5.309695257819809,
            5.308276228561521,
            5.311303130472789,
            5.311235957803109,
            5.314743426068971,
            5.316629046608317,
            5.225902054859372
        ],
        "total_borrow_apr": [
            8.472631040289592,
            8.403015190381879,
            8.40676887137229,
            8.383244806328886,
            8.380554149246493,
            8.375686095061514,
            8.381200556619529,
            8.379928949257467,
            8.387630561841435,
            8.401960237303303,
            8.394560431437538,
            8.382286972045565,
            8.430946782247672,
            8.42972649808967,
            8.475831398478267,
            8.473256530234712,
            8.478247338812492,
            8.469937642997282,
            8.46114430465685,
            8.450233478578292,
            8.452514744100633,
            8.45216388786184,
            8.454656158002306,
            8.459341388804432,
            8.435652605959737
        ],
        "utilization": [
            88.87040834740854,
            83.85308358605705,
            84.16682766644145,
            84.15037252895331,
            84.21539011180741,
            84.21636245447625,
            84.24714803750543,
            84.24312495696222,
            84.52141212704494,
            84.78620399847068,
            84.8066779228404,
            84.77913171355024,
            86.33275689386527,
            86.33218559966377,
            86.30212569952867,
            86.31045516072037,
            86.30975369621808,
            86.31593308602858,
            86.38036792367798,
            86.41697261613851,
            86.44630113648002,
            86.44546067805258,
            86.48469174095337,
            86.48711450902044,
            85.3408702584528
        ]
    }
}
```

***

> **See also:** [Environment Setup](/docs.noodles.fi/environment-setup/environment.md) | [Lending Pool API](/docs.noodles.fi/lending/lending-pool.md)


---

# 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://noodles-finance.gitbook.io/docs.noodles.fi/lending/lending-chart.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.
