package API.Presidio

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

service AccountService

account.proto:171

* The Account API retrieves information for various accounts which have interacted with Compound. You can use this API to pull data about a specific account by address, or alternatively, pull data for a list of unhealthy accounts (that is, accounts which are approaching under-collateralization). <code>// Retreives list of accounts and related supply and borrow balances. fetch("API_BASE_URL/api/v2/account"); // Returns details for given account fetch("API_BASE_URL/api/v2/account?addresses[]=0x00..");</code>

service CTokenService

ctoken.proto:150

* <p><i>Note: This service is experimental (alpha) and subject to change.</i></p> The CToken API retrieves information for all cTokens. You can use this API to pull data about all cTokens: <code>// Retreives list all cTokens fetch("API_BASE_URL/api/v2/ctoken"); // or return details for a single cToken fetch("API_BASE_URL/api/v2/ctoken?addresses[]=0x00..");</code>

service SharedDataTypes

common.proto:51

* Custom data types that are shared between services.

(no methods)

message Account

account.proto:59

* This includes a list of cTokens contextualized to each account. <code>{ "address": "0xbac065be2e8ca097e9ac924e94af000dd3a5663" "health": { "value": "1.07264275673050348990755599431194797431802239523113293682619605751591901" } "tokens": [ { "address": "0xf5dce57282a584d2746faf1593d3121fcac444dc" "borrow_balance_underlying": {"value": "131.4682716123015"} "lifetime_borrow_interest_accrued": {"value": "0.44430505829286"} "lifetime_supply_interest_accrued": {"value": "0.0000021671829864899976"} "supply_balance_underlying": {"value": "0.0"} } ], "total_borrow_value_in_eth": {"value": "0.5100157047140227313856015174794473200000000000000000000000000000" } "total_collateral_value_in_eth": {"value": "0.54706465148029978664135447293587201124121731200000000000000000000000000" } }</code>

Used in: AccountResponse

message AccountCToken

account.proto:91

* An account's supply, borrow, and interest information for a particular cToken. <code>{ "address": "0xf5dce57282a584d2746faf1593d3121fcac444dc" "borrow_balance_underlying": {"value": "131.4682716123015"} "lifetime_borrow_interest_accrued": {"value": "0.44430505829286"} "lifetime_supply_interest_accrued": {"value": "0.0000021671829864899976"} "supply_balance_underlying": {"value": "0.0"} }</code>

Used in: Account

message AccountRequest

account.proto:22

* The request to the account API can specify a number filters, such as which addresses to retrieve information about or general health requirements. The following shows an example set of request parameters in JSON: <code>{ "addresses": [] // returns all accounts if empty or not included "block_number": 0 // returns latest if given 0 "max_health": { "value": "10.0" } "min_borrow_value_in_eth": { "value": "0.002" } "page_number": 1 "page_size": 10 }</code>

Used as request type in: AccountService.account, AccountService.post_account

Used as field type in: AccountResponse

message AccountResponse

account.proto:114

The account API returns an overall picture of accounts matching the filters on Compound.

Used as response type in: AccountService.account, AccountService.post_account

enum AccountResponse.errorCodes

account.proto:123

message Bytes32

common.proto:13

doc-false

message CToken

ctoken.proto:58

* This includes a list of cTokens contextualized to the full market. <code>{ "cToken": [{ "borrow_rate": {"value": "0.051453109785093843"}, "cash": {"value": "514.078443"}, "collateral_factor": {"value": "0.80000000000000000"}, "exchange_rate": {"value": "0.020024242770802729"}, "interest_rate_model_address": "0x1a43bfd39b15dcf444e17ab408c4b5be32deb7f5", "name": "Compound USD Coin", "number_of_borrowers": 3, "number_of_suppliers": 34, "reserves": {"value": "0"}, "supply_rate": {"value": "0.013237112532748109"}, "symbol": "cUSDC", "token_address": "0x5b281a6dda0b271e91ae35de655ad301c976edb1", "total_borrows": {"value": "178.064546"}, "total_supply": {"value": "34565.25157651"}, "underlying_address": "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b", "underlying_name": "USD Coin", "underlying_price": {"value": "0.0041368287055953530000000000"}, "underlying_symbol":"USDC" }], "error": null, "request": { "addresses": ["0x5b281a6dda0b271e91ae35de655ad301c976edb1"], "block_number": 4515576, "block_timestamp": 0 } }</code>

Used in: CTokenResponse

message CTokenRequest

ctoken.proto:18

* The request to the cToken API can specify a number filters, such as which tokens to retrieve information about or moment in time. The following shows an example set of request parameters in JSON: <code>{ "addresses": [] // returns all tokens if empty or not included "block_timestamp": 0 // returns latest information if given 0 }</code>

Used as request type in: CTokenService.ctoken, CTokenService.post_ctoken

Used as field type in: CTokenResponse

message CTokenResponse

ctoken.proto:120

The cToken API returns an overall picture of cTokens matching the filter.

Used as response type in: CTokenService.ctoken, CTokenService.post_ctoken

enum CTokenResponse.errorCodes

ctoken.proto:127

message CurrencyAmount

common.proto:31

doc-false

message Error

common.proto:6

doc-false

Used in: AccountResponse, CTokenResponse

message PaginationSummary

common.proto:37

Used for paginating results.

Used in: AccountResponse

message Precise

common.proto:18

For non-negative numbers only.

Used in: Account, AccountCToken, AccountRequest, CToken, CurrencyAmount

message SignedPrecise

common.proto:25

doc-false