Closed Jeyanthinath closed 4 years ago
@Jeyanthinath Not Really, Zerodha does provide a historical API for getting candlestick data but No API streams Candlestick data in real time, you will have to re-sample the ticks to generate candles of specific timeframe on your local system only.
Alice-blue doesn't provide historical data. Historical data are provided by upstox & zerodha.
Is there any sample code available to recreate candlestick using websocket data?
If you dont want to write more lines of code, most simplest way is to store every tick in a dataframe and use the resample function.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.resample.html
If you understand what is candle stick you can easily recreate using tick data. Candle stick is nothing but OHLC, open, high, low, close. Store the tick data in a list (as per the time frame you want).
open = lst[0]
high = max(lst)
low = min(lst)
close = lst[-1]
Hope this is answered. Reopen if you need something else related to this question.
sir, Can you please provide code snippet to get OHLC data for a stock.
I've explained above, how to get OHLC.
Sir, this is half code, can you please write what should be above lst[0],
open = lst[0] high = max(lst) low = min(lst) close = lst[-1]
If you understand what is candle stick you can easily recreate using tick data. Candle stick is nothing but OHLC, open, high, low, close. Store the tick data in a list (as per the time frame you want).
Yes it’s half code. I cannot write code for your application. You’ve to write your own. lst is list
Hi Sir,
Is there any sample script to access aliceblue Oauth2 access, please let me know.
Thank you Mallikarjuna M
On Mon, May 18, 2020 at 12:25 AM Krishna Velu notifications@github.com wrote:
If you understand what is candle stick you can easily recreate using tick data. Candle stick is nothing but OHLC, open, high, low, close. Store the tick data in a list (as per the time frame you want).
Yes it’s half code. I cannot write code for your application. You’ve to write your own. lst is list
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/krishnavelu/alice_blue/issues/26#issuecomment-629843886, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMJIXY3EEA5YHXDKQKBY2LRSAXJ3ANCNFSM4JUY65YA .
What do you mean by alice blue Oauth2 access?
@krishnavelu Is there any way we can get the last one month data?
Alice blue doesn’t provide historical data.
If you dont want to write more lines of code, most simplest way is to store every tick in a dataframe and use the resample function.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.resample.html
Can you write a small snippet showing how it's done?
This means that if i am trading in 1 min TF(suppose) ,i won't be able to make a 20 moving average until i gets 20 ticks therefore i have to wait for 20 mins for a my system (algo) to work.
Thats how moving average works. You cannot take average till all data points are available.
Does Aliceblue has a plan to come up with historical data api in the near future??
Nope.
Hi is there any api available to get historical candle data for 5 minutes and 15 minutes.