# Getting error while placing order

**URL:** <https://community.aliceblueonline.com/t/getting-error-while-placing-order/9160>\
**Category:** API\
**Created:** [November 15, 2023, 4:39am UTC](https://community.aliceblueonline.com/t/getting-error-while-placing-order/9160 "2023-11-15T04:39:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pennytrader](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/pennytrader/32/3727_2.png) [@pennytrader](https://community.aliceblueonline.com/u/pennytrader)\
**Post date:** [November 15, 2023, 4:39am UTC](https://community.aliceblueonline.com/t/getting-error-while-placing-order/9160/1 "2023-11-15T04:39:30Z")

</div>

I am placing an alice blue order using placeOrder,

````auto
        order_id = alice.place_order(
            transaction_type=TransactionType.Buy if intraday_order['Trantype'] == 'B' else TransactionType.Sell,
            instrument=alice.get_instrument_by_symbol('NFO', intraday_order['Tsym']), 
            quantity=int(quantity),
            order_type = OrderType.Market if intraday_order['Prctype'] == 'MKT' else OrderType.Limit if intraday_order['Prctype'] == 'SL' else None,
            product_type=ProductType.Delivery,
            order_tag='trade_order'
        )```

But I am getting below error, 
Error placing delivery order: 'dict' object has no attribute 'exchange'

Please help if something has changed in the apis
````

---

<div class="post-metadata">

**Author:** ![Alavala7997](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@Alavala7997](https://community.aliceblueonline.com/u/Alavala7997)\
**Post date:** [November 23, 2023, 11:51am UTC](https://community.aliceblueonline.com/t/getting-error-while-placing-order/9160/2 "2023-11-23T11:51:27Z")

</div>

For the Python script kindly find the below links  
Kindly find our GitHub library in the given below link.

> **[GitHub - jerokpradeep/pya3](https://github.com/jerokpradeep/pya3)**
>
> Contribute to jerokpradeep/pya3 development by creating an account on GitHub.

Kindly find our YouTube tutorial in the given link below

[![](https://us1.discourse-cdn.com/flex015/uploads/aliceblueonline/original/2X/7/79938879829c17b490971465a3f30c2d3e564390.jpeg "NEW UPDATES IN ALICE BLUE PYTHON API.") ](https://www.youtube.com/watch?v=CQMneD9W7mQ&t=5s)

---

<div class="post-metadata">

**Author:** ![pennytrader](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/pennytrader/32/3727_2.png) [@pennytrader](https://community.aliceblueonline.com/u/pennytrader)\
**Post date:** [February 11, 2024, 7:55am UTC](https://community.aliceblueonline.com/t/getting-error-while-placing-order/9160/3 "2024-02-11T07:55:20Z")

</div>

```auto
> print(alice.get_trade_book())
> print(alice.get_instrument_for_fno(exch="NFO",symbol='BANKNIFTY', expiry_date="2024-02-14", is_fut=False,strike=45000, is_CE=True))

```

```auto
> 
> {'stat': 'Not_ok', 'emsg': '401 - Unauthorized', 'encKey': None}
> Instrument(exchange='NFO', token=46404, symbol='BANKNIFTY', name='BANKNIFTY14FEB24C45000', expiry='2024-02-14', lot_size=15)

```

I am not sure why get\_instrument\_from\_fno is working on Sunday, but get\_trade\_book, get\_scrip\_info are not working. This is happening quite frequently. Can you help understand this
