Observe votes
GEThttps://croissant.network/api/v2/stream/votes
Subscribe to a stream of votes cast on a given proposal, or by all votes made by a given party
Request
Query Parameters
partyId string
Restrict vote updates to those made by the given party.
proposalId string
Restrict vote updates to those made on the given proposal.
Responses
- 200
- 500
- default
A successful response.(streaming responses)
- application/json
- Schema
- Example (from schema)
Schema
error object
result object
{
"error": {
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
},
"result": {
"vote": {
"elsPerMarket": [
{
"els": "string",
"marketId": "string"
}
],
"partyId": "string",
"proposalId": "string",
"timestamp": "string",
"totalEquityLikeShareWeight": "string",
"totalGovernanceTokenBalance": "string",
"totalGovernanceTokenWeight": "string",
"value": "VALUE_UNSPECIFIED"
}
}
}
An internal server error
- application/json
- Schema
- Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
- curl
- python
- go
- nodejs
- CURL
curl -L -X GET 'https://croissant.network/api/v2/stream/votes' \
-H 'Accept: application/json'