Working program from scratch excluding strategy -

ZI4453
Hello Team - After generating "access_token" should we execute the strategies in ws.py (file where ws data is requested and processed)?

our sample program is divided into two, one for getting access_token+placing orders and other for reading ws data... Someone please help me with working sample program excluding your strategy ...
I would like to see a working program from scratch ...
Also i have difficulties in coding buy and sell orders for every scrip.. is there better way to reduce codng lines ? i am not abel to call "place_order() from lookup values...
  • rakeshr
    @ZI4453
    You can go through this documentation to see order placement and WebSocket sample code.
  • ZI4453
    @rakeshr , I am not sure how you closed my post without confirming what i was trying to ask ..when i purchased a scrip under "Delivery" thats supposed to be there in my Demat for me to sell, since i am selling on same day _ how can i sell a scrip which is not in Demat for the day ?

    -Documentaion part :
  • rakeshr
    @ZI4453
    Yes, you can sell CNC scrip in intraday as well.Go through this thread.
    For all non-API related query, you need to ask it here.
  • ZI4453
    @rakeshr,
    https://tradingqna.com/t/buying-and-selling-on-the-same-day-with-cnc-mode/16294/2

    Above answer was what i was asking about.Reply states clearly that i cannot sell a CNC on same day since stock is not available in my account yet.
    I believe i am asking right questions in right forum,
    i want to know how(should it be MIS or CNC ) to buy and sell on same day(if i dont sell on same day i will carry it for tomorrow) without any leverage using API...

    if i buy a scrip in MIS(without margins) i can sell it on same day without any issues .Incase if i dont sell will this get squared off manually(i.e how to convert MIS to CNC orders) & attract charges (square off charges) ?
    Ideally square off is for closing positions, since i did not take any margin how is this going squared off?
  • themohammedfaisal
    themohammedfaisal edited July 29
    @ZI4453, you can buy and sell using CNC during the day without utilizing the additional margins offered under MIS. What the TradingQ&A post says is that you cannot short sell stocks using CNC. You can only short sell using MIS and square it off before market close.
    how to convert MIS to CNC orders
    Documentation
Sign In or Register to comment.