Navigation

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

    cthomas

    @cthomas

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

    cthomas Follow

    Best posts made by cthomas

    This user hasn't posted anything yet.

    Latest posts made by cthomas

    • RE: Guide to secure your SmartAPI Account with two factor authentication

      @webseos Thanks for your simple and effective answer. This works really well.

      posted in General Discussion
      C
      cthomas
    • Session Management: How long the session is valid

      @admin How long the session created by the API call api.generateSession(config.clientId, config.password) is valid? Does the API give any notification/event when the session expires? I am developing a a trading software that will continuously run as a service and I would like to know how the session is managed. If the session expiry is based on a time interval, I want to invalidate the current session and create a new one before the expiry interval. Please help!

      posted in Python SDK
      C
      cthomas
    • RE: Exception string indices must be integers intermittently

      @Mnagesh That is awesome. In short, setting all price values to float and quantity values to int will work. It is very logical and according to JSON spec. Thanks for your prompt and very accurate reply.

      posted in Python SDK
      C
      cthomas
    • Exception string indices must be integers intermittently

      @admin I am a proficient Python/REST API programmer. When I try to use api.placeOrder(orderParams)
      with the following parameters, I am getting the exception "string indices must be integers" intermittently.
      I have seen a resolution in another thread suggesting to use all parameter values as string. I followed the same. Still I am getting the exception. For the sake of completeness, I am setting all 15 parameters. Please help me to resolve the issue ASAP as it is blocking me. Here is the set of parameters that I am using:

      {
      "variety": "NORMAL",
      "tradingsymbol": "MARUTI30JUN22FUT",
      "symboltoken": "56863",
      "transactiontype": "BUY",
      "exchange": "NFO",
      "ordertype": "MARKET",
      "producttype": "CARRYFORWARD",
      "duration": "DAY",
      "price": "0",
      "quantity": "100",
      "triggerprice": "0",
      "squareoff": "0",
      "stoploss": "0",
      "disclosedquantity": "0",
      "ordertag": "api-order"
      }

      I installed SmartAPI with the command "pip install smartapi-python" without giving any version number.

      posted in Python SDK
      C
      cthomas
    • RE: string indices must be integers

      @Bharath-Raj-M Did you get this problem solved? I am facing the same issue and it is very intermittent.
      If this is solved. can you please let me know how?

      posted in Python SDK
      C
      cthomas