I agree it should give orders with the right API and we sell orders when in profit, but I am seeing an issue you can correct if my understanding is wrong. I have BSOFT in my holdings and orders. Below is my point:- a) I bought BSOFT in the morning and I sold for example BSOFT today in profit of Rs.4, the same orders I bought in the morning b) but Positions tab in the APP shows "Sold HOLDING" of BSOFT c) Next day when I check my profit it shows BSOFT is loss since you sold BSOFT from your holdings (not your orders). I am seeing this issue second time. d) My sale of holdings I have put on hold (via API), hence this never gets executed.
How do I resolve this., I see it is an API issue.
Also if for that Order ID I have sold it should get rejected by the exchange. Rather it is selling from Holding which is not correct. Keep me posted.
TEAM PLEASE NOTE I HAVE NOT DONE ANY SHORT SELLING OR NEITHER I HAVE SOLD ANY STOCKS FROM MY HOLDINGS (EITHER MANUALLY OR VIA API). PLEASE DONT CLOSE THIS TICKET IN A HURRY.
KiteConnect just displays the data on Kite.
Rakesh Sir has already responded to your query.
If you want more clarification regarding this query or other non-technical queries, contact support team as told by Rakesh Sir.
This is not the forum for non-technical queries.
You have to contact Zerodha support team for these queries:
Now, don't create duplicate threads multiple times.
OrderParams orderParams = new OrderParams();
orderParams.quantity = iquanity;
orderParams.orderType = Constants.ORDER_TYPE_LIMIT;
orderParams.tradingsymbol = strRemoveExchangeInfo;
orderParams.product = Constants.PRODUCT_CNC;
orderParams.exchange = Constants.EXCHANGE_NSE;
orderParams.transactionType = Constants.TRANSACTION_TYPE_SELL;
orderParams.validity = Constants.VALIDITY_DAY;
orderParams.price = d_price;
orderParams.triggerPrice = 0.0;
orderParams.tag = strtag; //tag is optional and it cannot be more than 8 characters and only alphanumeric is allowed
System.out.println("The placeSellOrders Step 2 " );
order = kiteSdk.placeOrder(orderParams, Constants.VARIETY_REGULAR);
//logger.writeToRandomFile("placeSellOrders method place orders done");
Holdings API is not used for selling the shares.
Holdings API is just to view the holdings.
And what do you mean by using the order_id when selling??
You don't give any order_id in the place order request.
You really need to get a understanding of how these things work.
If you want to do intraday trading in stocks,you have to use MIS product_type.
Using CNC to sell will debit the shares from your holdings as Sujith Sir told above.
The same was mentioned in the support article I provided you in your previous thread regarding this same query :
Try to sell a stock which you don't have in your demat as CNC and read the error message,and you will understand.
Still,if you can't understand ,refer the support team.
The API just places orders like you do on Kite web/app.
If the API is not working or other technical issues with KiteConnect APIs, write on this forum.
For queries not related to KiteConnect APIs,you have to write to Zerodha support.
Even after telling multiple times,you keep spamming the same thing again and again.
Also, there is a option of editing your comments. Use that. Don't post the same comment multiple times by just adding one extra line in the comment.
This is really confusing.
a) You can very much sell shares in the APP which you bought in the morning, open the positions tab in the app and sell for the day from that tab (not holdings tab the CNC orders) , even if it is not an MIS order. So why are you saying it cannot be done? Please check the APP again even if not MIS orders.
b) I can get all orders which I got for that day and use that Order ID in place orders as below
Then what is this below in PlaceOrders :-
orderParams.tag = strtag;
I am passing order ID which I got from getOrders to the placeorders as above also Tag passed. Also passing same Strtag got form orders to placeorders.
You should use MIS,which literally means Margin Intraday Squareoff.
This product has been made for intraday trading.
If you use CNC,you will get a 'HOLDING'tag in the position,which is happening with you,and is mentioned in the support article provided to you previously.
So,I think that's where the problem is.
b. Please read the documentation properly:
Parent order id is used only for multi legged orders,i.e Cover Orders.
Tags are just to filter orders. The tag you send with an order cannot be linked to any other order.
This is why it's confirmed beforehand by the Zerodha KiteConnect Team ,that the user has understood the documentation properly before using the KiteConnect APIs.
c. The orderbook API is just used to view the orders placed on that trading day.
The attributes of one order do not have any link to attributes of another order unless they are multi-legged like CO.
This forum is not for queries non-related to KiteConnect APIs.
Even if there is an issue, it's certainly not an issue of the place order API.
If you're not convinced,why are you so hesitant of talking to the support team??
They would solve your query very easily.
Please, don't increase the length of this thread unnecessarily.