Greyhounds.WebApi

<back to all web services

GetOdds

The following routes are available for this service:
All Verbs/feed/odds
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Greyhounds.WebApi.ServiceModel;
using Greyhounds.ReadModel;

namespace Greyhounds.ReadModel
{
    public partial class AvailableRounds
    {
        public virtual string? Id { get; set; }
        public virtual List<Round>? Rounds { get; set; }
        public partial class Round
        {
            public virtual string? Id { get; set; }
            public virtual DateTime CreatedAt { get; set; }
            public virtual DateTime UpdatedAt { get; set; }
            public virtual RoundStatus Status { get; set; }
            public virtual RoundConfiguration? Configuration { get; set; }
            public virtual Dictionary<int, Outcome>? Odds { get; set; }
            public virtual JackpotInfo? JackpotInfo { get; set; }
            public virtual string? Sequence { get; set; }
            public virtual RoundProgress? Progress { get; set; }
            public virtual bool IsLocked { get; set; }
            public virtual bool IsCalculated { get; set; }
            public enum RoundStatus
            {
                Pending = 0,
                InProgress = 1,
                Ended = 2,
            }

            public enum Stages
            {
                None = 0,
                Countdown = 1,
                Processing = 2,
                Race = 3,
                Results = 4,
            }

            public partial class RoundProgress
            {
                public virtual Stages Stage { get; set; }
                public virtual int Step { get; set; }
                public virtual int Steps { get; set; }
                public virtual DateTime UTCTimestamp { get; set; }
            }

            public partial class Outcome
            {
                public virtual int Id { get; set; }
                public virtual float Odds { get; set; }
                public virtual OutcomeStatus Status { get; set; }
            }

            public enum OutcomeStatus
            {
                Unknown = 0,
                Lost = 1,
                Won = 2,
                Void = 3,
            }

        }

    }

    public partial class JackpotInfo
    {
        public virtual bool IsGiven { get; set; }
        public virtual string? Id { get; set; }
        public virtual string? SlipId { get; set; }
        public virtual string? JPId { get; set; }
        public virtual decimal Amount { get; set; }
        public virtual string? LocationId { get; set; }
        public virtual string? LocationName { get; set; }
        public virtual string? AddressLine { get; set; }
        public virtual decimal AmountAccumulated { get; set; }
    }

    public partial class Round
    {
        public virtual string? Id { get; set; }
        public virtual DateTime CreatedAt { get; set; }
        public virtual DateTime UpdatedAt { get; set; }
        public virtual RoundStatus Status { get; set; }
        public virtual RoundConfiguration? Configuration { get; set; }
        public virtual Dictionary<int, Outcome>? Odds { get; set; }
        public virtual JackpotInfo? JackpotInfo { get; set; }
        public virtual string? Sequence { get; set; }
        public virtual RoundProgress? Progress { get; set; }
        public virtual bool IsLocked { get; set; }
        public virtual bool IsCalculated { get; set; }
        public enum RoundStatus
        {
            Pending = 0,
            InProgress = 1,
            Ended = 2,
        }

        public enum Stages
        {
            None = 0,
            Countdown = 1,
            Processing = 2,
            Race = 3,
            Results = 4,
        }

        public partial class RoundProgress
        {
            public virtual Stages Stage { get; set; }
            public virtual int Step { get; set; }
            public virtual int Steps { get; set; }
            public virtual DateTime UTCTimestamp { get; set; }
        }

        public partial class Outcome
        {
            public virtual int Id { get; set; }
            public virtual float Odds { get; set; }
            public virtual OutcomeStatus Status { get; set; }
        }

        public enum OutcomeStatus
        {
            Unknown = 0,
            Lost = 1,
            Won = 2,
            Void = 3,
        }

    }

    public partial class RoundConfiguration
    {
        public virtual int CountdownDurationInSeconds { get; set; }
        public virtual int RaceDurationInSeconds { get; set; }
        public virtual int ResultsDurationInSeconds { get; set; }
        public virtual RTPStrategies RTPStrategy { get; set; }
    }

    public enum RTPStrategies
    {
        RNG = 0,
        Default = 1,
    }

}

namespace Greyhounds.WebApi.ServiceModel
{
    public partial class GetOdds
    {
    }

}

C# GetOdds DTOs

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

HTTP + OTHER

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

POST /feed/odds HTTP/1.1 
Host: grh1.api.bettor.webhop.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id":"String","rounds":[{"id":"String","odds":[{"id":0,"val":0}]}]}