getConditionsState
Fetches up-to-date condition states and outcome odds for a list of conditions.
💎
To keep your odds perfectly synchronized with our system, you can leverage WebSocket subscriptions to track condition updates as they happen.
If you use SDK, it’s already done for you.
Usage
import { getConditionsState } from '@azuro-org/toolkit'
const conditions = await getConditionsState({
chainId: 137,
conditionIds: ['300610060000000000635055340000000000000000387193'],
})Props
type GetConditionsStateParams = {
chainId: ChainId
conditionIds: string[]
}Return Value
type GetConditionsStateResult = ConditionStateData[]type ConditionStateData = {
conditionId: string
state: ConditionState
outcomes: {
id: string
outcomeId: string
odds: string
}[]
}enum ConditionState {
Active = 'Active',
Canceled = 'Canceled',
Removed = 'Removed',
Resolved = 'Resolved',
Stopped = 'Stopped'
}Last updated on