Update Alpha Vantage rate limit handling.
This commit is contained in:
parent
1e1003994c
commit
e8dec0bf64
2 changed files with 7 additions and 7 deletions
|
@ -337,8 +337,8 @@ class AlphaVantage(BaseSource):
|
||||||
|
|
||||||
def _raise_for_generic_errors(self, data):
|
def _raise_for_generic_errors(self, data):
|
||||||
if type(data) is dict:
|
if type(data) is dict:
|
||||||
if "Note" in data and "call frequency" in data["Note"]:
|
if "Information" in data and "daily rate limits" in data["Information"]:
|
||||||
raise exceptions.RateLimit(data["Note"])
|
raise exceptions.RateLimit(data["Information"])
|
||||||
if (
|
if (
|
||||||
"Information" in data
|
"Information" in data
|
||||||
and "unlock" in data["Information"]
|
and "unlock" in data["Information"]
|
||||||
|
|
|
@ -59,11 +59,11 @@ digital_url = re.compile(
|
||||||
)
|
)
|
||||||
|
|
||||||
rate_limit_json = (
|
rate_limit_json = (
|
||||||
'{ "Note": "'
|
'{ "Information": "'
|
||||||
"Thank you for using Alpha Vantage! Our standard API call frequency is 5 "
|
"Thank you for using Alpha Vantage! Our standard API rate limit is 25 "
|
||||||
"calls per minute and 500 calls per day. Please visit "
|
"requests per day. Please subscribe to any of the premium plans at "
|
||||||
"https://www.alphavantage.co/premium/ if you would like to target a higher "
|
"https://www.alphavantage.co/premium/ to instantly remove all daily rate "
|
||||||
"API call frequency."
|
"limits."
|
||||||
'" }'
|
'" }'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue