Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. Categories
    3. Python SDK
    Log in to post

    Python SDK

    • Mnagesh

      List of all Smartapi functions in Python
      • Mnagesh  

      9
      1
      Votes
      9
      Posts
      1113
      Views

      M

      how does one get the list of all outstanding gtts in the account. the following is retuning no data while there are actually gtts outstanding in the account smart_api = SmartConnect(api_key=api_key) # Login try: data = smart_api.generateSession(client_code, pwd, totp) print("Login response:", json.dumps(data, indent=2)) if data.get('status'): print("Login successful") auth_token = data['data']['jwtToken'] refresh_token = data['data']['refreshToken'] feed_token = smart_api.getfeedToken() print("Feed token:", feed_token) else: print("Login failed:", data.get('message')) return None except Exception as e: print(f"Login error: {str(e)}") return None # Get the list of GTTs try: # Use the correct method: gttLists gtt_list = smart_api.gttLists(status=['ACTIVE'], page=1, count=10) print("Raw GTT response:", json.dumps(gtt_list, indent=2)) if isinstance(gtt_list, dict): if 'status' in gtt_list: print(f"API Status: {gtt_list['status']}") if 'message' in gtt_list: print(f"API Message: {gtt_list['message']}") if 'errorcode' in gtt_list: print(f"API Error Code: {gtt_list['errorcode']}") return gtt_list except Exception as e: print(f"An error occurred while fetching GTT orders: {str(e)}") return None
    • R

      Difference between status and orderstatus
      • rajanprabu  

      5
      -1
      Votes
      5
      Posts
      481
      Views

      PandaTrade

      yes good info. Returning to the forum after 2 years just to get this answer.
    • N

      Error while placing an order through API.
      • Nichil72  

      2
      0
      Votes
      2
      Posts
      47
      Views

      No one has replied

    • H

      OHL of Index
      • hardip  

      3
      0
      Votes
      3
      Posts
      46
      Views

      H

      @admin {'26000': {'High': 0.0, 'Low': 0.0, 'Open': 0.0, 'close': 24334.2, 'ltp': 24346.7, 'Bid': 0.0, 'Ask': 0.0}, '26009': {'High': 0.0, 'Low': 0.0, 'Open': 0.0, 'close': 55087.15, 'ltp': 55115.35, 'Bid': 0.0, 'Ask': 0.0}, '38608': {'High': 319.9, 'Low': 92.5, 'Open': 180.9, 'close': 180.25, 'ltp': 96.1, 'Bid': 96.2, 'Ask': 97.25}, '58549': {'High': 1981.3, 'Low': 1428.0, 'Open': 1599.95, 'close': 1552.75, 'ltp': 1458.15, 'Bid': 1458.25, 'Ask': 1465.0}, '57130': {'High': 55929.0, 'Low': 55073.6, 'Open': 55250.2, 'close': 55241.8, 'ltp': 55191.8, 'Bid': 55191.8, 'Ask': 55195.0}, '38610': {'High': 284.0, 'Low': 75.6, 'Open': 146.0, 'close': 156.85, 'ltp': 79.25, 'Bid': 78.35, 'Ask': 78.95}, '120151': {'High': 19.4, 'Low': 13.1, 'Open': 14.15, 'close': 13.45, 'ltp': 17.65, 'Bid': 17.45, 'Ask': 17.65}, '57133': {'High': 24718.3, 'Low': 24310.0, 'Open': 24399.9, 'close': 24418.4, 'ltp': 24395.1, 'Bid': 24394.2, 'Ask': 24395.1}, '38603': {'High': 234.0, 'Low': 83.8, 'Open': 234.0, 'close': 217.45, 'ltp': 148.4, 'Bid': 148.4, 'Ask': 150.15}, '58539': {'High': 705.15, 'Low': 446.1, 'Open': 680.0, 'close': 658.15, 'ltp': 618.0, 'Bid': 618.0, 'Ask': 620.0}}
    • K

      Data from websocket python
      • kunal28  

      1
      0
      Votes
      1
      Posts
      20
      Views

      No one has replied

    • K

      Smart API Login issue" or "Not able to login
      • kksw599  

      3
      0
      Votes
      3
      Posts
      8
      Views

      M

      Yes facing similar issue
    • P

      Not revising STOPLOSS order in ROBO Trade - ModifyOrder
      • Poonam Tomar  

      5
      0
      Votes
      5
      Posts
      26
      Views

      N

      @Poonam-Tomar Hi Poonam will you please share the exact script which you passed to trigger ROBO order. They Angel SmartAPI people will not providing the proper solution, always they are sharing the reference links which was not helpful for this. Or mailed me at Nichil72@gmail.com for this I am very grateful to you.
    • T

      What is wrong with this order? Says Invalid token
      • TalkingTree12  

      2
      0
      Votes
      2
      Posts
      6
      Views

      A

      @TalkingTree12 there could be a login issue in your code.
    • B

      OCO gtt order
      • baloda  

      4
      0
      Votes
      4
      Posts
      42
      Views

      T

      @mkushe There is half baked API in Java in AngelOne API which do not allow to set stop loss and target triggers (Which is the purpose of the GTT). I can't see how it works even after studying the documentation and the poor code snippet shared in above link.
    • P

      getMargin function is not considering active positions for margin calculations
      • projectSB  

      1
      0
      Votes
      1
      Posts
      13
      Views

      No one has replied

    • Y

      Access denied because of exceeding access limits
      • Y15996  

      2
      0
      Votes
      2
      Posts
      15
      Views

      A

      @Y15996 the error comes when you exceed the rate limit while sending requests.
    • A

      Couldn't parse the JSON response received from the server: {content}".format( smartapi.smartExceptions.DataException: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate while checking price
      • akashdhage  

      2
      0
      Votes
      2
      Posts
      8
      Views

      A

      @akashdhage the error comes when you exceed the rate limit while sending requests.
    • A

      NIFTY FUTURE DATA
      • AGARWALRAMNEEK2  

      2
      0
      Votes
      2
      Posts
      5
      Views

      A

      @AGARWALRAMNEEK2 you can get the historical data of a particular option contract only. ie. if a contract started in march, you will not get the historical data of same strike price contract for feb.
    • S

      Getting error when Place MCX Limit Order
      • Sahil  

      2
      0
      Votes
      2
      Posts
      4
      Views

      A

      @Sahil the issue is resolved, you can try again now.
    • H

      AMO order
      • hardip  

      4
      0
      Votes
      4
      Posts
      36
      Views

      A

      @hardip value should be 'NORMAL'
    • C

      Getting error AB4036
      • chiraggarg1702  

      2
      0
      Votes
      2
      Posts
      8
      Views

      A

      @chiraggarg1702 please go through this post for the same. https://smartapi.angelbroking.com/topic/5084/blocking-of-equity-scrips-falling-under-surveillance-measures-from-placeorder-api-from-friday-24th-jan-after-market-hours
    • H

      "Couldn't parse the JSON response received from the server: b''"
      • H53749929  

      2
      0
      Votes
      2
      Posts
      6
      Views

      A

      @H53749929 request you to take help from the users on the forum or through freelance programmers for the same. The API is working fine.
    • G

      Unable to Fetch LTP & Historical Data for NIFTY 50 & Other Indices via Angel One API
      • gulshan  

      2
      0
      Votes
      2
      Posts
      12
      Views

      A

      @gulshan the day you are searching for is a Saturday, since no trades happen on Saturday, the response is blank.
    • A

      Auto stop lass ofter manuval buy order
      • amalli1947  

      1
      0
      Votes
      1
      Posts
      4
      Views

      No one has replied

    • A

      Error Regarding JSONDecoderError
      • aniket  

      1
      0
      Votes
      1
      Posts
      1
      Views

      No one has replied