Navigation

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

    James Bond

    @James Bond

    “Bond. James Bond.”

    1
    Reputation
    73
    Posts
    48
    Profile views
    6
    Followers
    0
    Following
    Joined Last Online

    James Bond Follow

    Best posts made by James Bond

    • Working Sample code to Place Orders - Python

      Here is the working sample code to Place Orders:

      from smartapi import SmartConnect 
      
      obj = SmartConnect(api_key="your_api_key")
      data = obj.generateSession('client_id', 'your_password')
      refreshToken= data['data']['refreshToken']
      
      orderparams = {
          "variety": "NORMAL",
          "tradingsymbol": "symbol",
          "symboltoken": "token",
          "transactiontype": "BUY",
          "exchange": "NFO",
          "ordertype": "MARKET",
          "producttype": "INTRADAY",
          "duration": "DAY",
          "quantity": "quantiy"
       }
      orderId = obj.placeOrder(orderparams)
      print(orderId)
      

      Above code just punch order and returns orderId of particular order.

      posted in Python SDK
      James Bond
      James Bond

    Latest posts made by James Bond

    • RE: getting the next expiry dates

      I too used web scraping to get upcoming expiry. Little code of Scrapy or BeautifulSoup does the job very well.

      posted in General Discussion
      James Bond
      James Bond
    • RE: WebSocket response

      @admin Python SDK version 1.2.5

      posted in General Discussion
      James Bond
      James Bond
    • WebSocket response

      @rajanprabu How many ticks you receive per second for a single symbol? I'm getting more than 3 ticks/sec for a symbol.

      @admin Why I'm getting more than 1 tick/sec. Anything changed in WebSocket response ? Also WebSocket getting closed randomly.

      posted in General Discussion
      James Bond
      James Bond
    • RE: web sockets working today ?

      @admin

      (2021-05-18 14:44:42,193)  -  (Connection error: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake))
      (2021-05-18 14:44:42,194)  -  (Connection closed: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake))
      

      WebSocket not working. It's getting closed and won't reconnect automatically.

      posted in Python SDK
      James Bond
      James Bond
    • RE: Task "mw" not provide complete data, socket closed randomly

      @admin I still facing the same issue today.
      When this problem get resolved ?

      posted in Python SDK
      James Bond
      James Bond
    • RE: Task "mw" not provide complete data, socket closed randomly

      @admin
      Same thing happening with me too.

      Log message

      2021-05-05 12:03:43,170 - Connection error: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
      2021-05-05 12:03:43,170 - Connection closed: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
      
      

      @admin Any update on this ?

      posted in Python SDK
      James Bond
      James Bond
    • RE: Multiple HB failure and order book fetch issue

      @rajanprabu Yes....I too faced issue on my local machine.

      posted in Python SDK
      James Bond
      James Bond
    • RE: Websockets not working ?

      @rajanprabu Yes, I'm using Python SDK

      posted in General Discussion
      James Bond
      James Bond
    • RE: Websockets not working ?

      @admin & @rajanprabu Yes...I observed the same.

      posted in General Discussion
      James Bond
      James Bond
    • RE: How to get fed_token and how to use token and task and how to subscribe and unsubscribe a script?????

      @ashmita_ said in How to get fed_token and how to use token and task and how to subscribe and unsubscribe a script?????:

      I'm not found instrument like Reliance_EQ,

      Do you converted json into csv ?

      You should use RELIANCE-EQ for equity.
      RELIANCE25MAR21FUT for current month contract

      Can you share your code, so we can help you.

      posted in General Discussion
      James Bond
      James Bond