Example #1
0
        Task <TradeTransResponsePacket> ITradeProvider.CloseOrder(int orderId, double volume)
        {
            var reqId  = GetReqId();
            var packet = new TradeTransRequestPacket(reqId, 0, TransactionType.OrderClose,
                                                     0, 0, 0, "", volume, orderId, string.Empty, new DateTime(1970, 1, 1));

            var task = EnqueueTcs <TradeTransResponsePacket>(reqId);

            apiConnection.SendPacket(packet);

            return(task);
        }