algo2t / alphatrade

Python APIs for SAS Online Alpha Trade Web platform for creating algo trading using python
https://algo2t.github.io/alphatrade
MIT License
45 stars 25 forks source link

Getting Error when placing order. #37

Open jayakarthik-devices opened 2 years ago

jayakarthik-devices commented 2 years ago

I am getting the below error message when trying to place order. Do anyone faced similar issue earlier and how to fix this issue.

{'status': 'error', 'message': ' is not supported in NFO segment.', 'data': {}}

Below is the script I used to place the order.

sas.place_order(transaction_type = 'BUY', instrument = sas.get_instrument_for_fno(symbol='NIFTY',\ expiry_date=datetime.date(int(2022),int(2),int(24)),\ is_fut=False,strike=17400,is_call=False), quantity = 50, order_type = 'LIMIT', product_type = 'D', price = 420.0, trigger_price = None, stop_loss = None, square_off = None, trailing_sl = None, is_amo = False)

@algo2t

algo2t commented 2 years ago

Are you trying to buy PE (put) ? Have you tried to change the product_type to different options like M for Margin

ramarajusk1308 commented 2 years ago

Got below exception while placing sell order : sas.place_order( transaction_type = 'Sell', instrument = n_call, quantity = quantity, order_type = 'StopLossLimit', product_type = 'D', price = entry_price, trigger_price = limit_price, stop_loss = None, square_off = None, trailing_sl = None, is_amo = False)

'str' object has no attribute 'value' Any idea how to resolve this ??