# OCO order error in C#

**URL:** <https://forum.alpaca.markets/t/oco-order-error-in-c/4252>\
**Category:** Alpaca Integration Applications\
**Created:** [February 3, 2021, 11:54pm UTC](https://forum.alpaca.markets/t/oco-order-error-in-c/4252 "2021-02-03T23:54:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mallik\_Nimmagadda](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/mallik_nimmagadda/32/1825_2.png) [@Mallik\_Nimmagadda](https://forum.alpaca.markets/u/Mallik_Nimmagadda)\
**Post date:** [February 3, 2021, 11:54pm UTC](https://forum.alpaca.markets/t/oco-order-error-in-c/4252/1 "2021-02-03T23:54:45Z")

</div>

I see the following exception with the following code using the C# SDK. My goal is to set a OCO sell order with a target, stop and stop limit. Any help is greatly appreciated.

## Code

await alpacaTradingClient.PostOrderAsync(OrderSide.Sell.Limit(positionInfo.ticker, positionInfo.quantity,  
target).WithDuration(TimeInForce.Day).OneCancelsOther(stop, limit));

* * *

Exception call stack

InvalidOperationException: The request message was already sent. Cannot send the same request message multiple times.  
at System.Net.Http.HttpClient.CheckRequestMessage(HttpRequestMessage request)  
at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)  
at Alpaca.Markets.HttpClientExtensions.d\_\_6.MoveNext()  
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at Alpaca.Markets.HttpClientExtensions.d\_\_4`2.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Alpaca.Markets.HttpClientExtensions.<callAndDeserializeAsync>d__3`3.MoveNext()  
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
