Limit of multiple Quote in a finance google API call

坚强是说给别人听的谎言 提交于 2019-12-11 09:53:21

问题


I have thousands of stock symbol and for real time prices requesting finance google API, as an example http://finance.google.com/finance/info?client=ig&q=AAPL in the above I am getting price of AAPL, so I am considering it like single HTTP request for signle stock i.e AAPL

Now my question is: - can I pass all the stock symbol (assume 400-500) with comma separte to a single URL, If NO then what is the max limit of symobl that will be going to pass a API URL? - Another point is , Assume if I am passing 400-500 stock symbol to a API, will it be consider a single HTTP request? or It will be 400/500 HTTP request (as per the passed symbols)


回答1:


I gave it a simple test, request with multiple comma separated stock symbols can be responded correctly by Google finance:

curl -s http://finance.google.com/finance/info?client=ig&q=APPL,FB

And I tried to use up to 300 stock symbols and it is working fine for me, and if you pass a really great number of stock symbols in single request (over 3000 stock symbols in my test), an HTTP 413 response is returned by Google's server saying the request is too large to be handled.

About the rate limit, according to this thread:

We don't have a formal per day limitation. There is rate limiting per minute and per hour but it varies depending on the load of the entire system. If you're refreshing once per minute or two that should be fine. (and in reality most users aren't modifying their portfolios every 5 minutes).

There used to be a 200 transaction total, I believe that has been raised significantly now.



来源:https://stackoverflow.com/questions/35939894/limit-of-multiple-quote-in-a-finance-google-api-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!