Navigation

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

    C1234

    @C1234

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

    C1234 Follow

    Best posts made by C1234

    This user hasn't posted anything yet.

    Latest posts made by C1234

    • HOW CAN I GET? TOKEN AND SYMBOL?

      HOW CAN I GET "exchange": "", "tradingSymbol": "", "symbolToken": "", EXAMPLE : SENSEX 01 Jul 82700 Call ITS SYMBOL AND TOKEN ?

      posted in General Discussion
      C
      C1234
    • aws lambda order placement

      Hey everyone,

      We are trying to place orders from aws lambda and S3. if anyone knows how to go about it, kindly help us out.

      We are trying to mimic the behaviour of tradetron, where orders are placed at once for multiple users based on a given strategy.

      Kind regards,
      Bharath

      posted in Python SDK
      C
      C1234
    • RE: Placing order using tokens

      @admin
      My personal client ID is B133022

      posted in Python SDK
      C
      C1234
    • RE: Placing order using tokens

      @admin
      I could not find any documentation regarding this.

      Could you please give a step by step instruction on how it is supposed to be done?

      posted in Python SDK
      C
      C1234
    • RE: Placing order using tokens

      @Bharath-Raj-M

      Dear @admin, it's been a while since I posted this, could you review and help us out ?

      Regards,
      Bharath

      posted in Python SDK
      C
      C1234
    • Placing order using tokens

      Dear admin,

      Once we generate a session, how do we place order using just tokens?

      Right now I am doing this:

      client_smartApi = SmartConnect(api_key = client_api_key)
      login = client_smartApi.generateSession("Client_id","Client_password")
      orderId=client_smartApi.placeOrder(orderparams)
      print("OrderId :"+str(orderId))
      
      #obtain the required tokens
      access_token = client_smartApi.access_token
      refreshToken = login['data']['refreshToken']
      jwtToken = login['data']['jwtToken']
      

      The order is successfully placed here.
      As you can see, while placing the order I generateSession for the client using the client ID and the client password.

      However, how do we generate a session initially and then use the tokens to place the orders at a later point in time?

      I tried doing this -

      client_smartApi = SmartConnect(api_key = clien_api_key)
      client_smartApi.setAccessToken(access_token )
      client_smartApi.setRefreshToken(refreshToken )
      orderId=client_smartApi.placeOrder(orderparams)
      

      This throws an error as follows:

      ..........\lib\site-packages\smartapi\smartConnect.py in placeOrder(self, orderparams)
          288                 del(params[k])
          289 
      --> 290         orderResponse= self._postRequest("api.order.place", params)['data']['orderid']
          291 
          292         return orderResponse
      
      TypeError: string indices must be integers
      

      Could you please guide me with this?

      Thank you

      posted in Python SDK
      C
      C1234
    • RE: Multi user order placement

      @admin Dear admin, can you be kind enough to tell me why we cant place orders for multiple clients?
      Am I missing something?
      Could you please guide me to the correct sources as well?

      posted in General Discussion
      C
      C1234
    • string indices must be integers

      Re: Error while placing order

      Hey whenever I place my orders, the orders usually get executed, however sometimes, I get the error:
      "string indices must be integers"

      Here is a gist of my code:

      client_smartApi=SmartConnect(api_key='api_key')
      login = client_smartApi.generateSession('Client_id','password')
      try:
      orderparams = {
      "variety": "NORMAL",
      "tradingsymbol": tradingsymbol,
      "symboltoken": symbol_token,
      "transactiontype": transactiontype,
      "exchange": symbolexchange,
      "ordertype": "MARKET",
      "producttype": "CARRYFORWARD",
      "duration": "DAY",
      "quantity": quantity
      }
      orderId=client_smartApi.placeOrder(orderparams)
      except Exception as e:
      print(e)

      posted in Python SDK
      C
      C1234
    • RE: Maximum number of APIs

      @admin
      Dear admin, is there a document about the rules (compliance) as you just mentioned it. Kindly share the link .

      I did not find anything as such in the API docs.

      posted in General Discussion
      C
      C1234
    • Maximum number of APIs

      Dear team,

      What is the maximum number of APIs a user can create? Is there a limit to this?
      Can we use these APIs for a large scale number of clients?

      Looking forward for your response.

      Kind regards,
      Bharath Raj M

      posted in General Discussion
      C
      C1234