コード例 #1
0
ファイル: BetfairClientSync.cs プロジェクト: dt-bet/betfairng
 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);
 }
コード例 #3
0
 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
ファイル: MarketListener.cs プロジェクト: dt-bet/betfairng
 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());
 }
コード例 #6
0
        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
ファイル: MarketListener.cs プロジェクト: dt-bet/betfairng
        public static MarketListener Create(BetfairClient client,
                                            PriceProjection priceProjection,
                                            int connectionCount)
        {
            if (listener == null)
            {
                listener = new MarketListener(client, priceProjection, connectionCount);
            }

            return(listener);
        }
コード例 #8
0
 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());
 }
コード例 #10
0
 public static MarketListenerMultiPeriod Create(BetfairClient client,
                                                PriceProjection priceProjection)
 {
     return(new MarketListenerMultiPeriod(client, priceProjection));
 }
コード例 #11
0
 private MarketListenerMultiPeriod(BetfairClient client,
                                   PriceProjection priceProjection)
 {
     _client          = client;
     _priceProjection = priceProjection;
 }
コード例 #12
0
 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));
 }