Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    how to create GTT OCO order

    Bugs
    0
    5
    60
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      balrajsand2002 last edited by

      Hi @admin
      How do i create a GTT rule for OCO order for example, Sell at target or sell at stoploss

      M 1 Reply Last reply Reply Quote 0
      • M
        Moderator_3 @balrajsand2002 last edited by Moderator_3

        Hi @balrajsand2002,

        POST: /rest/secure/angelbroking/gtt/v1/createRule

        Request Body :
        {
        "disclosedqty": 0,
        "exchange": "BSE",
        "gttType": "",
        "ltp": 0,
        "price": 0,
        "producttype": "CARRYFORWARD",
        "qty": 0,
        "stoplossprice": 0,
        "stoplosstriggerprice": 0,

        "symboltoken": "string",
        "timeperiod": 0,
        "tradingsymbol": "string",
        "transactiontype": "BUY",
        "triggerprice": 0
        }

        On above request pass OCO for gttType key and mandatory pass values for stoplossprice & stoplosstriggerprice.

        Thank You
        Smart API Team

        K 1 Reply Last reply Reply Quote 0
        • B
          balrajsand2002 last edited by

          @admin
          Thank you for the response ,
          But getting error while placing gtttype OCO
          sample request
          {
          tradingsymbol: 'symbol',
          symboltoken: 'token',
          exchange: 'NFO',
          qty: '15',
          producttype: 'CARRYFORWARD',
          transactiontype: 'SELL',
          price: 401,
          disclosedqty: '15',
          triggerprice: 400,
          timeperiod: 1,
          gttType: 'OCO',
          stoplossprice: 370,
          stoplosstriggerprice: 372
          }

          1 Reply Last reply Reply Quote 0
          • K
            kalavathi @Moderator_3 last edited by

            @Moderator_3
            Please share the parameters to create a GTT OCO order where I can mention the stoploss price and profit target price.

            The below order is manually created and I want to the same order to be created using API. This has both stoploss and target mentioned for OCO order.

            cbab6e0d-b895-404f-9448-6503488e6a95-image.png

            1 Reply Last reply Reply Quote 0
            • A
              anontrader last edited by

              What about the target price? This is only stoplossprice

              1 Reply Last reply Reply Quote 1
              • First post
                Last post