Navigation

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

    Deepak8052

    @Deepak8052

    1
    Reputation
    9
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Deepak8052 Follow

    Best posts made by Deepak8052

    This user hasn't posted anything yet.

    Latest posts made by Deepak8052

    • RE: Please give an example for buy, stoploss and sell order in intraday trading

      @Rakhi Cover Order, also u need to give "transactiontype": "BUY", then only it will buy

      posted in General Discussion
      D
      Deepak8052
    • How Target and Stop loss Calculated in Robo Order?

      HI, I have given below values in code:
      Robo order:
      "price": 719.65,
      "squareoff": 716.0
      "stoploss": 688, #"0",
      "quantity": 1
      "triggerprice" : 690.0
      "trailingstoploss": 1

      But when it got executed then MY Stoploss and Target value was as below:
      SL : 639.5
      Trail Value : 781.6

      How this value is calculated? can anyone explain..

      posted in Python SDK
      D
      Deepak8052
    • RE: Please give an example for buy, stoploss and sell order in intraday trading

      orderparams = {
      "variety": "STOPLOSS",
      "tradingsymbol": "SBIN-EQ",
      "symboltoken": "3045",
      "transactiontype": "BUY",
      "exchange": "NSE",
      "ordertype": "STOPLOSS_LIMIT",
      "producttype": "INTRADAY",
      "duration": "DAY",
      "price": "302.50",
      "squareoff": "0",
      "stoploss": "280",
      "quantity": "1"
      }

      posted in General Discussion
      D
      Deepak8052
    • Margin Calculator in Python

      Hi, Can someone help me share the code of the Margin calculator I tried the one shared on https://smartapi.angelbroking.com/docs/MarginCalculator but it's not working for me.
      Below is the code:
      import http.client

      conn = http.client.HTTPSConnection("apiconnect.angelbroking.com")
      payload = "{\n" +
      " "positions": [\n" +
      " {\n" +
      " "exchange": "NFO",\n" +
      " "qty": 50,\n" +
      " "price": 0,\n" +
      " "productType": "INTRADAY",\n" +
      " "token": "67300",\n" +
      " "tradeType": "BUY"\n" +
      " },\n" +
      " {\n" +
      " "exchange": "NFO",\n" +
      " "qty": 50,\n" +
      " "price": 0,\n" +
      " "productType": "INTRADAY",\n" +
      " "token": "67308",\n" +
      " "tradeType": "SELL"\n" +
      " }\n" +
      " ]\n" +
      "}"
      headers = {
      'X-PrivateKey': 'API_KEY',
      'Accept': 'application/json',
      'X-SourceID': 'WEB',
      'X-ClientLocalIP': 'CLIENT_LOCAL_IP',
      'X-ClientPublicIP': 'CLIENT_PUBLIC_IP',
      'X-MACAddress': 'MAC_ADDRESS',
      'X-UserType': 'USER',
      'Authorization': 'Bearer AUTHORIZATION_TOKEN',
      'Accept': 'application/json',
      'X-SourceID': 'WEB',
      'Content-Type': 'application/json'
      }
      conn.request("POST", "/rest/secure/angelbroking/margin/v1/batch", payload, headers)
      res = conn.getresponse()
      data = res.read()
      print(data.decode("utf-8"))

      pls help me out.

      posted in General Discussion
      D
      Deepak8052
    • RE: While fetching margin calculator data, getting an error as "Internal error AB200"."1

      could you please share the code?

      posted in Python SDK
      D
      Deepak8052
    • TOTP Error

      Hi All,

      Getting below error:
      [I 240628 18:01:13 smartConnect:121] in pool
      [E 240628 18:01:14 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/auth/angelbroking/user/v1/loginByPassword. Error: Invalid totp. URL: https://apiconnect.angelbroking.com/rest/auth/angelbroking/user/v1/loginByPassword, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.148.78', 'X-MACAddress': 'f4:b7:e2:59:92:8c', 'Accept': 'application/json', 'X-PrivateKey': '72Kc4WgZ', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'clientcode': 'D248489', 'password': '0992', 'totp': '136646'}, Response: {'status': False, 'message': 'Invalid totp', 'errorcode': 'AB1050', 'data': None}
      [E 240628 18:01:14 Automating AngelBroking:22] {'status': False, 'message': 'Invalid totp', 'errorcode': 'AB1050', 'data': None}

      posted in Python SDK
      D
      Deepak8052
    • RE: Totp error

      @Moderator_3
      Below is the error:
      [I 240628 18:01:13 smartConnect:121] in pool
      [E 240628 18:01:14 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/auth/angelbroking/user/v1/loginByPassword. Error: Invalid totp. URL: https://apiconnect.angelbroking.com/rest/auth/angelbroking/user/v1/loginByPassword, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.157.96', 'X-MACAddress': 'f4:b7:e2:59:92:8c', 'Accept': 'application/json', 'X-PrivateKey': '72Kc4WgZ', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'clientcode': 'D248489', 'password': '0992', 'totp': '136646'}, Response: {'status': False, 'message': 'Invalid totp', 'errorcode': 'AB1050', 'data': None}
      [E 240628 18:01:14 Automating AngelBroking:22] {'status': False, 'message': 'Invalid totp', 'errorcode': 'AB1050', 'data': None}

      posted in General Discussion
      D
      Deepak8052
    • RE: Totp error

      @Moderator_3
      Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.157.99', 'X-MACAddress': 'f4:b7:e2:59:92:8c', 'Accept': 'application/json', 'X-PrivateKey': '72Kc4WgZ', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'clientcode': 'D248489', 'password': '0698', 'totp': '136646'}, Response: {'status': False, 'message': 'Invalid totp', 'errorcode': 'AB1050', 'data': None}
      [E 240628 18:01:14 Automating AngelBroking:22] {'status': False, 'message': 'Invalid totp', 'errorcode': 'AB1050', 'data': None}

      posted in General Discussion
      D
      Deepak8052
    • Totp error

      Hi All, I'm getting the below error:
      [E 240628 02:24:35 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/auth/angelbroking/user/v1/loginByPassword. Error: Invalid totp.

      The same code is running on one of my laptops, but it's not working on the other.

      posted in General Discussion
      D
      Deepak8052