示例#1
0
 private Market(BetfairCon client,
                int connectionCount)
 {
     this.client          = client;
     this.connectionCount = connectionCount;
     Task.Run(() => PollMarketBooks());
 }
示例#2
0
        private MarketPeriodic(BetfairCon client,
                               double periodInSec)
        {
            _client = client;

            _polling = Observable.Interval(TimeSpan.FromSeconds(periodInSec),
                                           NewThreadScheduler.Default).Subscribe(l => DoWork());
        }
示例#3
0
        public static Market Create(BetfairCon client,
                                    int connectionCount)
        {
            if (listener == null)
            {
                listener = new Market(client, connectionCount);
            }

            return(listener);
        }
示例#4
0
        private List <betSnapshotTypeBetSnapshotItem> ExistBets(BetfairCon Bet, int MarketID)
        {
            var Currentbets = Bet.GetCurrentbets(new CurrentbetsFilter()
            {
                betResult = betStatusEnum.ACTIVE, ChannelID = MarketID
            }).Result;

            if (Currentbets.HasError)
            {
                if (Currentbets.Result.total > 0)
                {
                    return(Currentbets.Result.betSnapshotItem);
                }
            }
            else
            {
                return(new List <betSnapshotTypeBetSnapshotItem>());
            }

            return(new List <betSnapshotTypeBetSnapshotItem>());
        }
示例#5
0
 public static MarketPeriodic Create(BetfairCon client,
                                     double periodInSec)
 {
     return(new MarketPeriodic(client, periodInSec));
 }