Navigation

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

    How to create GTT for option chart on expiry day

    General Discussion
    0
    3
    36
    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.
    • N
      N51542847 last edited by

      Hi @admin, Everyone,

      I have very interesting situation which thinking how to solve.

      I want to create GTT on expiry date of option chart.

      As per smart api doc , producttype has to CARRYFORWARD.

      So my question is - what value needs to define for timeperiod. I had tried 0(zero) but it is throwing error while GTT creation.

          gttCreateParams = {
              "tradingsymbol": 'BANKNIFTY31AUG2344400PE',
              "symboltoken": 60484,
              "exchange": 'NFO',
              "producttype": "CARRYFORWARD",
              "transactiontype": 'BUY',
              "price": 101,
              "qty": 15,
              "triggerprice": 100
              "timeperiod": 1
          }
          rule_id = obj.gttCreateRule(gttCreateParams)
      

      Any suggestion would be really appreciated.

      Thanks in advance!

      N 1 Reply Last reply Reply Quote 0
      • N
        N51542847 @N51542847 last edited by

        @admin , Can you please help on this.

        1 Reply Last reply Reply Quote 0
        • M
          Moderator_2 last edited by

          Hi @N51542847

          Apologies for delayed response.
          Timeperiod of GTT order for the NFO should be given as "Days of expiry contract subtracted with Current date"
          Kindly share us the API request and error response if issue still occurs.

          Thanks & Regards,
          SmartAPI team

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