Shoonya-Dev / ShoonyaApi-py

141 stars 133 forks source link

After last weekend, On place_order api call throws error code 400 #169

Closed webalgotrader closed 2 weeks ago

webalgotrader commented 2 months ago

On place_order api call throws error code 400, with response as invalid trans_type.

On further digging figured out that trans_type, which gets it value from buy_or_sell parameter, till last weekend used to work with "BUY" or "SELL".

Now, I feel the expected value is "B" or "S".

It is requested that the existing functionality may be kept on i.e. "BUY" or "SELL" also may be considered as a valid value for buy_or_sell parameter of api.place_order.

bhushannsolanke commented 2 months ago

were you able to solve it? facing same issue since then

SHIVANIUM-GIT commented 1 month ago

can you provide the code @webalgotrader @bhushannsolanke

SHIVANIUM-GIT commented 1 month ago

you have to do this

ret = api.place_order(
            buy_or_sell="S",
            product_type="I",
            exchange="NFO",
            tradingsymbol=Strike,
            quantity=LOTSIZE,
            discloseqty=0,
            price_type="LMT",
            price=SL_point,
            trigger_price=SL_point,
            retention="DAY",
            remarks="order_sl",
        )