Trailing stop loss not working with API



  • Trailing sl option not working with the Curl option to put the order, a sample order given below

    curl
    -H 'Content-type: application/json'
    -H "authorization: Bearer ${Token}"
    -H "x-api-key: ${apikey}"
    -d '{"transaction_type":"s",
    "exchange":"NSE_EQ",
    "symbol": "TCS",
    "quantity":5,
    "order_type":"sl",
    "product": "oco",
    "trigger_price":2441,
    "price":2438,
    "stoploss":5,
    "squareoff":15,
    "trailing_ticks":20
    }'
    -X POST 'https://api.upstox.com/live/orders'

    The trade is getting executed after hitting the trigger the stoploss and targets are getting set at the right value, but the stoploss is not trailing.

    Iam i missing anything in the above request.


  • Global Moderator

    @vp81 Thanks for pointing out the issue. We've fixed it now. Please verify and reply if issue persists.


Log in to reply
 

Looks like your connection to Upstox Forum was lost, please wait while we try to reconnect.