Navigation

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

    meet panchal

    @meet panchal

    1
    Reputation
    6
    Posts
    3
    Profile views
    0
    Followers
    3
    Following
    Joined Last Online
    Location Mumbai Age 21

    meet panchal Follow

    Best posts made by meet panchal

    This user hasn't posted anything yet.

    Latest posts made by meet panchal

    • RE: sensex symbol name is wrong

      hey! @manjunathn1988 can you tell me the error you are getting?

      posted in Python SDK
      M
      meet panchal
    • RE: smartapi is not getting installed

      @mst_rajatmishra dude because you are not importing it correctly its SmartApi not smartapi

      posted in Python SDK
      M
      meet panchal
    • RE: sensex symbol name is wrong

      @Moderator_3
      actually i solved it the problem was about how the names of option contracts differ for nifty and banknifty its same but sensex is different i eventually figured it out

      posted in Python SDK
      M
      meet panchal
    • sensex symbol name is wrong

      i wanted to fetch symbol tokens of sensex options so today was 14th november2024 the day is thursday and technically today is the expiry since tomorrow is holiday so the expiry should be 14nov but in the json file it was
      available for 24nov
      1st occurence
      4c0daec7-dd4c-4274-92e7-ee429fe4eed7-image.png
      2nd occurrence
      a34ec9be-645c-4345-a098-9640e3d6c0de-image.png
      as you can see there was a mistake in the expiry dates
      please look into it @admin
      @admin123 @Moderator_1 @Moderator_2 @Moderator_3

      posted in Python SDK
      M
      meet panchal
    • RE: NIFTY High/Low option not available

      @GaryR01 hey!! got any solutions i also want to store the low of current candle in a variable

      posted in Python SDK
      M
      meet panchal
    • not able to place fno orders on nifty50 index
      import pyotp
      from SmartApi import SmartConnect
      from logzero import logger
      
      
      apikey="z1IPZzY0"
      username="M52500299"
      pwd="1233"
      
      smartApi=SmartConnect(apikey)
      
      try:
          token = "4TZ63NU76235CQV3KFW6HB7A2Y"
          totp = pyotp.TOTP(token).now()
      except Exception as e:
          logger.error("Invalid Token: The provided token is not valid.")
          raise e
      
      data = smartApi.generateSession(username, pwd, totp)
      
      if data['status'] == False:
          logger.error(data)
          
      else:
          # login api call
          # logger.info(f"You Credentials: {data}")
          authToken = data['data']['jwtToken']
          refreshToken = data['data']['refreshToken']
          # fetch the feedtoken
          feedToken = smartApi.getfeedToken()
          # fetch User Profile
          res = smartApi.getProfile(refreshToken)
          smartApi.generateToken(refreshToken)
          res=res['data']['exchanges']
      
          #place order
      
          
          try:
              orderparams = {
                  "variety": "NORMAL",
                  "tradingsymbol": "NIFTY31OCT24400PE",
                  "symboltoken": "99926000",
                  "transactiontype": "BUY",
                  "exchange": "NFO",
                  "ordertype": "MARKET",
                  "producttype": "INTRADAY",
                  "duration": "DAY",
                  "price": "19500",
                  "squareoff": "0",
                  "stoploss": "0",
                  "quantity": "25"
                  }
              # Method 1: Place an order and return the order ID
              orderid = smartApi.placeOrder(orderparams)
              logger.info(f"PlaceOrder : {orderid}")
              # Method 2: Place an order and return the full response
              response = smartApi.placeOrderFullResponse(orderparams)
              logger.info(f"PlaceOrder : {response}")
          except Exception as e:
              logger.exception(f"Order placement failed: {e}")
      
      
      

      for this code im getting this error
      [I 241028 13:21:49 smartConnect:121] in pool
      [E 241028 13:21:52 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/placeOrder. Error: Failed to get symbol details. URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/placeOrder, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.147.98', 'X-MACAddress': '00:50:56:c0:00:08', 'Accept': 'application/json', 'X-PrivateKey': 'z1IPZzY0', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'variety': 'NORMAL', 'tradingsymbol': 'NIFTY31OCT24400PE', 'symboltoken': '99926000', 'transactiontype': 'BUY', 'exchange': 'NFO', 'ordertype': 'MARKET', 'producttype': 'INTRADAY', 'duration': 'DAY', 'price': '19500', 'squareoff': '0', 'stoploss': '0', 'quantity': '25'}, Response: {'message': 'Failed to get symbol details', 'errorcode': 'AB1018', 'status': False, 'data': None}
      [E 241028 13:21:52 smartConnect:336] API request failed: {'message': 'Failed to get symbol details', 'errorcode': 'AB1018', 'status': False, 'data': None}
      [I 241028 13:21:52 angleone:56] PlaceOrder : None
      [E 241028 13:21:52 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/placeOrder. Error: Failed to get symbol details. URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/placeOrder, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.147.98', 'X-MACAddress': '00:50:56:c0:00:08', 'Accept': 'application/json', 'X-PrivateKey': 'z1IPZzY0', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'variety': 'NORMAL', 'tradingsymbol': 'NIFTY31OCT24400PE', 'symboltoken': '99926000', 'transactiontype': 'BUY', 'exchange': 'NFO', 'ordertype': 'MARKET', 'producttype': 'INTRADAY', 'duration': 'DAY', 'price': '19500', 'squareoff': '0', 'stoploss': '0', 'quantity': '25'}, Response: {'message': 'Failed to get symbol details', 'errorcode': 'AB1018', 'status': False, 'data': None}
      [E 241028 13:21:53 smartConnect:352] API request failed: {'message': 'Failed to get symbol details', 'errorcode': 'AB1018', 'status': False, 'data': None}
      [I 241028 13:21:53 angleone:59] PlaceOrder : None

      posted in General Discussion
      M
      meet panchal