# Bracket Order - Not Ok Error

**URL:** https://community.aliceblueonline.com/t/bracket-order-not-ok-error/8716
**Category:** API
**Created:** [October 17, 2023, 9:00am UTC](https://community.aliceblueonline.com/t/bracket-order-not-ok-error/8716 "2023-10-17T09:00:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![priteshmhatre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/priteshmhatre/32/3456_2.png) [@priteshmhatre](https://community.aliceblueonline.com/u/priteshmhatre)
#### Post date: [October 17, 2023, 9:00am UTC](https://community.aliceblueonline.com/t/bracket-order-not-ok-error/8716/1 "2023-10-17T09:00:48Z")

</div>

I am trying to place a Stoploss Bracket Order via api similar to the one shown below:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/aliceblueonline/original/2X/0/0bc8a91687f8810f6e3b1d28379531ec3c4bcace.png)

Here’s my request json:

```auto
[
    {
        "discqty": "0",
        "trading_symbol": "ICICIBANK-EQ",
        "exch": "NSE",
        "transtype": "BUY",
        "ret": "DAY",
        "prctyp": "SL",
        "qty": "1",
        "price": "955.5",
        "pCode": "BO",
        "symbol_id": "4963",
        "target": "5.0",
        "stopLoss": "5.0",
        "trailing_stop_loss": "0.0",
        "complexty": "BO",
        "trigPrice": "955.0",
        "orderTag": "Stocks Developer"
    }
]

```

Here’s the response:

```auto
[
    {
        "stat": "Not_Ok",
        "NOrdNo": null
    }
]

```

Could you please identify what I am doing wrong here?

---

<div class="post-metadata">

### Author: ![priteshmhatre](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/priteshmhatre/32/3456_2.png) [@priteshmhatre](https://community.aliceblueonline.com/u/priteshmhatre)
#### Post date: [October 17, 2023, 9:09am UTC](https://community.aliceblueonline.com/t/bracket-order-not-ok-error/8716/2 "2023-10-17T09:09:42Z")

</div>

> [@priteshmhatre](#):
>
> ```auto
> [
> {
> "discqty": "0",
> "trading_symbol": "ICICIBANK-EQ",
> "exch": "NSE",
> "transtype": "BUY",
> "ret": "DAY",
> "prctyp": "SL",
> "qty": "1",
> "price": "955.5",
> "pCode": "BO",
> "symbol_id": "4963",
> "target": "5.0",
> "stopLoss": "5.0",
> "trailing_stop_loss": "0.0",
> "complexty": "BO",
> "trigPrice": "955.0",
> "orderTag": "Stocks Developer"
> }
> ]
> 
> ```

**Note:**  
This is likely due to pCode being passed as **BO** , when I passed it as **MIS** then it worked.

Maybe you would want to update the docs?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/aliceblueonline/original/2X/b/b6a2d21fa65e2a8a3752d359c9435fc13fb60cb0.png)

---

<div class="post-metadata">

### Author: ![Shivaraman\_Arumugam](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@Shivaraman\_Arumugam](https://community.aliceblueonline.com/u/Shivaraman_Arumugam)
#### Post date: [October 19, 2023, 4:34am UTC](https://community.aliceblueonline.com/t/bracket-order-not-ok-error/8716/3 "2023-10-19T04:34:20Z")

</div>

[“pCode”: “BO”] Instead of BO kindly use NRML, CNC, or MIS, find the below image for your reference

 ![image](https://us1.discourse-cdn.com/flex015/uploads/aliceblueonline/original/2X/9/987ea865e9e561d7d3b427b97770573d3c8b6f5b.png)
