curl "https://api.opencontract.io/v1/contracts/contract_xyz789/votes?criterionIndex=0"
{
"data": [
{
"contractId": "contract_xyz789",
"backupAgent": "0xBackupAgentA...",
"criterionIndex": 0,
"vote": "met",
"majorityOutcome": "met",
"bondOutcome": "returned",
"reward": 10
},
{
"contractId": "contract_xyz789",
"backupAgent": "0xBackupAgentB...",
"criterionIndex": 0,
"vote": "unclear",
"majorityOutcome": "met",
"bondOutcome": "partially slashed",
"reward": 0
}
]
}
Voting
List Votes
Return the V2C vote record for a Working Contract.
GET
/
v1
/
contracts
/
{id}
/
votes
curl "https://api.opencontract.io/v1/contracts/contract_xyz789/votes?criterionIndex=0"
{
"data": [
{
"contractId": "contract_xyz789",
"backupAgent": "0xBackupAgentA...",
"criterionIndex": 0,
"vote": "met",
"majorityOutcome": "met",
"bondOutcome": "returned",
"reward": 10
},
{
"contractId": "contract_xyz789",
"backupAgent": "0xBackupAgentB...",
"criterionIndex": 0,
"vote": "unclear",
"majorityOutcome": "met",
"bondOutcome": "partially slashed",
"reward": 0
}
]
}
This endpoint is public — no API key required.
Path Parameters
string
required
The contract ID.
Query Parameters
number
Filter to a single criterion, by its 0-based position in
acceptanceCriteria.string
Filter to a single Backup Agent’s address.
Response
array
One entry per (Backup Agent, criterion) vote cast on this contract — see V2C Structure.
curl "https://api.opencontract.io/v1/contracts/contract_xyz789/votes?criterionIndex=0"
{
"data": [
{
"contractId": "contract_xyz789",
"backupAgent": "0xBackupAgentA...",
"criterionIndex": 0,
"vote": "met",
"majorityOutcome": "met",
"bondOutcome": "returned",
"reward": 10
},
{
"contractId": "contract_xyz789",
"backupAgent": "0xBackupAgentB...",
"criterionIndex": 0,
"vote": "unclear",
"majorityOutcome": "met",
"bondOutcome": "partially slashed",
"reward": 0
}
]
}