-
Notifications
You must be signed in to change notification settings - Fork 72
3. Order Examples
Order limitBuyOrder = new Order { IsBuy = true, OrderId = 1, OpenQuantity = 1000, Price = 10 };
Order limitSellOrder = new Order { IsBuy = false, OrderId = 2, OpenQuantity = 1000, Price = 10 };
Above orders are willing to buy/sell 1000 shares at price of 10.
Order stopLimitBuy = new Order { IsBuy = true, OpenQuantity = 1000, Price = 11, OrderId = 1, StopPrice = 10 };
Above order are willing to buy 1000 share after price goes above $10.00 and he is willing to pay $11.00 per share
Order stopLimitSell = new Order { IsBuy = false, OpenQuantity = 1000, Price = 8, OrderId = 1, StopPrice = 9 };
Above order are willing to sell 1000 share after price goes below $9.00 and he is willing to accept $8.00 per share.
Order marketSell = new Order { IsBuy = false, OpenQuantity = 500, Price = 0, OrderId = 2 };
Above order is willing to sell 500 share at any price at the moment.
Order marketBuy = new Order { IsBuy = true, OpenQuantity = 500, Price = 0, OrderId = 2 };
Above order is willing to buy 500 share at any price at the moment.
Order marketBuy = new Order { IsBuy = true, Price = 0, OrderId = 5, OrderAmount = 5000 };
Above order is willing to any quantity of shares at any price but amount should be less than 5000.
Order stopMarketSell = new Order { IsBuy = false, OpenQuantity = 500, Price = 0, OrderId = 3, StopPrice = 9 };
Above order will triggered when price goes below $9.00 and will sell 500 shares at any price.
Order stopMarketBuy = new Order { IsBuy = true, OpenQuantity = 500, Price = 0, OrderId = 3, StopPrice = 10 };
Above order will triggered when price goes above $10.00 and will buy 500 shares at any price.
Order stopMarketBuy = new Order { IsBuy = true, Price = 0, OrderId = 3, StopPrice = 11, OrderAmount = 5500 };
Above order will triggered when price goes above $11.00 and will buy shares of worth $5500.
Order order = new Order { IsBuy = false, OpenQuantity = 500, Price = 10, OrderId = 1, TipQuantity = 500, TotalQuantity = 5000 };
above order is willing to sell 5000 share at price $10.00 but order will add tip of 500 share only. only 500 share will be visible on order book.
Order gtdOrder = new Order { IsBuy = true, OpenQuantity = 500, Price = 10, OrderId = 1, CancelOn = 1 };
Above order will be automatically cancelled on 1 Jan 1970 UTC. Orders can be cancelled manually before CancelOn time.
Order iocOrder = new Order { IsBuy = true, OpenQuantity = 1500, Price = 10, OrderId = 2, OrderCondition = OrderCondition.ImmediateOrCancel };
MatchingEngine will match what ever possible and cancel remaining quantity.
Order bocOrder = new Order { IsBuy = true, OpenQuantity = 500, Price = 10, OrderId = 2, OrderCondition = OrderCondition.BookOrCancel };