Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. HawkEye
    3. Posts
    H
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 19
    • Best 0
    • Groups 0

    Posts made by HawkEye

    • Live feed disconnecting

      The live feed is automatically getting disconnected after sometime and need to restart manually again.
      Error:
      Error info: [WinError 10053] An established connection was aborted by the software in your host machine
      [WinError 10053] An established connection was aborted by the software in your host machine
      Error info: __on_close() takes 2 positional arguments but 4 were given
      __on_close() takes 2 positional arguments but 4 were given
      Error info: __on_close() takes 2 positional arguments but 4 were given
      __on_close() takes 2 positional arguments but 4 were given

      Any rate limits or something else that need to be addressed?

      posted in Python SDK
      H
      HawkEye
    • RE: Order Failing intermittently

      @admin This issue happens when placing order in a loop. Only the first one succeeds and next fails. The rate limit is 10 requests per second and I am sure I don't exceed more than 2-3 calls per second.

      posted in Python SDK
      H
      HawkEye
    • Order Failing intermittently

      Requirement:
      GLAND - BUY at 3953.20 with Stop Loss: 3940.5 and Target: 3978.6 on 06-01 10:20

      {
      'variety': 'ROBO', 
      'tradingsymbol': 'GLAND-EQ', 
      'symboltoken': '1186', 
      'transactiontype': 'BUY', 
      'exchange': 'NSE', 
      'ordertype': 'LIMIT', 
      'producttype': 'BO', 
      'duration': 'DAY', 
      'price': 3953.2, 
      'squareoff': 25.4, 
      'stoploss': 12.7, 
      'quantity': 10
      }
      

      The order id is: 220106001156452
      Result:
      92a1edf9-056e-402b-8718-198d32c3f320-image.png

      posted in Python SDK
      H
      HawkEye
    • RE: Limit, target & trigger price are all wrong

      @admin
      At what price will the stoploss get triggered in this case - trigger price - which may be somewhat closer to my expectation
      If it is the SL price mentioned though - it will be bankruptcy

      posted in Python SDK
      H
      HawkEye
    • RE: Limit, target & trigger price are all wrong

      @admin
      I get an order id.
      In this case order id: 211123000952675

      posted in Python SDK
      H
      HawkEye
    • Limit, target & trigger price are all wrong

      @admin
      Following is my order:

      {
         'variety': 'ROBO', 
         'tradingsymbol': 'BRITANNIA-EQ', 
         'symboltoken': '547', 
         'transactiontype': 'BUY', 
         'exchange': 'NSE', 
         'ordertype': 'LIMIT', 
         'producttype': 'BO', 
         'duration': 'DAY', 
         'price': 3638.7, 
         'squareoff': 94.44, 
         'stoploss': 37.38, 
         'quantity': 10
      }
      

      The order id is: 211123000952675

      Expectation:
      BUY at 3638.7 with Stop Loss: 3601.32 and Target: 3733.14

      Actual:
      BUY at 3638.8 with Stop Loss: (SL LIMIT 3,527.80/3,599.45) and Target: (LIMIT 3,731.20)

      Where am I going wrong?

      posted in Python SDK
      H
      HawkEye
    • Historical APIs not working now

      @admin
      Historical APIs are not working and is giving the following error:

      ReadTimeout: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Read timed out. (read timeout=7)
      

      Kindly fix this asap

      posted in Python SDK
      H
      HawkEye
    • RE: ROBO order for Bank Nifty Options

      @SK said in ROBO order for Bank Nifty Options:

      BANKNIFTY11NOV2139400CE

      Can you try

      "exchange" : "NFO"
      

      Also the "squareoff" need to be in points rather than absolute.
      I am still getting my head around Stop loss

      posted in Python SDK
      H
      HawkEye
    • RE: setting SL and trigger Price

      @admin
      What should be the values for "stoploss" and "triggerprice" for a call:
      SELL at 630.45 with Stop Loss: 634.3 and stop loss trigger price 634.2

      posted in Python SDK
      H
      HawkEye
    • RE: Order Id is none but Pending Order shows quantity as infinity and symbols as NSE

      @admin
      Client Code: S920814

      Please cancel the order if it's actually pending

      posted in Python SDK
      H
      HawkEye
    • Order Id is none but Pending Order shows quantity as infinity and symbols as NSE

      @admin
      Placed order:
      BPCL.NS - SELL at 415.4 with Stop Loss: 415.45 and Target: 409.6
      Order Id returned is None
      The same shows up in "Pending Orders" as:
      SELL
      NSE
      ROBO ORDER
      LIMIT
      415.40
      I,nf,in,ity (0)
      409.60
      Order details
      BPCL_Issue.PNG

      posted in Python SDK
      H
      HawkEye
    • setting SL and trigger Price

      Please help with the parameters for SL and SL trigger price:

      My order params structure:

      orderparams = {
                      "variety": "ROBO",
                      "tradingsymbol": stockname,
                      "symboltoken": symbolToken,
                      "transactiontype": "BUY" if isBuy else "SELL",
                      "exchange": "NSE",
                      "ordertype": "LIMIT",
                      "producttype": "BO", #"INTRADAY" if isIntraday else "DELIVERY",
                      "duration": "DAY",
                      "price": price,
                      "squareoff": price - target,
                      "stoploss": sl - price - 0.1,
                      "triggerprice": sl - price,
                      "quantity": quantity
                      }
      

      My requirement:
      CHOLAFIN.NS - SELL at 630.45 with Stop Loss: 634.3 and Target: 607.0

      Currently target and sellprice are going proper but SL and triggerprice are messed up.

      posted in Python SDK
      H
      HawkEye
    • RE: API down

      @c_harish Yes facing same issue

      posted in Test
      H
      HawkEye
    • RE: fetch banknifty index data

      @webseos
      I have used following functions:

       def __getScrips(self):
              if self.__SCRIPS == None:
                  scripURL = 'https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json'
                  self.__SCRIPS = pd.read_json(scripURL)
              
              return self.__SCRIPS
      
          def getTokenFromSymbol(self, symbol):
              scrips = self.__getScrips()
              return scrips[scrips['symbol']==symbol].iloc[-1]['token']
          
          def getSymbolFromToken(self, token):
              scrips = self.__getScrips()
              return scrips[scrips['token']==token].iloc[-1]['symbol']
      

      p.s: Newbie to this SDK

      posted in Python SDK
      H
      HawkEye
    • RE: Not able to understand SL LIMIT in ROBO order

      @admin
      Since I had Buy@1043 with Target 1047 and Stop loss 1043,
      If it's in points, shouldn't the squareOff be 2090 and Stop Loss be 3 in that case?
      What am I missing?
      Can you please help on getting me the values for squareoff and stoploss that should have been my input.

      posted in General Discussion
      H
      HawkEye
    • RE: Not able to understand SL LIMIT in ROBO order

      @admin
      I am facing exactly same issue.
      Following is my order:
      orderparams = {
      "variety": "ROBO",
      "tradingsymbol": 'INDUSINDBK-EQ',
      "symboltoken": '5258',
      "transactiontype": "BUY",
      "exchange": "NSE",
      "ordertype": "LIMIT",
      "producttype": "BO",
      "duration": "DAY",
      "price": 1043,
      "squareoff": 1047,
      "stoploss": 1040,
      "quantity": 10
      }
      orderId=obj.placeOrder(orderparams)

      OrderId : 211115000659870

      After execution:
      SELL
      INDUSINDBKNSE
      ROBO ORDER
      SL LIMIT
      933.35/933.35
      10

      and
      SELL
      INDUSINDBKNSE
      ROBO ORDER
      LIMIT
      1,140.75
      10
      1,037.00

      posted in General Discussion
      H
      HawkEye
    • RE: placed order not reflecting in web view.

      @supriyom083
      May not be of help but this happens while placing order from webview as well many times.

      posted in General Discussion
      H
      HawkEye
    • RE: Error : error: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate'

      @admin Is there sample code for storing the tick and converting? Also are there readymade strategies available for reference?

      posted in Python SDK
      H
      HawkEye
    • RE: Error : error: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate'

      @admin
      What's your suggestion to get data if we can't use getCandleData API for multiple stocks

      posted in Python SDK
      H
      HawkEye