Thank you @RED .
I followed your idea. now i can fetch my positions without blocking the main thread.
sometimes the new_thread shows Readtimeout error. but then another new_thread is created without hampering the flow.
Thank you again.
I am sorry @RED and team.
I have been coding it wrong.
new_thread = threading.Thread(target=helper_method_2(ticks = ticks_data), daemon= True)
new_thread.start()
I had been calling the function during creating the new_thread. so it was blocking t…
Thank you @RED.
I have tried as you have mentioned and i was running the callback and calculations in two different threads. After 2:30 Hrs of smooth running it threw a similar error
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.k…
hi @RED
Thank you.
Seems likee you are talking about the second method.
But it is throwing an error ticks and ws is not defined. so what to assign these two?
And again if i remove the thread.join() then will it be fine ?
Hi @sujith, @rakeshr and team,
I tried something like this.
def helper_method_2(ticks):
for company in ticks:
Perform computation here
place orders
request open positions list
while True:
def on_ticks(ws, ticks):
…
okay @sujith. Thank you.
The above said package is not affordable for a retail trader.
What is the frequency of receiving ticks from websocket ?
the same code is running fine in mid-day. But in the beginning of a trading day it is showing error.
…
Hii @rakeshr and team.
Thank you for your reply.
Can it be sorted out by applying a delay after i request kite.positions()["net"].
Else can i delay the callback from the on_ticks ? Because if we can, our system can get some time to process the posi…
And this is the next part of the error.
Unhandled Error
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File …
And this is the error. Though it is not throwing error always, but the error is un predictable and worrysome if I am taking large volumes.
and here is the error
HINDCOPPER, -0.3000000000001819, 12.4689
Unhandled Error
Traceback (most recent call l…
Hii @rakeshr.
I used the thread you reffered here. and the structure of my code is similar to as you have advised. but still it is showing similar error.
import logging
from kiteconnect import KiteTicker
logging.basicConfig(level=logging.DEBUG)
kw…
hi @rakeshr
I'm finding it difficult to write a code for the get request to fetch the trades of a particular order_id.
https://kite.trade/docs/connect/v3/orders/#retrieving-an-orders-trades
can you please help me with this ?
Thank you.
Hii sujith..
Hope you are in good health.
According to you the average price should show updated value.
but mine is showing different value than the price i have bought or sold the shares.
Kindly follow the two images to get a view of what i am …
Thank you @rakeshr
My apologies but I have hidden few characters of the key. Anyway, I will never post like this again.
So these debug messages are appearing because there's something wrong in the code or what.
Hi @rakeshr.
I am calling the function like this
place_an_order(name= name, price=ltp, Transac_type=kite.TRANSACTION_TYPE_BUY, no_of_shares=initial_amount)
But when its time to place an order. this thing shows up without placing an order.
DEBUG…
Hi @sujith.
It will be very helpful if you kindly suggest how to do it.
Do I need to call the __init__ function and put the variables as my requirement or there is any other way
Thank you.
hi everybody
can somebody tell me what datas except OHLCV are accessible from kite connect api ?
Can I get average traded price from the exchange end or we need to calculate the VWAP on a minute basis ?
Thank you all.