Six4Win.WebApi

<back to all web services

GetDraw

The following routes are available for this service:
All Verbs/qry/rounds/draw
package dtos

import (
	"time"
)

type Pool struct {
	Id          int     `json:"id,omitempty"`
	Name        *string `json:"name,omitempty"`
	Coefficient float64 `json:"coefficient,omitempty"`
	Rtp         float64 `json:"rtp,omitempty"`
	Threshold   float64 `json:"threshold,omitempty"`
	Balance     float64 `json:"balance,omitempty"`
	Rrtp        float64 `json:"rrtp,omitempty"`
	RBalance    float64 `json:"rBalance,omitempty"`
}

type DrawItem struct {
	Ordinal            int     `json:"ordinal,omitempty"`
	Number             int     `json:"number,omitempty"`
	Coefficient        float32 `json:"coefficient,omitempty"`
	IsDoubleTriple     bool    `json:"isDoubleTriple,omitempty"`
	ConstitutesJackpot bool    `json:"constitutesJackpot,omitempty"`
	Hits               int     `json:"hits,omitempty"`
	Win                float64 `json:"win,omitempty"`
}

type CustomBetType int

const (
	CustomBetTypeFirstNumberOdd                 CustomBetType = 4
	CustomBetTypeFirstNumberEven                CustomBetType = 5
	CustomBetTypeFirstNumberLessThan24_5        CustomBetType = 6
	CustomBetTypeFirstNumberGreaterThan24_5     CustomBetType = 7
	CustomBetTypeSumOfFirstFiveLessThan122_5    CustomBetType = 8
	CustomBetTypeSumOfFirstFiveGreaterThan122_5 CustomBetType = 9
	CustomBetTypeFirstColor1                    CustomBetType = 10
	CustomBetTypeFirstColor2                    CustomBetType = 11
	CustomBetTypeFirstColor3                    CustomBetType = 12
	CustomBetTypeFirstColor4                    CustomBetType = 13
	CustomBetTypeFirstColor5                    CustomBetType = 14
	CustomBetTypeFirstColor6                    CustomBetType = 15
	CustomBetTypeFirstColor7                    CustomBetType = 16
	CustomBetTypeFirstColor8                    CustomBetType = 17
	CustomBetTypeMoreOddNumbers                 CustomBetType = 18
	CustomBetTypeMoreEvenNumbers                CustomBetType = 19
)

type CustomBetOutcome struct {
	Type     CustomBetType `json:"type,omitempty"`
	Coef     float32       `json:"coef,omitempty"`
	WinCount int           `json:"winCount,omitempty"`
	Win      float64       `json:"win,omitempty"`
	IsWin    bool          `json:"isWin,omitempty"`
	Results  *string       `json:"results,omitempty"`
}

type BettingApp struct {
	Name    *string `json:"name,omitempty"`
	Version *string `json:"version,omitempty"`
}

type Ref struct {
	Id  string `json:"id"`
	Val string `json:"val"`
}

type RefEx struct {
	Ref
	Data RecordDictionary[string, string] `json:"data"`
}

type Origin struct {
	Application   *BettingApp `json:"application,omitempty"`
	Ip            *string     `json:"ip,omitempty"`
	Organization  *RefEx      `json:"organization,omitempty"`
	Region        *Ref        `json:"region,omitempty"`
	LocationGroup *Ref        `json:"locationGroup,omitempty"`
	Location      *RefEx      `json:"location,omitempty"`
	Device        *RefEx      `json:"device,omitempty"`
	Clerk         *Ref        `json:"clerk,omitempty"`
}

type WinnerByCode struct {
	RoundId                     *string   `json:"roundId,omitempty"`
	DrawnAtUtc                  time.Time `json:"drawnAtUtc,omitempty"`
	SlipId                      *string   `json:"slipId,omitempty"`
	BetId                       *string   `json:"betId,omitempty"`
	Code                        *string   `json:"code,omitempty"`
	Amount                      float64   `json:"amount,omitempty"`
	Origin                      *Origin   `json:"origin,omitempty"`
	Bettor                      *Ref      `json:"bettor,omitempty"`
	LocationAddressOrBettorInfo *string   `json:"locationAddressOrBettorInfo,omitempty"`
}

type SuperWinWinner struct {
	IsDrawn                     bool      `json:"isDrawn,omitempty"`
	DrawnAtUtc                  time.Time `json:"drawnAtUtc,omitempty"`
	RoundId                     *string   `json:"roundId,omitempty"`
	BetId                       *string   `json:"betId,omitempty"`
	SlipId                      *string   `json:"slipId,omitempty"`
	Origin                      *Origin   `json:"origin,omitempty"`
	Bettor                      *Ref      `json:"bettor,omitempty"`
	Code                        *string   `json:"code,omitempty"`
	Amount                      float64   `json:"amount,omitempty"`
	LocationAddressOrBettorInfo *string   `json:"locationAddressOrBettorInfo,omitempty"`
}

type SuperWinInfo struct {
	IsActive         bool            `json:"isActive,omitempty"`
	Winner           *SuperWinWinner `json:"winner,omitempty"`
	AvailableAmount  float64         `json:"availableAmount,omitempty"`
	AllPrizesAwarded bool            `json:"allPrizesAwarded,omitempty"`
}

type JackPot5Winner struct {
	BetId            *string           `json:"betId,omitempty"`
	NrOfCombinations int               `json:"nrOfCombinations,omitempty"`
	WinningsAmount   float64           `json:"winningsAmount,omitempty"`
	Origin           *Origin           `json:"origin,omitempty"`
	Bettor           *Ref              `json:"bettor,omitempty"`
	Payload          map[string]string `json:"payload,omitempty"`
}

type Jackpot5Info struct {
	IsHit             bool             `json:"isHit,omitempty"`
	AmountAccumulated float64          `json:"amountAccumulated,omitempty"`
	AmountAwarded     float64          `json:"amountAwarded,omitempty"`
	NrOfWinners       int              `json:"nrOfWinners,omitempty"`
	JackPot5Winners   []JackPot5Winner `json:"jackPot5Winners,omitempty"`
}

type GlobalCodePotInfo struct {
	IsActive     bool          `json:"isActive,omitempty"`
	IsDrawn      bool          `json:"isDrawn,omitempty"`
	Winner       *WinnerByCode `json:"winner,omitempty"`
	InertCode    *string       `json:"inertCode,omitempty"`
	Accumulation float64       `json:"accumulation,omitempty"`
}

type RoundOutcome struct {
	Draw              []DrawItem         `json:"draw,omitempty"`
	CustomBetOutcomes []CustomBetOutcome `json:"customBetOutcomes,omitempty"`
	LcpWinners        []WinnerByCode     `json:"lcpWinners,omitempty"`
	SuperWinInfo      *SuperWinInfo      `json:"superWinInfo,omitempty"`
	Jackpot5Info      *Jackpot5Info      `json:"jackpot5Info,omitempty"`
	GlobalCodePotInfo *GlobalCodePotInfo `json:"globalCodePotInfo,omitempty"`
	Stake             float64            `json:"stake,omitempty"`
	BetCount          int                `json:"betCount,omitempty"`
	Winnings          float64            `json:"winnings,omitempty"`
	Balance           float64            `json:"balance,omitempty"`
	ReturnToPlayer    float64            `json:"returnToPlayer,omitempty"`
	WinCount          int                `json:"winCount,omitempty"`
	SlipWinCount      int                `json:"slipWinCount,omitempty"`
	WinCountPct       float32            `json:"winCountPct,omitempty"`
	SlipCount         int                `json:"slipCount,omitempty"`
	UnitBetCount      int                `json:"unitBetCount,omitempty"`
}

type Draw struct {
	Id                 *string       `json:"id,omitempty"`
	Sequence           *string       `json:"sequence,omitempty"`
	InputAccumulation  []Pool        `json:"inputAccumulation,omitempty"`
	OutputAccumulation []Pool        `json:"outputAccumulation,omitempty"`
	Outcome            *RoundOutcome `json:"outcome,omitempty"`
}

type GetDraw struct {
	Id *string `json:"id,omitempty"`
}

type RecordDictionary[TKey any, TVal any] map[TKey]TVal

Go GetDraw DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /qry/rounds/draw HTTP/1.1 
Host: s4w1.api.bettor.webhop.biz 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	sequence: String,
	inputAccumulation: 
	[
		{
			id: 0,
			name: String,
			amount: 0,
			reserveAmount: 0
		}
	],
	outputAccumulation: 
	[
		{
			id: 0,
			name: String,
			amount: 0,
			reserveAmount: 0
		}
	],
	outcome: 
	{
		draw: 
		[
			{
				ordinal: 0,
				number: 0,
				coefficient: 0,
				isDoubleTriple: False,
				constitutesJackpot: False,
				hits: 0,
				win: 0
			}
		],
		customBetOutcomes: 
		[
			{
				type: 4,
				coef: 0,
				winCount: 0,
				win: 0,
				isWin: False,
				results: String
			}
		],
		lcpWinners: 
		[
			{
				roundId: String,
				drawnAtUtc: 0001-01-01,
				slipId: String,
				betId: String,
				code: String,
				amount: 0,
				origin: 
				{
					application: 
					{
						name: String,
						version: String
					},
					ip: String,
					organization: 
					{
						data: 
						{
							String: String
						},
						id: String,
						val: String
					},
					region: 
					{
						id: String,
						val: String
					},
					locationGroup: 
					{
						id: String,
						val: String
					},
					location: 
					{
						data: 
						{
							String: String
						},
						id: String,
						val: String
					},
					device: 
					{
						data: 
						{
							String: String
						},
						id: String,
						val: String
					},
					clerk: 
					{
						id: String,
						val: String
					}
				},
				bettor: 
				{
					id: String,
					val: String
				},
				locationAddressOrBettorInfo: String
			}
		],
		superWinInfo: 
		{
			isActive: False,
			winner: 
			{
				isDrawn: False,
				drawnAtUtc: 0001-01-01,
				roundId: String,
				betId: String,
				slipId: String,
				origin: 
				{
					application: 
					{
						name: String,
						version: String
					},
					ip: String,
					organization: 
					{
						data: 
						{
							String: String
						},
						id: String,
						val: String
					},
					region: 
					{
						id: String,
						val: String
					},
					locationGroup: 
					{
						id: String,
						val: String
					},
					location: 
					{
						data: 
						{
							String: String
						},
						id: String,
						val: String
					},
					device: 
					{
						data: 
						{
							String: String
						},
						id: String,
						val: String
					},
					clerk: 
					{
						id: String,
						val: String
					}
				},
				bettor: 
				{
					id: String,
					val: String
				},
				code: String,
				amount: 0,
				locationAddressOrBettorInfo: String
			},
			availableAmount: 0,
			allPrizesAwarded: False
		},
		jackpot5Info: 
		{
			isHit: False,
			amountAccumulated: 0,
			amountAwarded: 0,
			nrOfWinners: 0,
			jackPot5Winners: 
			[
				{
					betId: String,
					nrOfCombinations: 0,
					winningsAmount: 0,
					origin: 
					{
						application: 
						{
							name: String,
							version: String
						},
						ip: String,
						organization: 
						{
							data: 
							{
								String: String
							},
							id: String,
							val: String
						},
						region: 
						{
							id: String,
							val: String
						},
						locationGroup: 
						{
							id: String,
							val: String
						},
						location: 
						{
							data: 
							{
								String: String
							},
							id: String,
							val: String
						},
						device: 
						{
							data: 
							{
								String: String
							},
							id: String,
							val: String
						},
						clerk: 
						{
							id: String,
							val: String
						}
					},
					bettor: 
					{
						id: String,
						val: String
					},
					payload: 
					{
						String: String
					}
				}
			]
		},
		globalCodePotInfo: 
		{
			isActive: False,
			isDrawn: True,
			winner: 
			{
				roundId: String,
				drawnAtUtc: 0001-01-01,
				slipId: String,
				betId: String,
				code: String,
				amount: 0,
				origin: 
				{
					application: 
					{
						name: String,
						version: String
					},
					ip: String,
					organization: 
					{
						data: 
						{
							String: String
						},
						id: String,
						val: String
					},
					region: 
					{
						id: String,
						val: String
					},
					locationGroup: 
					{
						id: String,
						val: String
					},
					location: 
					{
						data: 
						{
							String: String
						},
						id: String,
						val: String
					},
					device: 
					{
						data: 
						{
							String: String
						},
						id: String,
						val: String
					},
					clerk: 
					{
						id: String,
						val: String
					}
				},
				bettor: 
				{
					id: String,
					val: String
				},
				locationAddressOrBettorInfo: String
			},
			inertCode: String,
			accumulation: 0
		},
		stake: 0,
		betCount: 0,
		winnings: 0,
		balance: 0,
		returnToPlayer: 0,
		winCount: 0,
		slipWinCount: 0,
		winCountPct: 0,
		slipCount: 0,
		unitBetCount: 0
	}
}