VPS Hosting - Tick data

TUSH123
I am not able to get tick data on my VPS linux server which i bought on bigrock recently.

Its working fine on my local but on server its not throwing any error but data is not coming back, program is not going in loop.

Please help it seems a showstopper for me?
  • Vivek
    Please share more info about the issue
    1. Which client library you are using?
    2. Set debug mode in client library and get logs
    3. Are you using Kite 2 or Kite 3 API clients?
  • TUSH123
    1) python3.6
    2) how to setup debug mode?
    3) don't know I just created a connection after installing KiteConnect package
  • TUSH123
    And same way it's working in my local
  • TUSH123
    Any particular port needs to be opened on server for websocket connection ?
  • Vivek
    WebSocket uses same port as SSL which is 443 so port shouldn't be an issue as long as you can curl an SSL site. You can enable debug by setting flag while initializing

    kws = KiteTicker("your_api_key", "your_access_token", debug=True)
  • TUSH123
    after updating kiteconnect new 3.0 api

    i am getting below error

    File "mytest.py", line 3, in
    from kiteconnect import KiteTicker
    File "/usr/local/lib/python3.6/site-packages/kiteconnect/__init__.py", line 111, in
    from kiteconnect.ticker import KiteTicker
    File "/usr/local/lib/python3.6/site-packages/kiteconnect/ticker.py", line 18, in
    from twisted.internet import reactor, ssl
    File "/usr/local/lib/python3.6/site-packages/Twisted-17.1.0-py3.6-linux-x86_64.egg/twisted/__init__.py", line 23, in
    from twisted._version import __version__ as version
    File "/usr/local/lib/python3.6/site-packages/Twisted-17.1.0-py3.6-linux-x86_64.egg/twisted/_version.py", line 8, in
    from incremental import Version
    ModuleNotFoundError: No module named 'incremental'
  • TUSH123
    the above is resolved by installing few dependencies
  • TUSH123
    still same error - no websocket connection , enabled log
  • TUSH123
    error log...

    2018-02-05 16:55:02+0000 [-] Log opened.
    2018-02-05 16:55:04+0000 [-] failing WebSocket opening handshake ('WebSocket connection upgrade failed (403 - Forbidden)')
    2018-02-05 16:55:04+0000 [-] dropping connection to peer tcp4:52.66.33.111:443 with abort=True: WebSocket connection upgrade failed (403 - Forbidden)
    2018-02-05 16:55:04+0000 [-] WebSocket connection lost: [Failure instance: Traceback (failure with no frames): : Connection was aborted locally, using.
    2018-02-05 16:55:04+0000 [-] ].
    2018-02-05 16:55:04+0000 [-] will retry in 2 seconds
    2018-02-05 16:55:04+0000 [-] Stopping factory
    2018-02-05 16:55:07+0000 [-] Starting factory
    2018-02-05 16:55:15+0000 [-] failing WebSocket opening handshake ('WebSocket connection upgrade failed (403 - Forbidden)')
    2018-02-05 16:55:15+0000 [-] dropping connection to peer tcp4:52.66.33.111:443 with abort=True: WebSocket connection upgrade failed (403 - Forbidden)
    2018-02-05 16:55:15+0000 [-] WebSocket connection lost: [Failure instance: Traceback (failure with no frames): : Connection was aborted locally, using.
    2018-02-05 16:55:15+0000 [-] ].
    2018-02-05 16:55:15+0000 [-] Try reconnecting. Retry attempt count: 1
    2018-02-05 16:55:15+0000 [-] will retry in 7 seconds
    2018-02-05 16:55:15+0000 [-] Stopping factory
    ^C2018-02-05 16:55:18+0000 [-] Received SIGINT, shutting down.
    2018-02-05 16:55:18+0000 [-] Main loop terminated.
  • sujith
    You need a valid access token in order to go through authentication.
  • TUSH123
    yes , many thanks, this was resolved last night
  • TUSH123
    got new issue

    Order placement failed: place_order() missing 1 required positional argument: 'variety'
  • TUSH123
    order_buy_id = kite.place_order(tradingsymbol=tradingsymbol,
    quantity=quantty,
    exchange=exchng,
    transaction_type=kite.TRANSACTION_TYPE_BUY,
    order_type=kite.ORDER_TYPE_SLM,
    trigger_price=slm_buy_price,
    product=productType )
  • TUSH123
    where

    tradingsymbol="CRUDEOILM18FEBFUT"
    quantty=1
    exchng=kite.EXCHANGE_MCX
    productType=kite.PRODUCT_MIS
  • sujith
    Hi @TUSH123,
    Please open new threads for new queries. It might help others who are facing the same issue.
This discussion has been closed.