@admin Thank you so much Yatish for your help. It is working now.
D
darshan
@darshan
0
Reputation
25
Posts
1
Profile views
0
Followers
0
Following
Best posts made by darshan
This user hasn't posted anything yet.
Latest posts made by darshan
-
RE: sell order not posted
-
Sell order not working
Request
orderparams = { "variety":"NORMAL", "tradingsymbol":"NHPC-EQ", "symboltoken":"17400", "transactiontype":"SELL", "exchange":"NSE", "ordertype":"LIMIT", "producttype":"INTRADAY", "duration":"DAY", "price":"26.40", "squareoff":"0", "stoploss":"0", "quantity":"1" } orderresponse = obj.modifyOrder(orderparams) return orderresponse
Response -
{'message': 'Internal Error', 'errorcode': 'AB2001', 'status': False, 'data': None}
-
RE: Modify order for sell
@admin Request - from smartapi import SmartConnect exchange = "NSE" tradingsymbol = "NHPC-EQ" symboltoken = "17400" variety = "NORMAL" ordertype = "LIMIT" producttype = "INTRADAY" duration = "DAY" squareoff = "0" stoploss = "0" quantity = 1 def selling(current_price, orderid): orderparams = { "variety": variety, "orderid": orderid, "ordertype": ordertype, "producttype": producttype, "transactiontype": "SELL", "duration": duration, "price": current_price, "quantity": quantity, "tradingsymbol": tradingsymbol, "symboltoken": symboltoken, "exchange": exchange } orderresponse = obj.modifyOrder(orderparams) return orderresponse data = obj.ltpData(exchange, tradingsymbol, symboltoken) current_price = data['data']['ltp'] orderid = '210823000463560' orderresponse = selling(current_price, orderid) print("Selling order response: {}".format(orderresponse)) * Response -
Selling order response: {'status': True, 'message': 'SUCCESS', 'errorcode': '', 'data': {'orderid': '210823000463560'}}
-
RE: Modify order for sell
@darshan Sell order is not posting on exchange. Can someone please help