async Task LaunchQuoteTask(OrderTask orderTask) { await orderTask.GetOffer(); quotedOrderTasks.Add(orderTask); await timerTask; LaunchAllPlacementTasks(); }
async Task LaunchPlacementTask(OrderTask orderTask, int amount) { await orderTask.PlaceOrder(amount); //update all order state vars lock (stores) { AmountQueued -= orderTask.AmountAttempted; if (orderTask.Success) { AmountAccumulated += orderTask.AmountAttempted; } Console.WriteLine($"Order finished: {orderTask}\t{ (orderTask.Success ? "SUCCESS" : "FAILED") }\tAccumulated:{AmountAccumulated}\tQueued:{AmountQueued}"); } LaunchAllPlacementTasks(); }