Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. Pavan Kumar
    3. Posts
    P
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by Pavan Kumar

    • Error while placing Options order

      Hi Team.

      I am able login, generate token, get LTP data for stocks, options but couldn't place the order. I am using Axios library to connect with https://apiconnect.angelone.in API's
      Getting below error
      Access to XMLHttpRequest at 'https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/placeorder/' from origin 'http://..........' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

      Below is the request object
      {
      "method": "post",
      "url": "https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/placeorder/",
      "headers": {
      "Authorization": "Bearer ..........",
      "Content-Type": "application/json",
      "Accept": "application/json",
      "X-UserType": "USER",
      "X-SourceID": "WEB",
      "X-ClientLocalIP": "XXXXXX",
      "X-ClientPublicIP": "XXXXXXX",
      "X-MACAddress": "XXXXXXXXX",
      "X-PrivateKey": "XXXXXXX"
      },
      "data": "{
      "variety": "NORMAL",
      "tradingsymbol": "NIFTY07JUL2621400PE",
      "symboltoken": "44457",
      "transactiontype": "BUY",
      "exchange": "NFO",
      "ordertype": "LIMIT",
      "producttype": "NRML",
      "duration": "DAY",
      "price": "1.8",
      "squareoff": "0",
      "stoploss": "0",
      "quantity": "65",
      "triggerprice": "0",
      "trailingStopLoss": "0",
      "disclosedquantity": "0",
      "ordertag": "AlgoOrder01"
      }"

      posted in General Discussion
      P
      Pavan Kumar
    • Getting CORS Error while placing the order

      Hi Team.

      I am able login, generate token, get LTP data for stocks, options but couldn't place the order. I am using Axios library to connect with https://apiconnect.angelone.in API's
      Getting below error
      Access to XMLHttpRequest at 'https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/placeorder/' from origin 'http://..........' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

      Below is the request object
      {
      "method": "post",
      "url": "https://apiconnect.angelone.in/rest/secure/angelbroking/order/v1/placeorder/",
      "headers": {
      "Authorization": "Bearer ..........",
      "Content-Type": "application/json",
      "Accept": "application/json",
      "X-UserType": "USER",
      "X-SourceID": "WEB",
      "X-ClientLocalIP": "XXXXXX",
      "X-ClientPublicIP": "XXXXXXX",
      "X-MACAddress": "XXXXXXXXX",
      "X-PrivateKey": "XXXXXXX"
      },
      "data": "{"variety":"NORMAL","tradingsymbol":"NIFTY07JUL2621400PE","symboltoken":"44457","transactiontype":"BUY","exchange":"NFO","ordertype":"LIMIT","producttype":"DELIVERY","duration":"DAY","price":"1.8","squareoff":"0","stoploss":"0","quantity":"65","triggerprice":"0","trailingStopLoss":"0","disclosedquantity":"0","ordertag":"AlgoOrder01"}"
      }

      posted in Category 8
      P
      Pavan Kumar
    • Getting Invalid TOTP

      Hi Team.

      I am getting invalid TOTP error while I am trying to login.
      Please find below request I made:

      var axios = require('axios');
      var data = JSON.stringify({
      "clientcode":"My Id",
      "password":"My Password",
      "totp":"NQGVFQPSPFF6LYCFAKVFQGE5HA"
      });

      var config = {
      method: 'post',
      url: 'https://apiconnect.angelbroking.com/
      /rest/auth/angelbroking/user/
      v1/loginByPassword',

      headers : {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'X-UserType': 'USER',
      'X-SourceID': 'WEB',
      'X-ClientLocalIP': 'My IP Address',
      'X-ClientPublicIP': 'My IP Address',
      'X-MACAddress': 'My MAC Address',
      'X-PrivateKey': 'My Private Key'
      }
      data : data
      };

      axios(config)
      .then(function (response) {
      console.log(JSON.stringify(response.data));
      })
      .catch(function (error) {
      console.log(error);
      });

      How to resolve the error ?

      posted in Bugs
      P
      Pavan Kumar
    • RE: Getting Invalid totp error while signing in through Client code, pin, api key, totp

      Hi.

      I am using NodeJS SDK.
      Is there any chance to work with C# ?

      posted in Category 8
      P
      Pavan Kumar
    • Getting Invalid totp error while signing in through Client code, pin, api key, totp

      Getting Invalid totp error while signing in through Client code, pin, api key, totp

      posted in Category 8
      P
      Pavan Kumar