public static TimeSpan EnterTime(this InstrumentStatusField field)
        {
            var hh = field.EnterTime / 10000;
            var mm = field.EnterTime % 10000 / 100;
            var ss = field.EnterTime % 100;

            return(new TimeSpan(hh, mm, ss));
        }
Example #2
0
        public static InstrumentStatusField GetInstrumentStatus(CtpInstrumentStatus status)
        {
            var field = new InstrumentStatusField();

            field.Status       = GetInstrumentStatusType(status.InstrumentStatus);
            field.EnterReason  = GetEnterReasonType(status.EnterReason);
            field.EnterTime    = GetTime(status.EnterTime);
            field.InstrumentID = status.InstrumentID;
            field.ExchangeID   = status.ExchangeID;
            return(field);
        }
Example #3
0
 void IXSpi.ProcessRtnInstrumentStatus(InstrumentStatusField status)
 {
     InstrumentStatusChanged?.Invoke(this, status);
 }