# Data Api Demand
###### tags: `cian` `api`
## Lending
For each pool, we should have access to these following data by any one of these following ways.
1. api
2. contract
3. the graph
Go:
```go=
type tokenBasic struct {
Address string // mandatory. token address.
Symbol string // mandatory. token symbol.
Decimals int // mandatory. token decimals. must not be 0.
}
type aaveToken struct {
Basic tokenBasic // mandatory.
BaseApy string // mandatory. base apy. apy should be decimals, 0.1 for 10%.
IncentiveApy string // mandatory. total incentive apy. apy should be decimals, 0.1 for 10%.
Incentive []incentive // details of incentives.
}
type compoundToken struct {
Basic tokenBasic // mandatory.
BaseSupplyApy string // mandatory. base supply apy.
BaseBorrowApy string // mandatory. base borrow apy.
IncentiveSupplyApy string // mandatory. incentive supply apy.
IncentiveBorrowApy string // mandatory. incentive borrow apy.
SupplyIncentive []incentive // details of supply incentives.
BorrowIncentive []incentive // details of borrow incentives.
}
type lendingPool struct {
Underlying tokenBasic // mandatory. underlying of the pool. usdt for ausdt pool.
AToken aaveToken // mandatory for aave like protocols. like a token info.
VToken aaveToken // mandatory for aave like protocols. various debt token info.
SToken aaveToken // mandatory for aave like protocols. stable debt token info.
CToken compoundToken // mandatory for compound like protocls. c token info.
CollateralFactor string // mandatory. the maximum of collateral factor. "80" for 80%.
LiquidationLimit string // mandatory. liquidation will occur when liquidation limit is reached. "80" for 80%.
LiquidationPenalty string // mandatory. penalty percentage when liquidation occurs. "10" for 10%.
AllowBorrow bool // mandatory. whether the token can be borrowed in this protocol.
AllowCollateral bool // mandatory. whether the token can be set as collateral in this protocol.
BorrowLimit string // The borrow limit of the pool.
SupplyLimit string // The supply limit of the pool.
SupplyCapacity string // SupplyCapacity = SupplyLimit - TotalSupply.
TotalSupply string // mandatory for aave like protocols. Total amount supplied into the pool.
TotalVBorrow string // mandatory for aave like protocols. Total variable amount borrowed from the pool.
TotalSBorrow string // mandatory for aave like protocols. Total stable amount borrowed from the pool.
TotalCBorrow string // mandatory for compound like protocls. Total (compound like) amount borrowed from the pool.
UtilizationRate string // = TotalBorrow / TotalSupply
EModeCategoryId int // Aave v3 emode category id.
EModeCollateralFactor string // Aave v3 emode collateral factor.
EModeLiquidationLimit string // Aave v3 emode liquidation limit.
BorrowableInIsolation bool // Aave v3 isolation mode can be borrowed.
}
```
Json:
```json=
{
"Underlying": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"AToken": {
"Basic": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"BaseApy": "0.11",
"IncentiveApy": "0.09",
"Incentive": [
{
"Basic": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"SupplyRatePerSecond": "10000",
"Rewarder": "0x..."
}
]
},
"VToken": {
"Basic": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"BaseApy": "0.01",
"IncentiveApy": "0.01",
"Incentive": [
{
"Basic": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"SupplyRatePerSecond": "10000",
"Rewarder": "0x..."
}
]
},
"SToken": {
"Basic": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"BaseApy": "0.01",
"IncentiveApy": "0.01",
"Incentive": [
{
"Basic": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"SupplyRatePerSecond": "10000",
"Rewarder": "0x..."
}
]
},
"CToken": {
"Basic": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"BaseSupplyApy": "0.01",
"BaseBorrowApy": "0.01",
"IncentiveSupplyApy": "0.01",
"IncentiveBorrowApy": "0.01",
"SupplyIncentive": [
{
"Basic": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"SupplyRatePerSecond": "10000",
"Rewarder": "0x..."
}
],
"BorrowIncentive": [
{
"Basic": {
"Address": "0x...",
"Symbol": "...",
"Decimals": 18
},
"SupplyRatePerSecond": "10000",
"Rewarder": "0x..."
}
]
},
"CollateralFactor": "75",
"LiquidationLimit": "80",
"LiquidationPenalty": "10",
"AllowBorrow": true,
"AllowCollateral": true,
"BorrowLimit": "1000000",
"SupplyLimit": "2000000",
"SupplyCapacity": "20000",
"TotalSupply": "1980000",
"TotalVBorrow": "1800",
"TotalSBorrow": "200",
"TotalCBorrow": "0",
"UtilizationRate": "0.1",
"EModeCategoryId": 0,
"EModeCollateralFactor": "95",
"EModeLiquidationLimit": "98",
"BorrowableInIsolation": false
}
```