Navigation

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

    rr33

    @rr33

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

    rr33 Follow

    Best posts made by rr33

    This user hasn't posted anything yet.

    Latest posts made by rr33

    • RE: Data Pull Failed with Error - Couldn't parse the JSON response received from the server: b''

      Same error while testing place_order() functionality

      #place order
      try:
          orderparams = {
              # "variety": "NORMAL",
              "tradingsymbol": "DIL",
              "symboltoken": "8657",
              "exchange": "NSE",
              "transactiontype": "BUY",
              "ordertype": "MARKET",
              "producttype": "CNC",
              "price": "7.8",
              "duration": "DAY",
              "triggerprice" : "7.8",
              "squareoff": "9",
              "stoploss" : "5",
              "trailingStopLoss" : "0.1",
              "disclosedquantity" : '1',
              "quantity": "1",
              "ordertag" : "testing",
              }
          # 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}")
      
      raise ex.DataException("Couldn't parse the JSON response received from the server: {content}".format(
          SmartApi.smartExceptions.DataException: Couldn't parse the JSON response received from the server: b''
      
      posted in Bugs
      R
      rr33