Dfox
Search…
API Standard
get
https://devopen.sixpencer.com
/v1/defi/getcommpound
API Example

Response Fields

Field
Description
code
the response status code. 0 means success.
data
main data of the api. Please see below for details.
message
a brief human-readable message explaining the error

Data Fields

Please go through the details below to determine fields that can best show a user's portfolio. To get your project integrated, you need to provide at least one field from "Deposit", "Borrow", "Mine" and "Pool".
Example:
Compound, a lending protocol, contains "Deposit", "Borrow" and "Mine" data. "Pool" data is added to the API example for demonstration purposes only.
Field
Description
Required
projectName
project name
yes
projectLogo
project logo
yes
Deposit
user's deposit data.
no
Borrow
user's loan data
no
Mine
user's yield farming data
no
Pool
user's liquidity position data
no
1
{
2
"code": 0,
3
"data": {
4
"projectName": "Compound",
5
"projectLogo": "https://sixpencer.com/Compound.png",
6
"Borrow": [
7
{
8
"symbol": "ETH",
9
"amount": 7.332935638164213e-10,
10
"valuation": 8.626172167310852e-7,
11
"logo": "https://sixpencer.com/1027.png",
12
"price": 1176.36,
13
"contract": "0x0000000000000000000000000000000000000000",
14
"tags":"borrow eth",
15
"symbolName": "Ethereum"
16
}
17
],
18
"Deposit": [
19
{
20
"symbol": "DAI",
21
"amount": 2.098719990813386,
22
"valuation": 2.11970719072152,
23
"mortgage": true,
24
"logo": "https://sixpencer.com/4943.png",
25
"price": 1.01,
26
"tags":"deposit dai",
27
"contract": "0x6b175474e89094c44da98b954eedeac495271d0f",
28
"symbolName": "Dai Stablecoin"
29
}
30
],
31
"Mine": [
32
{
33
"symbol": "COMP",
34
"amount": 0.00006285895636280487,
35
"valuation": 0.012478760017144023,
36
"logo": "https://sixpencer.com/Compound.png",
37
"price": 198.52,
38
"tags": "fee reward",
39
"contract": "0xc00e94cb662c3520282e6f5717214004a7f26888",
40
"symbolName": "Compound"
41
}
42
],
43
"Pool": [
44
{
45
"poolId": 530,
46
"symbol0": "BASE",
47
"symbol1": "WETH",
48
"amount0": 1.1097,
49
"amount1": 0.0008,
50
"symbol0Name": "Base Protocol",
51
"symbol1Name": "Wrapped Ether",
52
"price0": 0.914147,
53
"price1": 1171.94,
54
"valuation": 2.0288578518,
55
"tags":"BASE-WETH pool",
56
"logo0": "https://sixpencer.com/7838.png",
57
"logo1": "https://sixpencer.com/2396.png",
58
"contract0": "0x07150e919b4de5fd6a63de1f9384828396f25fdc",
59
"contract1": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
60
}
61
]
62
},
63
"message": "success"
64
}
Copied!

Pool

The Pool section shows a user's active liquidity position. At the moment, we only support liquidity pools that contain two tokens as seen in most DEX/AMMs such as Uniswap. If your protocol supports liquidity pools that contain more than two tokens, you can display active liqudity position with LP token in Deposit section instead.
1
"Pool": [
2
{
3
"poolId": 530,
4
"symbol0": "BASE",
5
"symbol1": "WETH",
6
"amount0": 1.1097,
7
"amount1": 0.0008,
8
"symbol0Name": "Base Protocol",
9
"symbol1Name": "Wrapped Ether",
10
"price0": 0.914147,
11
"price1": 1171.94,
12
"valuation": 2.0288578518,
13
"tags":"BASE-WETH pool",
14
"logo0": "https://sixpencer.com/7838.png",
15
"logo1": "https://sixpencer.com/2396.png",
16
"contract0": "0x07150e919b4de5fd6a63de1f9384828396f25fdc",
17
"contract1": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
18
}
19
]
Copied!
Field
Type
Description
Required
poolId
Int
pool id
no
symbol0
String
token symbol0 in a pair
yes
symbol1
String
token symbol1 in a pair
yes
amount0
Float
token balance of symbol0
yes
amount1
Float
token balance of symbol1
yes
price0
Float
symbol0 token price in USD
yes
price1
Float
symbol1 token price in USD
yes
valuation
Float
liquidity value in USD (amount0*price0+amount1*price1)
yes
logo0
String
symbol0 token logo
yes
logo1
String
symbol1 token logo
yes
contract0
String
symbol0 contract address
yes
contract1
String
symbol1 contract address
yes
symbolName0
String
symbol0 token name
no
symbolName1
String
symbol1 token name
no
tags
String
additional info, such as pool share and allocation (less than 20 characters, support multiple language "lang")
no

Deposit

The Deposit section shows a user's deposit data. For lending protocols, yield optimizers, synthetic assets platforms, insurance protocols and other DeFi protocols, it is ideal to display underlying tokens supplied or LP token staked in the protocol under deposit section.
1
"Deposit": [
2
{
3
"symbol": "DAI",
4
"amount": 2.098719990813386,
5
"valuation": 2.11970719072152,
6
"mortgage": true,
7
"logo": "https://sixpencer.com/4943.png",
8
"price": 1.01,
9
"tags":"deposit dai",
10
"contract": "0x6b175474e89094c44da98b954eedeac495271d0f",
11
"symbolName": "Dai Stablecoin"
12
}
13
]
Copied!
Field
Type
Description
Required
symbol
String
token symbol
yes
amount
Float
current token balance in the protocol(Note: interest can be included OR displayed separately)
yes
price
Float
token price in USD
yes
valuation
Float
value in USD (amount*price)
yes
mortgage
Bool
collateral status (true = token supplied as a collateral, otherwise false)
yes
logo
String
token logo
yes
contract
String
token contract address
yes
symbolName
String
token name
no
tags
String
additional info, such as APY (less than 20 characters, support multiple language"lang")
no

Borrow

The Borrow section shows a user's loan data. For lending protocols and other defi platforms with lending services, it is ideal to display all outstanding borrows with accumulated interest under this section.
1
"Borrow": [
2
{
3
"symbol": "ETH",
4
"amount": 7.332935638164213e-10,
5
"valuation": 8.626172167310852e-7,
6
"logo": "https://sixpencer.com/1027.png",
7
"price": 1176.36,
8
"tags":"borrow eth",
9
"contract": "0x0000000000000000000000000000000000000000",
10
"symbolName": "Ethereum"
11
}
12
]
Copied!
Field
Type
Description
Required
symbol
String
token symbol
yes
amount
Float
current borrow balance in the protocol (Note: interest can be included Or displayed separately)
yes
price
Float
token price in USD
yes
valuation
Float
value in USD (amount*price)
yes
logo
String
token logo
yes
contract
String
token contract address
yes
symbolName
String
token name
no
tags
String
additional info, such as health factor or C-ratio (less than 20 characters, support multiple language"lang")
no

Mine

The Mine section shows a user's yield farming data. It is ideal to display all tokens earned but not yet claimed as a result of yield farming in DeFi protocols.
1
"Mine": [
2
{
3
"symbol": "COMP",
4
"amount": 0.00006285895636280487,
5
"valuation": 0.012478760017144023,
6
"logo": "https://sixpencer.com/Compound.png",
7
"price": 198.52,
8
"tags": "fee reward",
9
"contract": "0xc00e94cb662c3520282e6f5717214004a7f26888",
10
"symbolName": "Compound"
11
}
12
]
Copied!
Field
Type
Description
Required
symbol
String
token symbol
yes
amount
Float
current token balance earned in the protocol
yes
valuation
Float
value in USD(amount*price)
yes
price
Float
token price in USD
yes
logo
String
token logo
yes
contract
String
token contract address
yes
symbolName
String
token name
no
tags
String
additional info, such as pool info(less than 20 characters, support multiple language"lang")
no
Last modified 8mo ago