/// <summary> /// Request security definiton to capture the exchange point value for the contract. /// </summary> /// <param name="SecEx">Exchange</param> /// <param name="symbol">Exchange symbol for contract</param> /// <param name="secID">unique identifier supplied by the exchnage for this contract /// For eurex this is the ticker and expiration</param> public void ttSecurityDefinitionRequest(string SecEx, string symbol, string securityType, string securityID) { //It is recommended to include either a securityType or securityID; otherwise a very large list of //contracts will be retruned. try { QuickFix42.SecurityDefinitionRequest sdr = new QuickFix42.SecurityDefinitionRequest(); sdr.set(new QuickFix.SecurityReqID(uniqueID())); sdr.setField(new TT.RequestTickTable("Y")); sdr.set(new QuickFix.SecurityExchange(SecEx)); sdr.set(new QuickFix.Symbol(symbol)); if (securityType != null) { sdr.set(new QuickFix.SecurityType(securityType)); } if (securityID != null) { sdr.set(new QuickFix.SecurityID(securityID)); } QuickFix.Session.sendToTarget(sdr, priceSessionID); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
public SpreadMatrixData RequestSymbols(String exchange, String symbol) { QuickFix42.SecurityDefinitionRequest message = new QuickFix42.SecurityDefinitionRequest(new SecurityReqID(DateTime.Now.ToString()), new SecurityRequestType(SecurityRequestType.REQUEST_LIST_SECURITIES)); message.setField(new Symbol(symbol)); message.setField(new SecurityExchange(exchange)); message.setField(new BooleanField(17000, true)); try { if (Session.sendToTarget(message, GetPriceSession())) { SpreadMatrixCollection.Add(exchange, symbol); return SpreadMatrixCollection.Get(exchange, symbol); } else return null; } catch (SessionNotFound exception) { AddText(exception.Message + Environment.NewLine); throw; } }
public void RequestSymbols(SpreadMatrixData spreadMatrixData) { QuickFix42.SecurityDefinitionRequest message = new QuickFix42.SecurityDefinitionRequest(new SecurityReqID(DateTime.Now.ToString()), new SecurityRequestType(SecurityRequestType.REQUEST_LIST_SECURITIES)); message.setField(new Symbol(spreadMatrixData.Symbol)); message.setField(new SecurityExchange(spreadMatrixData.Exchange)); try { Session.sendToTarget(message, GetPriceSession()); } catch (SessionNotFound exception) { AddText(exception.Message + Environment.NewLine); throw; } }
public sealed override void onMessage(QuickFix42.SecurityDefinitionRequest message, SessionID session) { Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString()); }