/// <summary>
        /// Initializes a new instance of the <see cref="CloseManyModel" /> class.
        /// </summary>
        /// <param name="symbol">symbol (required).</param>
        /// <param name="orderIds">orderIds (required).</param>
        /// <param name="requestId">requestId.</param>
        /// <param name="login">AccountNumber (required).</param>
        /// <param name="reality">Account LIVE or DEMO (required).</param>
        public CloseManyModel(string symbol = default(string), List <long> orderIds = default(List <long>), string requestId = default(string), long login = default(long), RealityEnum reality = default(RealityEnum))
        {
            // to ensure "symbol" is required (not null)
            if (symbol == null)
            {
                throw new InvalidDataException("symbol is a required property for CloseManyModel and cannot be null");
            }
            else
            {
                this.Symbol = symbol;
            }

            // to ensure "orderIds" is required (not null)
            if (orderIds == null)
            {
                throw new InvalidDataException("orderIds is a required property for CloseManyModel and cannot be null");
            }
            else
            {
                this.OrderIds = orderIds;
            }

            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for CloseManyModel and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Reality   = reality;
            this.RequestId = requestId;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="DeletePendingOrderModel" /> class.
        /// </summary>
        /// <param name="id">Id of coresponding order (required).</param>
        /// <param name="requestId">requestId.</param>
        /// <param name="login">AccountNumber (required).</param>
        /// <param name="reality">Account LIVE or DEMO (required).</param>
        public DeletePendingOrderModel(long id = default(long), string requestId = default(string), long login = default(long), RealityEnum reality = default(RealityEnum))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for DeletePendingOrderModel and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for DeletePendingOrderModel and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Reality   = reality;
            this.RequestId = requestId;
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CloseMarketOrderModel" /> class.
        /// </summary>
        /// <param name="id">Id of position beeing closed (required).</param>
        /// <param name="volume">Volume to close in specified position (required).</param>
        /// <param name="requestId">requestId.</param>
        /// <param name="login">AccountNumber (required).</param>
        /// <param name="reality">Account LIVE or DEMO (required).</param>
        public CloseMarketOrderModel(long id = default(long), double volume = default(double), string requestId = default(string), long login = default(long), RealityEnum reality = default(RealityEnum))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for CloseMarketOrderModel and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "volume" is required (not null)
            if (volume == null)
            {
                throw new InvalidDataException("volume is a required property for CloseMarketOrderModel and cannot be null");
            }
            else
            {
                this.Volume = volume;
            }

            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for CloseMarketOrderModel and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Reality   = reality;
            this.RequestId = requestId;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="GetHistoryOrdersModel" /> class.
        /// </summary>
        /// <param name="timeFrom">Milliseconds from unix epoch (required).</param>
        /// <param name="timeTo">timeTo (required).</param>
        /// <param name="login">AccountNumber (required).</param>
        /// <param name="reality">Account LIVE or DEMO (required).</param>
        public GetHistoryOrdersModel(long timeFrom = default(long), long timeTo = default(long), long login = default(long), RealityEnum reality = default(RealityEnum))
        {
            // to ensure "timeFrom" is required (not null)
            if (timeFrom == null)
            {
                throw new InvalidDataException("timeFrom is a required property for GetHistoryOrdersModel and cannot be null");
            }
            else
            {
                this.TimeFrom = timeFrom;
            }

            // to ensure "timeTo" is required (not null)
            if (timeTo == null)
            {
                throw new InvalidDataException("timeTo is a required property for GetHistoryOrdersModel and cannot be null");
            }
            else
            {
                this.TimeTo = timeTo;
            }

            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for GetHistoryOrdersModel and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Reality = reality;
        }
Example #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateOrderModel" /> class.
        /// </summary>
        /// <param name="id">Id of order beeing updated (required).</param>
        /// <param name="takeProfit">takeProfit.</param>
        /// <param name="stopLoss">stopLoss.</param>
        /// <param name="activationPrice">activationPrice.</param>
        /// <param name="expiryTime">expiryTime.</param>
        /// <param name="volume">Volume to close in the .</param>
        /// <param name="requestId">requestId.</param>
        /// <param name="login">AccountNumber (required).</param>
        /// <param name="reality">Account LIVE or DEMO (required).</param>
        public UpdateOrderModel(long id = default(long), double takeProfit = default(double), double stopLoss = default(double), double activationPrice = default(double), long expiryTime = default(long), double volume = default(double), string requestId = default(string), long login = default(long), RealityEnum reality = default(RealityEnum))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for UpdateOrderModel and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for UpdateOrderModel and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Reality         = reality;
            this.TakeProfit      = takeProfit;
            this.StopLoss        = stopLoss;
            this.ActivationPrice = activationPrice;
            this.ExpiryTime      = expiryTime;
            this.Volume          = volume;
            this.RequestId       = requestId;
        }
Example #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GetActiveOrdersModel" /> class.
        /// </summary>
        /// <param name="login">AccountNumber (required).</param>
        /// <param name="reality">Account LIVE or DEMO (required).</param>
        public GetActiveOrdersModel(long login = default(long), RealityEnum reality = default(RealityEnum))
        {
            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for GetActiveOrdersModel and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Reality = reality;
        }
Example #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenPendingOrderModel" /> class.
        /// </summary>
        /// <param name="activationPrice">Stop price - when this order is activated (required).</param>
        /// <param name="expiryTime">Miliseconds from unix epoch. Order is canceled at this time if it has not been activated yet.</param>
        /// <param name="symbol">symbol (required).</param>
        /// <param name="volume">volume (required).</param>
        /// <param name="takeProfit">takeProfit.</param>
        /// <param name="stopLoss">stopLoss.</param>
        /// <param name="side">side (required).</param>
        /// <param name="requestId">Client defined requestId. Server wiil populate this id in response and trade events..</param>
        /// <param name="login">Corseponding Account (required).</param>
        /// <param name="reality">Account LIVE or DEMO (required).</param>
        public OpenPendingOrderModel(double activationPrice = default(double), long expiryTime = default(long), string symbol = default(string), double volume = default(double), double takeProfit = default(double), double stopLoss = default(double), Side side = default(Side), string requestId = default(string), int login = default(int), RealityEnum reality = default(RealityEnum))
        {
            // to ensure "activationPrice" is required (not null)
            if (activationPrice == null)
            {
                throw new InvalidDataException("activationPrice is a required property for OpenPendingOrderModel and cannot be null");
            }
            else
            {
                this.ActivationPrice = activationPrice;
            }

            // to ensure "symbol" is required (not null)
            if (symbol == null)
            {
                throw new InvalidDataException("symbol is a required property for OpenPendingOrderModel and cannot be null");
            }
            else
            {
                this.Symbol = symbol;
            }

            // to ensure "volume" is required (not null)
            if (volume == null)
            {
                throw new InvalidDataException("volume is a required property for OpenPendingOrderModel and cannot be null");
            }
            else
            {
                this.Volume = volume;
            }

            this.Side = side;
            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for OpenPendingOrderModel and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Reality    = reality;
            this.ExpiryTime = expiryTime;
            this.TakeProfit = takeProfit;
            this.StopLoss   = stopLoss;
            this.RequestId  = requestId;
        }