示例#1
0
 public BetfairClientSync(Exchange exchange,
                          string appKey,
                          Action preNetworkRequest = null,
                          WebProxy proxy           = null)
 {
     client = new BetfairClient(exchange, appKey, preNetworkRequest, proxy);
 }
示例#2
0
 public BetfairClientSync(string appKey,
                          string sessionToken,
                          Action preNetworkRequest = null,
                          WebProxy proxy           = null)
 {
     client = new BetfairClient(appKey, sessionToken, preNetworkRequest, proxy);
 }
 public static MarketListenerLiveData Create(BetfairClient client,
                                             PriceProjection priceProjection,
                                             OrderProjection?orderProjection          = null,
                                             MatchProjection?matchProjection          = null,
                                             Action <System.Exception, string> logger = null)
 {
     return(new MarketListenerLiveData(client, priceProjection, orderProjection, matchProjection, logger));
 }
示例#4
0
 private MarketListener(BetfairClient client,
                        PriceProjection priceProjection,
                        int connectionCount)
 {
     this.client          = client;
     this.priceProjection = priceProjection;
     this.connectionCount = connectionCount;
     Task.Run(() => PollMarketBooks());
 }
示例#5
0
 private CatalogueListenerPeriodic(BetfairClient client,
                                   double periodInSec,
                                   Action <System.Exception, string> logger = null)
 {
     _client  = client;
     _logger  = logger;
     _polling = Observable.Interval(TimeSpan.FromSeconds(periodInSec),
                                    NewThreadScheduler.Default).Subscribe(l => DoWork());
 }
        private MarketListenerPeriodic(BetfairClient client,
                                       PriceProjection priceProjection,
                                       double periodInSec)
        {
            _client          = client;
            _priceProjection = priceProjection;

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

            return(listener);
        }
 private MarketListenerLiveData(BetfairClient client,
                                PriceProjection priceProjection,
                                OrderProjection?orderProjection,
                                MatchProjection?matchProjection,
                                Action <System.Exception, string> logger)
 {
     _client          = client;
     _priceProjection = priceProjection;
     _orderProjection = orderProjection;
     _matchProjection = matchProjection;
     _logger          = logger;
 }
示例#9
0
 private MarketListener(BetfairClient client,
                        PriceProjection priceProjection,
                        int connectionCount, int samplePeriod)
 {
     this.client          = client;
     this.priceProjection = priceProjection;
     this.connectionCount = connectionCount;
     this.samplePeriod    = samplePeriod;
     if (samplePeriod >= 1000)
     {
         this.sampleFrequency = samplePeriod / 1000;
     }
     else
     {
         this.sampleFrequency = samplePeriod / 100;
     }
     Task.Run(() => PollMarketBooks());
 }
 public static MarketListenerMultiPeriod Create(BetfairClient client,
                                                PriceProjection priceProjection)
 {
     return(new MarketListenerMultiPeriod(client, priceProjection));
 }
 private MarketListenerMultiPeriod(BetfairClient client,
                                   PriceProjection priceProjection)
 {
     _client          = client;
     _priceProjection = priceProjection;
 }
 public static MarketListenerPeriodic Create(BetfairClient client,
                                             PriceProjection priceProjection,
                                             double periodInSec)
 {
     return(new MarketListenerPeriodic(client, priceProjection, periodInSec));
 }
示例#13
0
 public static CatalogueListenerPeriodic Create(BetfairClient client,
                                                double periodInSec,
                                                Action <System.Exception, string> logger = null)
 {
     return(new CatalogueListenerPeriodic(client, periodInSec, logger));
 }