public HttpResponseMessage UpdateStaticData([FromBody] IEnumerable <IBStaticData> value) { try { if (!SQLQueryAccessor.UpdateIbStaticData(value)) { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "UpdateStaticData Failed")); } return(Request.CreateResponse(HttpStatusCode.OK, value)); } catch (Exception message) { return(Request.CreateResponse(HttpStatusCode.BadRequest)); } }
public HttpResponseMessage UpdateStrategy([FromBody] IBStrategyMapping value) { try { if (!SQLQueryAccessor.UpdateIbStrategyMapping(value)) { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "IBStrategymapping with Accountname: " + value.AccountName + ", TickerName: " + value.TickerName + " not found to update")); } return(Request.CreateResponse(HttpStatusCode.OK, value)); } catch { return(Request.CreateResponse(HttpStatusCode.BadRequest)); } }
public IEnumerable <Contract> GetIBSecurity() { var temp = SQLQueryAccessor.GetIbSecurities(); List <Contract> result = new List <Contract>(); foreach (var item in temp) { var contract = new Contract(); contract.Symbol = item.TickerName; contract.LocalSymbol = item.TickerName; contract.ConId = item.ConId; contract.PrimaryExch = item.Exchange; contract.SecType = "STK"; result.Add(contract); } return(result); }
public IEnumerable <IBStrategy> GetStrategy() { return(SQLQueryAccessor.GetIbStrategy()); }
public IEnumerable <IBStaticData> IBStaticData() => SQLQueryAccessor.GetIbStaticData();
public decimal CashBalanceStart() => SQLQueryAccessor.GetCashActivity(_ibcore._AccountName);