# Bracket Order using .Net API

**URL:** <https://forum.alpaca.markets/t/bracket-order-using-net-api/2739>\
**Category:** Alpaca Trading\
**Created:** [September 22, 2020, 11:44am UTC](https://forum.alpaca.markets/t/bracket-order-using-net-api/2739 "2020-09-22T11:44:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre\_Fiorini](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/pierre_fiorini/32/214_2.png) [@Pierre\_Fiorini](https://forum.alpaca.markets/u/Pierre_Fiorini)\
**Post date:** [September 22, 2020, 11:44am UTC](https://forum.alpaca.markets/t/bracket-order-using-net-api/2739/1 "2020-09-22T11:44:58Z")

</div>

I’ve been trying to do a bracket order using [VB.Net](http://VB.Net). Here is what I have tried:

First, I submit an order (usually a market order)

Then what I want to do is after the market order fills, I want to put profit and stop loss orders on the trade.

Assuming I’ve put in the market order and it has gotten filled, I then try to submit a bracket order…

Here is the code:

```
        Dim order = Await client.PostOrderAsync(New NewOrderRequest(position.Symbol, position.Quantity, OrderSide.Sell, OrderType.Market, TimeInForce.Gtc) With
                                                {
                                                    .TakeProfitLimitPrice = TakeProfitLimitPrice,
                                                    .OrderClass = OrderClass.Bracket,
                                                    .StopLossStopPrice = StopLossStopPrice
                                                })

```

and the error I’m getting is:

“_stop price must not be less than base price \* 1.001_”

which I don’t understand because

TakeProfitLimitPrice = 465.0  
StopLossStopPrice = 418.5

which makes sense to me (similar to the one I do in TD Ameritrade…)

Thanks for any assistance…
