get https://api.amberdata.com/defi/lending//governance
This API retrieves information about all of the governance actions that occurred for the protocol within a certain timespan.
Time Range Limit
The maximum time range (difference between endDate and startDate) is 60 days.
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return the data from the previous 24 hours.
RESPONSE DATA
Understanding Governance Actions in Compound
There are several types of governance actions in Compound, as you'll see in the action property for each item of the payload.data
array. The guide below will help you understand the possible actions.
Compound Actions |
---|
Vote |
Delegation |
All actions in the API response share the following data structure
property | type |
---|---|
action | string |
timestamp | string | number |
transactionHash | string |
logIndex | number |
Vote
{
"action": "Vote",
"timestamp": "2022-07-01 05:36:29 000",
"transactionHash": "0x19e8bca4c2f30776f1effa6e9b598f0b472787d9f20e5a2508b47dba0ded943a",
"logIndex": 395,
"voter": "0xf06f09c65635ea3db2f6255cabefcc11d28f2ef2",
"proposalId": "0xc0da02939e1441f497fd74f78ce7decb17b66529/111",
"support": true,
"supportType": "FOR"
}
property | type |
---|---|
voter | string |
proposalId | string |
support | boolean |
supportType | string |
Delegation
{
"action": "Delegation",
"timestamp": "2022-07-01 05:59:39 000",
"transactionHash": "0xc2c1a0b457501bed01cdde27a81db8f404f5b93140d46ebc654f2943cedf077b",
"logIndex": 447,
"delegator": "0x340eecc4e7b04a063e31dbf041c5211f7a7fb7b0",
"fromDelegate": "0x0000000000000000000000000000000000000000",
"toDelegate": "0x8c49300cc1476aad3fe0bd0bdd6d1ce7d86d406f",
"assetSymbol": "COMP",
"assetName": "Compound"
}
property | type |
---|---|
delegator | string |
fromDelegate | string |
toDelegate | string |
assetSymbol | string |
assetName | string |