It looks like you're new here. If you want to get involved, click one of these buttons!
def buy():
name
buy(name)
Where you want to create a new thread for order placement? Inside Websocket streaming?
Maybe you can go through this thread.
order_id = kite.place_order(variety=kite.VARIETY_REGULAR,exchange=kite.EXCHANGE_NSE, tradingsymbol=name,transaction_type=kite.TRANSACTION_TYPE_BUY, quantity=1, product=kite.PRODUCT_MIS, order_type=kite.ORDER_TYPE_MARKET,)
def on_ticks(ws,ticks):
helper_method()
def helper_method(ticks):
#calculations.
buy(name)
this is what i am trying to do.
but after placing order i lose my connection. with this error.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /orders/regular HTTP/1.1" 200 None
ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (None)
name
variable herebuy(name)
.For future query, please post complete code, so we can get a better idea to debug it.