Bet Entity
Description
Represents a user bet in Azuro. It stores details about the bet, such as conditions, odds, amount, and results, and is linked to the core contract for settlement.
Usage
Use this entity to track and manage individual bets placed by users. It can be used to display betting histories, manage user-specific bets, or track bet results and payouts in your interface.
Attributes
Attribute | Type | Description |
---|---|---|
id | ID! | Unique identifier for the bet (Core contract address + Bet ID). |
core | CoreContract! | Reference to the core contract associated with the bet. |
type | BetType! | Type of bet: either Ordinar (single bet) or Express (multiple bets). |
betId | BigInt! | Numeric identifier for the bet. |
bettor | String! | Address of the person who placed the bet. |
owner | String! | Address of the owner of the bet. |
actor | String! | Address of the actor (the account that executed the bet). |
affiliate | String | Affiliate linked to the bet. |
rawAmount | BigInt! | Raw amount staked in the bet. |
amount | BigDecimal! | Formatted value of the amount staked. |
rawPotentialPayout | BigInt! | Raw value of the potential payout. |
potentialPayout | BigDecimal! | Formatted value of the potential payout. |
rawPayout | BigInt | Raw value of the actual payout. |
payout | BigDecimal | Formatted value of the actual payout. |
rawOdds | BigInt! | Raw odds of the bet. |
odds | BigDecimal! | Formatted odds of the bet. |
rawSettledOdds | BigInt | Raw odds after settlement of the bet. |
settledOdds | BigDecimal | Formatted odds after settlement. |
approxSettledAt | BigInt! | Approximate time when the bet is expected to be settled. |
selections | [Selection!]! @derivedFrom | List of selections tied to this bet. |
createdBlockNumber | BigInt! | Block number when the bet was created. |
createdBlockTimestamp | BigInt! | Timestamp of the block when the bet was created. |
createdTxHash | String! | Transaction hash of the bet creation. |
resolvedBlockNumber | BigInt | Block number when the bet was resolved (if applicable). |
resolvedBlockTimestamp | BigInt | Timestamp of the block when the bet was resolved. |
resolvedTxHash | String | Transaction hash for the resolution of the bet. |
status | BetStatus! | Status of the bet: Accepted , Canceled , or Resolved . |
result | BetResult | Result of the bet: Won or Lost . |
isRedeemable | Boolean! | Indicates if the bet is redeemable. |
isRedeemed | Boolean! | Indicates if the bet has been redeemed. |
redeemedBlockNumber | BigInt | Block number when the bet was redeemed. |
redeemedBlockTimestamp | BigInt | Timestamp of the block when the bet was redeemed. |
redeemedTxHash | String | Transaction hash for the redemption of the bet. |
freebet | Freebet | Reference to the freebet details (if applicable). |