public BetfairE.MarketPrices GetMarketPrices(int exchangeId, int marketId) { BetfairE.BFExchangeService service = serviceExchanges[exchangeId]; BetfairE.GetMarketPricesCompressedReq pricesReq = new BetfairE.GetMarketPricesCompressedReq(); pricesReq.header = headerExchange; pricesReq.currencyCode = currency; pricesReq.marketId = marketId; BetfairE.GetMarketPricesCompressedResp pricesResp = service.getMarketPricesCompressed(pricesReq); ResetSessionToken(pricesResp.header); if (pricesResp.errorCode == BetfairE.GetMarketPricesErrorEnum.OK) { return(DecompressMarketPrices(pricesResp.marketPrices)); } else if (ExchangeThrottleException.WasThrottled(pricesResp)) { throw new ExchangeThrottleException("getMarketPricesCompressed", pricesResp); } else { throw new ExchangeException("getMarketPricesCompressed", pricesResp); } }