예제 #1
0
 IOrderLogMarketDepthBuilder IMessageAdapter.CreateOrderLogMarketDepthBuilder(SecurityId securityId)
 {
     return(InnerAdapter.CreateOrderLogMarketDepthBuilder(securityId));
 }
예제 #2
0
 /// <summary>
 /// Create market depth builder.
 /// </summary>
 /// <param name="securityId">Security ID.</param>
 /// <returns>Order log to market depth builder.</returns>
 public virtual IOrderLogMarketDepthBuilder CreateOrderLogMarketDepthBuilder(SecurityId securityId)
 {
     throw new NotSupportedException();
 }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PositionChangeMessage"/>.
        /// </summary>
        /// <param name="adapter">Trading system adapter.</param>
        /// <param name="pfName">Portfolio name.</param>
        /// <param name="securityId">Security ID.</param>
        /// <returns>Position change message.</returns>
        public static PositionChangeMessage CreatePositionChangeMessage(this IMessageAdapter adapter, string pfName, SecurityId securityId)
        {
            if (adapter == null)
            {
                throw new ArgumentNullException(nameof(adapter));
            }

            var time = adapter.CurrentTime;

            return(new PositionChangeMessage
            {
                PortfolioName = pfName,
                SecurityId = securityId,
                LocalTime = time,
                ServerTime = time,
            });
        }
예제 #4
0
 /// <summary>
 /// Initialize a new message <see cref="SecurityMessage"/> and pass it to the method <see cref="SendOutMessage"/>.
 /// </summary>
 /// <param name="securityId">Security ID.</param>
 protected void SendOutSecurityMessage(SecurityId securityId)
 {
     SendOutMessage(new SecurityMessage {
         SecurityId = securityId
     });
 }