Shoonya-Dev / ShoonyaApi-py

144 stars 133 forks source link

Get_daily_price_series showing none #85

Closed suresh-n closed 1 year ago

suresh-n commented 1 year ago

The get_daily_price_series showing none please fix it.

suresh-n commented 1 year ago

DEBUG:NorenRestApiPy.NorenApi:https://api.shoonya.com/NorenWClientTP//EODChartData DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.shoonya.com:443 DEBUG:urllib3.connectionpool:https://api.shoonya.com:443 "POST /NorenWClientTP//EODChartData HTTP/1.1" 404 31 DEBUG:NorenRestApiPy.NorenApi:<Response [404]> None

abhayana24 commented 1 year ago

I am also facing the same issue, I am using get_daily_price_series() API from python, but its returning None. Any update on this issue ?

suresh-n commented 1 year ago

yeah this can make our life easy if we get the EOD data in Api. @Shoonya-Dev any update on this ?

Nikhesh commented 1 year ago

get_daily_price_series() now working

suresh-n commented 1 year ago

@Nikhesh i see its return nothing.

startdate: 2023-01-08 09:15:00.998210 enddate: 2023-01-08 15:30:00.998310 DEBUG:NorenRestApiPy.NorenApi:https://api.shoonya.com/NorenWClientTP//EODChartData DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.shoonya.com:443 DEBUG:urllib3.connectionpool:https://api.shoonya.com:443 "POST /NorenWClientTP//EODChartData HTTP/1.1" 200 2 DEBUG:NorenRestApiPy.NorenApi:<Response [200]> []

am i'm doing something wrong ?

suresh-n commented 1 year ago

ignore that i got the output.

['{"time":"09-JAN-2023", "into":"336.95", "inth":"341.30", "intl":"336.15", "intc":"338.05", "ssboe":"1673222400", "intv":"10618786.00"}']

abhayana24 commented 1 year ago

@suresh-n can you post a sample example how you are calling get_daily_price_series() , I am still facing the issue ?

suresh-n commented 1 year ago

@abhayana24 please try like this?

import datetime end = datetime.datetime.today() end = end.replace(hour=15, minute=30, second=0, microsecond=0) - timedelta(days=4) start = datetime.datetime.today() start = end.replace(hour=00, minute=00, second=0, microsecond=0) print(start) print(end) ret = api.get_daily_price_series(exchange='NSE', tradingsymbol='ITC-EQ', startdate=start.timestamp(), enddate=end.timestamp())

print(ret)