2022-01-10 21:07:57 +00:00
|
|
|
export type Bet = {
|
2022-01-10 23:52:03 +00:00
|
|
|
id: string
|
|
|
|
userId: string
|
|
|
|
contractId: string
|
2022-01-10 21:07:57 +00:00
|
|
|
|
2022-01-10 23:52:03 +00:00
|
|
|
amount: number // bet size; negative if SELL bet
|
|
|
|
outcome: 'YES' | 'NO'
|
|
|
|
shares: number // dynamic parimutuel pool weight; negative if SELL bet
|
2022-01-10 21:07:57 +00:00
|
|
|
|
2022-01-10 23:52:03 +00:00
|
|
|
probBefore: number
|
|
|
|
probAfter: number
|
2022-01-10 21:07:57 +00:00
|
|
|
|
|
|
|
sale?: {
|
2022-01-10 23:52:03 +00:00
|
|
|
amount: number // amount user makes from sale
|
|
|
|
betId: string // id of bet being sold
|
2022-01-10 21:07:57 +00:00
|
|
|
// TODO: add sale time?
|
2022-01-10 23:52:03 +00:00
|
|
|
}
|
2022-01-10 21:07:57 +00:00
|
|
|
|
2022-01-10 23:52:03 +00:00
|
|
|
isSold?: boolean // true if this BUY bet has been sold
|
2022-01-19 22:36:55 +00:00
|
|
|
isAnte?: boolean
|
2022-01-10 21:07:57 +00:00
|
|
|
|
2022-01-10 23:52:03 +00:00
|
|
|
createdTime: number
|
|
|
|
}
|