# C# sdk takeprofit order

**URL:** <https://forum.alpaca.markets/t/c-sdk-takeprofit-order/1389>\
**Category:** Alpaca Integration Applications\
**Created:** [May 7, 2020, 1:46am UTC](https://forum.alpaca.markets/t/c-sdk-takeprofit-order/1389 "2020-05-07T01:46:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_D](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/michael_d/32/727_2.png) [@Michael\_D](https://forum.alpaca.markets/u/Michael_D)\
**Post date:** [May 7, 2020, 1:46am UTC](https://forum.alpaca.markets/t/c-sdk-takeprofit-order/1389/1 "2020-05-07T01:46:43Z")

</div>

Hi there, i’m new to testing out this c# sdk and trying to test putting in a market order with a stoploss and a take profit amount all in one request, is this possible?

---

<div class="post-metadata">

**Author:** ![Michael\_D](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/michael_d/32/727_2.png) [@Michael\_D](https://forum.alpaca.markets/u/Michael_D)\
**Post date:** [May 10, 2020, 7:47pm UTC](https://forum.alpaca.markets/t/c-sdk-takeprofit-order/1389/2 "2020-05-10T19:47:31Z")

</div>

I’ve tried this way below by providing just the amount of the profit to take and it never closes out taking the profit. I’ve also tried adding 0.1M to the price value and that didnt work either. Does anyone know how to put in an order while supplying the profit amount to close out the order on and also a stop loss?

var order = await alpacaTradingClient.PostOrderAsync(  
new NewOrderRequest(  
symbol, quantity, side, OrderType.Limit, TimeInForce.Day)  
{  
LimitPrice = price,  
TakeProfitLimitPrice = 0.1M,  
StopLossStopPrice = 0.1M  
});

---

<div class="post-metadata">

**Author:** ![Michael\_D](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/michael_d/32/727_2.png) [@Michael\_D](https://forum.alpaca.markets/u/Michael_D)\
**Post date:** [May 14, 2020, 9:51pm UTC](https://forum.alpaca.markets/t/c-sdk-takeprofit-order/1389/3 "2020-05-14T21:51:15Z")

</div>

Solution was to include Bracket type as Bracket then it went through.

---

<div class="post-metadata">

**Author:** ![hitoshi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/hitoshi/32/69_2.png) [@hitoshi](https://forum.alpaca.markets/u/hitoshi)\
**Post date:** [May 19, 2020, 7:15pm UTC](https://forum.alpaca.markets/t/c-sdk-takeprofit-order/1389/4 "2020-05-19T19:15:15Z")

</div>

Glad to know it is resolved. We are going to add more code snippets in our docs.
