Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to perform searches? #13

Open
matheusft opened this issue Jun 22, 2021 · 5 comments
Open

Is it possible to perform searches? #13

matheusft opened this issue Jun 22, 2021 · 5 comments

Comments

@matheusft
Copy link

Is the Search API implemented here?
https://eodhistoricaldata.com/api/search/{query_string}

Search API for Stocks, ETFs, Mutual Funds and Indices

@deios0
Copy link
Member

deios0 commented Jun 22, 2021

Yes, you are right, the Search API is implemented here.

@matheusft
Copy link
Author

I'm sorry, I did not find the function in the documentation nor in the code.
Can you point me in the right direction or provide a code sample, please?

I would like to perform this:
https://eodhistoricaldata.com/api/search/GB0008706128?api_token={API_TOKEN}

@deios0
Copy link
Member

deios0 commented Jun 24, 2021

Hello Matheus, this API endpoint had been developed recently and we did not update Python code for this API feed, we will do it soon, and as a quick workaround I can recommend using import JSON, basically, there is only two lines of the code:

import urllib.request, json 
with urllib.request.urlopen("https://eodhistoricaldata.com/api/search/GB0008706128?api_token={API_TOKEN}") as url:
data = json.loads(url.read().decode())
print(data)

@matheusft
Copy link
Author

Hi, thanks for answering.
No problem. I am already doing that.
I was just looking for a more concise way to do it.

@deios0
Copy link
Member

deios0 commented Jun 24, 2021

Thank you for the response, we also will publish the updated code for our new APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants