Exemple #1
0
        private void XApi_OnRspQryInstrument(object sender, ref XAPI.InstrumentField instrument, int size1, bool bIsLast)
        {
            if (onReturnInstrument == null)
            {
                return;
            }

            //TODO 这里连续查询两次会有问题,暂不处理
            instruments.Add(StructTransfer.TransferInstrumentInfo(instrument));
            if (bIsLast)// || instruments.Count == size1)
            {
                onReturnInstrument(sender, ref instruments);
                instruments.Clear();
            }
        }
        private void OnRspQryInstrument(object sender, ref InstrumentField instrument, int size1, bool bIsLast)
        {
            if (size1 > 0)
            {
                InstrumentInfoList.Add(new InstrumentInfo()
                {
                    Symbol = instrument.Symbol,
                    Instrument = instrument.InstrumentID,
                    Exchange = instrument.ExchangeID,
                    ProductID = instrument.ProductID,
                    TickSize = instrument.PriceTick,
                    Factor = instrument.VolumeMultiple
                });
            }

            this.bIsLast = bIsLast;
        }
Exemple #3
0
 static void OnRspQryInstrument(object sender, ref InstrumentField instrument, int size1, bool bIsLast)
 {
     Console.WriteLine(instrument.InstrumentName);
 }
Exemple #4
0
 static void OnRspQryInstrument(object sender, ref InstrumentField instrument,int size1, bool bIsLast)
 {
     Console.WriteLine(instrument.InstrumentName);
 }
Exemple #5
0
 public static string InstrumentName([In] this InstrumentField field)
 {
     return(PInvokeUtility.GetUnicodeString(field.InstrumentName));
 }