---
# System prepended metadata

title: LendingDataMini

---

# LendingDataMini
_**notice: In the absence of special instructions, the data is scaled by 1e18.**_

<hr>

## Contract LendingDataMini Interface Document


### Introduction


Welcome to Contract LendingDataMini's Interface Documentation!

We provide some interfaces to query infomation about dForce Lending mini pool, you can get information about.



## Asset Data Interface


###  getMarketValue

**Parameters**

| type    | description        |
| ------- | ------------------ |
| address | controller address |

**Return value**

| type    | description                         |
| ------- | ----------------------------------- |
| uint256 | market total supply value ($)(1e18) |
| uint256 | market total borrow value($)(1e18)  |


###  getMarketsValue

**Parameters**

| type      | description              |
| --------- | ------------------------ |
| address[] | Controller address array |

**Return value**

| type    | description                                    |
| ------- | ---------------------------------------------- |
| uint256 | Total value of all market supplies ($)(1e18)   |
| uint256 | Total value of all market borrowings ($)(1e18) |


###  getSupplyAssetData

**Parameters**

| type    | description         |
| ------- | ------------------- |
| address | iToken address      |

**Return value**

| type    | description                            |
| ------- | -------------------------------------- |
| uint256 | Total supply value of assets ($)(1e18) |
| uint256 | Loan to Value(%)(1e18)                 |
| uint256 | Asset USD price($)(1e18)               |
| uint256 | Liquidation incentive(%)(1e18)         |


###  getBorrowAssetData

**Parameters**

| type    | description         |
| ------- | ------------------- |
| address | iToken address      |

**Return value**

| type    | description                           |
| ------- | ------------------------------------- |
| uint256 | Total borrow (scaled by decimals)     |
| uint256 | Borrow capacity (scaled by decimals)  |
| uint256 | Borrowable amount(scaled by decimals) |
| uint256 | Borrow APY(%)(1e18)                   |
| uint256 | Borrow fee ratio(%)(1e18)             |

## User Data Interface

###  getAccountTotalValue

**Parameters**

| type    | description           |
| ------- | --------------------- |
| address | controller address    |
| address | User Ethereum address |

**Return value**

| type    | description                           |
| ------- | ------------------------------------- |
| uint256 | User Supply value($)(1e18)            |
| uint256 | User Collatera value($)(1e18)         |
| uint256 | User Borrow value($)(1e18)            |
| uint256 | User Collateralization ratio(%)(1e18) |


###  getAccountSupplyData

**Parameters**

| type    | description           |
| ------- | --------------------- |
| address | iToken address        |
| address | User Ethereum address |
| uint256 | Safe factor (%)(1e18) |

**Return value**


| type    | description                                                 |
| ------- | ----------------------------------------------------------- |
| uint256 | User supplied underlying token amount (scaled by decimals)  |
| uint256 | User underlying token balance (scaled by decimals)          |
| uint256 | User max mint underlying token amount (scaled by decimals)  |
| uint256 | User available to withdraw amount (scaled by decimals)      |
| uint256 | User safe available to withdraw amount (scaled by decimals) |
| uint256 | User iToken balance (scaled by decimals)                    |
| uint8   | iToken or underlying token decimals                         |


###  getAccountBorrowData

**Parameters**

| type    | description           |
| ------- | --------------------- |
| address | iToken address        |
| address | User Ethereum address |
| uint256 | Safe factor (%)(1e18) |

**Return value**


| type    | description                                                   |
| ------- | ------------------------------------------------------------- |
| uint256 | User borrowed amount (scaled by decimals)                     |
| uint256 | Assets can borrow amount (scaled by decimals)                 |
| uint256 | User safe max available to borrow amount (scaled by decimals) |
| uint256 | User underlying token balance (scaled by decimals)            |
| uint256 | User max repay amount (scaled by decimals)                    |
| uint8   | iToken or underlying token decimals                           |


###  getLiquidationInfo

**Parameters**

| type    | description              |
| ------- | ------------------------ |
| address | Borrower address         |
| address | Liquidator address       |
| address | Borrowed asset address   |
| address | Collateral asset address |

**Return value**


| type    | description                                                   |
| ------- | ------------------------------------------------------------- |
| uint256 | max repay amount (scaled by borrowed asset decimals)          |
| uint256 | actual liquidation amount (scaled by borrowed asset decimals) |
| uint256 | liquidator balance (scaled by borrowed asset decimals)        |
| bool    | available (Whether the user's asset price status is normal)   |


###  getAccountRewardAmount

**Parameters**

| type    | description           |
| ------- | --------------------- |
| address | controller address    |
| address | User Ethereum address |

**Return value**


| type    | description                                                |
| ------- | ---------------------------------------------------------- |
| uint256 | User reward token amount (scaled by reward token decimals) |