Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. N51542847
    N
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    N51542847

    @N51542847

    3
    Reputation
    13
    Posts
    2
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    N51542847 Follow

    Best posts made by N51542847

    • RE: challenges using Smartapi

      Hi @Mnagesh,

      I am developing trade logic on multiple chart. My trade logic require to get OHCL data of 5 min live candle.
      getCandleData() method gives this data but it usually gives 20-30 second old data.

      Can we get same method with live feed or if we improve getCandleData() method to get live data.

      Any input will be really appreciated.

      PS: i know alternative solution to capture live feed data and calculate OHCL value.

      Thanks in advance!

      posted in General Discussion
      N
      N51542847

    Latest posts made by N51542847

    • Please ignore

      please ignore

      posted in Python SDK
      N
      N51542847
    • Need help for price interval(Y-Axis) derivation on any trading chart as it displays in browser

      Hi Everyone, @admin ,

      I am implementing one trading technique which require price interval value(Y-Axis) of any stock / option chart. I have opted "auto" scaling option in chart.

      In attached screenshot, price interval in Y-axis is 20.

      Price_Interval.jpg

      Please help, how can we get this value.

      Thanks in advance for any suggestion or input.

      posted in General Discussion
      N
      N51542847
    • Angel one is not reliable for algo trading: getCandleData() method is returning wrong data than there own website's data

      Hi @admin

      getCandleData() method is returning wrong data. Ideally, Trading API should not return different data than there actual website.

      If we check API output data of BANKNIFTY chart (35014 BANKNIFTY31AUG23FUT BANKNIFTY) on 28-Aug,23 at 13:05, getCandleData() method is returning 44522.00 value though actual value on Angelone website is 44516.85

      Because of wrong data return from getCandleData() API, my algo has taken wrong trade and lost money.

      Here is proof to justify it.

      Sample code -
      6dd9c579-1e10-4324-a8c9-0dae488c240f-image.png

      Output:
      5912a87b-1464-421f-a131-ceb1cada8e5d-image.png

      Algo Trading chart data:

      1dd0dfe4-0333-42e0-a198-4e33a9baf2c5-image.png

      posted in Python SDK
      N
      N51542847
    • RE: How to create GTT for option chart on expiry day

      @admin , Can you please help on this.

      posted in General Discussion
      N
      N51542847
    • How to create GTT for option chart on expiry day

      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!

      posted in General Discussion
      N
      N51542847
    • Query related exchange time

      Hi @admin , everyone,

      I just want to share my experience and looking for your input.

      Today, i have executed placeorder api at 9:15:00.000350 AM (my local system time).
      But trade got rejected, when i checked order history, i found trade execution time in order history was mentioned at 9:14:59 AM.

      I have before query -

      1. Does any one faced same experience.
      2. Is there any api method to get exchange time so that i can fill time gap / between exchange and my local time ?

      e1ae9dc0-7047-4a7d-a3f4-2deac0220fd6-image.png

      posted in General Discussion
      N
      N51542847
    • RE: OpenAPIScripMaster.json returning null data - Fix request

      @laxm ,

      Yes, i was wondering why it happened. Not sure if there were some maintenance window was there.
      It had worked at 9:00 AM.

      posted in General Discussion
      N
      N51542847
    • OpenAPIScripMaster.json returning null data - Fix request

      Hi @admin ,
      We are getting "null" return value for OpenAPIScripMaster.json file. Can you please look it as soon as possible.

      https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json

      8b77ce11-1538-44b8-92fa-daa61db59767-image.png

      Thanks in advance

      posted in General Discussion
      N
      N51542847
    • RE: challenges using Smartapi

      Hi @Mnagesh,

      I am developing trade logic on multiple chart. My trade logic require to get OHCL data of 5 min live candle.
      getCandleData() method gives this data but it usually gives 20-30 second old data.

      Can we get same method with live feed or if we improve getCandleData() method to get live data.

      Any input will be really appreciated.

      PS: i know alternative solution to capture live feed data and calculate OHCL value.

      Thanks in advance!

      posted in General Discussion
      N
      N51542847
    • History API is stop returning data for any MCX future stock

      Hi @admin123 @admin @administrators ,

      History API is stop returning data for MCX future stock's data.
      Can you please resolve this issue or suggest if any changes has made recently to make it work.

      Thanks in advance!

      Sample code -

      def fetchDataOneline(in_exchange,in_symboltoken):
      obj = SmartConnect(api_key=apikey)
      data = obj.generateSession(username, pud, pyotp.TOTP(token).now())
      refrashToken = data['data']['refreshToken']
      res = obj.getProfile(refrashToken)
      print(res['data']['exchanges'])
      try:
      historicParam = {
      "exchange": in_exchange,
      "symboltoken": in_symboltoken,
      "interval": "FIVE_MINUTE",
      "fromdate": "2023-06-10 15:55",
      "todate":"2023-06-22 15:55"
      }
      historic_data = obj.getCandleData(historicParam)

          # Extract the candle data from the 'data' key
          candle_data = historic_data['data']
      
          # Create a DataFrame from the candle data
          df = pd.DataFrame(candle_data, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])
          print(df)
      
      except Exception as e:
          print("Historic Api failed: {}".format(e.message))
      # logout
      try:
          time.sleep(1)
          logout = obj.terminateSession('N51542847')
          print("Logout Successfully")
      except Exception as e:
          print("Logout failed: {}".format(e.message))
      
      return df
      

      in_exchange= "MCX"
      in_symboltoken = "244731"

      Output:
      bdad71f4-a2c0-4f45-9d4e-3abe630ad27e-image.png

      posted in Bugs
      N
      N51542847