Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Error while placing Options order

    General Discussion
    1
    1
    5
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Pavan Kumar last edited by

      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"
      }"

      1 Reply Last reply Reply Quote 0
      • First post
        Last post