finnhubio / Finnhub-API

Finnhub API provides institutional-grade financial data to investors, fintech startups and investment firms. We support real-time stock price, global fundamentals and alternative data. https://finnhub.io/docs/api
98 stars 6 forks source link

Quote Endpoint Sometimes Returns '0' for all Data #54

Closed LordA98 closed 4 years ago

LordA98 commented 4 years ago

Hi,

The API is really nice and the call limit is amazing.

However, I seem to be having an issue with some calls to the Quote endpoint.

As batch quotes are not supported, I iterate over an array that contains string values for company symbols and make an API call for each.

The array is similar to this: ['AAPL', 'TSLA', 'FB', 'NFLX', 'SNAP']

Sometimes a value of '0' is returned for each data element. I thought it may have been an application issue, but querying the API directly in the browser also returns the same response sometimes.

I understand there is a limit of 30 calls per second but I am only using 5. I thought it may have been due to API call weighting, but it isn't clear what the weight of a quote API call is?

image

(I have omitted my API key from the image).

Refreshing this would return data but implementing code functionality to handle the 0 cases isn't ideal.

I'd really appreciate any help!

Thanks, Alex

finnhubio commented 4 years ago

Hi,

This issue is due to a spike in usage today. Should be fixed now. Feel free to reopen the issue if it keeps happening tmr.

Finnhub Support,

TJNII commented 4 years ago

Good evening:

I'm seeing this for several symbols. Here is an example:

$ curl "https://finnhub.io/api/v1/quote?symbol=AHL-C&token=$token"
{"c":0,"h":0,"l":0,"o":0,"pc":0,"t":0}

This is a transient error I take it, then? Does it clear on it's own or does it need to be reported?

LordA98 commented 4 years ago

Mine cleared on its own. It occasionally crops up once every now and then but doesn't re-occur for a while. No clear pattern. The only reason I could think of is that I was accidentally using the 60 call per/min limit and not realising.

However, I haven't used the API in a few weeks so can't speak for the error more recently.

TJNII commented 4 years ago

I'm seeing this pretty consistently for symbols with non-alpha characters in them. I tried urlencoding the dash in AHL-C to no effect.

EDIT: This is unrelated to API limits for me. Despite multiple retries AGM-A is the only symbol with a dash I've been able to pull a quote for.