Example #1
0
 /// <remarks/>
 public void getMarketAsync(GetMarketReq request, object userState) {
     if ((this.getMarketOperationCompleted == null)) {
         this.getMarketOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetMarketOperationCompleted);
     }
     this.InvokeAsync("getMarket", new object[] {
                 request}, this.getMarketOperationCompleted, userState);
 }
Example #2
0
 public GetMarketResp getMarket(GetMarketReq request) {
     object[] results = this.Invoke("getMarket", new object[] {
                 request});
     return ((GetMarketResp)(results[0]));
 }
Example #3
0
 /// <remarks/>
 public void getMarketAsync(GetMarketReq request) {
     this.getMarketAsync(request, null);
 }
Example #4
0
        /// <summary>
        /// The API GetMarket service allows the customer to input a 
        /// Market ID and retrieve all static market data for the 
        /// market requested. To get a Market ID for the betting 
        /// market associated with an event you are interested in, 
        /// use the GetEvents command.
        /// </summary>
        /// <param name="exchangeId"></param>
        /// <param name="marketId"></param>
        /// <returns></returns>
        public BetfairExchangeAPI.Market GetMarket(int exchangeId, int marketId)
        {
            const string serviceName = "GetMarket";
            Console.WriteLine("{0}$ API_SERVICE {1}", DateTime.Now, serviceName);

            var request = new GetMarketReq
                              {
                                  includeCouponLinks = false,
                                  marketId = marketId,
                                  header = ((BetfairExchangeAPI.APIRequestHeader) GetHeader(false))
                              };

            GetMarketResp response = _bfExchangeService[exchangeId].getMarket(request);
            ValidateAPIResponse(serviceName, Convert.ToString(response.header.errorCode),
                                Convert.ToString(response.errorCode), response.header.sessionToken);

            return response.market;
        }