make run
When someone thinks a market is ready to be resolved, proposes a price. This means that the market is close to be resolved. This action emits this event:
event ProposePrice(
address indexed requester,
address indexed proposer,
bytes32 identifier,
uint256 timestamp,
bytes ancillaryData,
int256 proposedPrice,
uint256 expirationTimestamp,
address currency
);
- Parse the
ancillaryData
to question id
questionId := crypto.Keccak256Hash(log.AncillaryData)
- Then use that value here:
curl --location 'https://clob.polymarket.com/markets-by-question-id/{question id}'
If the resolution is accepted the market gets resolved and that's all. However, if someone disagres is possible to dispute the proposed resolution. This means that the resolution will take a bit longer.
event DisputePrice(
address indexed requester,
address indexed proposer,
address indexed disputer,
bytes32 identifier,
uint256 timestamp,
bytes ancillaryData,
int256 proposedPrice
);
- Parse the
ancillaryData
to question id
questionId := crypto.Keccak256Hash(log.AncillaryData)
- Then use that value here:
curl --location 'https://clob.polymarket.com/markets-by-question-id/{question id}'
When the market actually gets resolved, this event is emitted:
event ConditionResolution(
bytes32 indexed conditionId,
address indexed oracle,
bytes32 indexed questionId,
uint outcomeSlotCount,
uint[] payoutNumerators
);
- Use the
conditionId
field to filter in the API request
curl --location 'https://clob.polymarket.com/markets/{condition id}'
**Check watcher/watcher.go
to see how to parse the incoming events