manifold/common/bet.ts

24 lines
500 B
TypeScript
Raw Normal View History

export type Bet = {
2022-01-10 23:52:03 +00:00
id: string
userId: string
contractId: string
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 23:52:03 +00:00
probBefore: number
probAfter: number
sale?: {
2022-01-10 23:52:03 +00:00
amount: number // amount user makes from sale
betId: string // id of bet being sold
// TODO: add sale time?
2022-01-10 23:52:03 +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 23:52:03 +00:00
createdTime: number
}