Core API Endpoints
Core API Endpoints
Fetch Governance Proposals
Retrieve a list of active and past governance proposals.
GET /proposals
Response:
[
{
"proposalId": 1,
"title": "Update Risk Parameters",
"state": "Active",
"createdAt": "2024-02-05T12:00:00Z",
"votesFor": 150000000,
"votesAgainst": 50000000
}
]
Get Proposal Details
Retrieve details of a specific proposal by proposalId.
GET /proposals/{proposalId}
Response:
{
"proposalId": 1,
"title": "Update Risk Parameters",
"description": "Adjust risk parameters for oETH market.",
"state": "Active",
"votesFor": 150000000,
"votesAgainst": 50000000,
"quorum": 200000000,
"timelockExpiration": "2024-02-07T12:00:00Z"
}
Cast a Vote
Submit a vote for a proposal.
POST /vote
Request Body:
{
"proposalId": 1,
"voter": "0x123456789abcdef",
"support": true,
"signature": "0xabcdef..."
}
Response:
{
"status": "success",
"message": "Vote successfully recorded."
}
Fetch Voter Receipts
Retrieve voting receipt details for a given proposalId and voter address.
GET /receipts/{proposalId}/{voter}
Response:
{
"proposalId": 1,
"voter": "0x123456789abcdef",
"hasVoted": true,
"support": true,
"votes": 5000000
}
Get Proposal State
Retrieve the current state of a proposal.
GET /proposals/{proposalId}/state
Response:
{
"proposalId": 1,
"state": "Active"
}
Security Considerations
Rate limits apply to prevent abuse of the API.
Authentication may be required for certain endpoints, such as submitting votes.
All API interactions should be performed using secure HTTPS connections.
Last updated