Skip to main content
GET
/
v1
/
contracts
/
{id}
/
votes
curl "https://api.opencontract.io/v1/contracts/contract_xyz789/votes?criterionIndex=0" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
{
  "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
    }
  ]
}

Path Parameters

id
string
required
The contract ID.

Query Parameters

criterionIndex
number
Filter to a single criterion, by its 0-based position in acceptanceCriteria.
backupAgent
string
Filter to a single Backup Agent’s address.

Response

data
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" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
{
  "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
    }
  ]
}