towards / basic_yahoo_finance

Simple Ruby gem for Yahoo! Finance API
GNU General Public License v3.0
19 stars 9 forks source link

Lookup / Similar Results #1

Closed daviddigital closed 2 years ago

daviddigital commented 2 years ago

Hi, Thanks for building this, very helpful. I thought I could contribute something, but wanted to check first if you've investigated this or are building it. A common use case is to grab a user's input, e.g. APPLE, and suggest a bunch of codes (including AAPL as the top result) https://finance.yahoo.com/lookup?s=APPLE Do you know if this is exposed via the API? Do you think it would be worthwhile for me to add?

Edit: I found an endpoint here with a different base URL https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=apple?device=console&returnMeta=true

brigriffin commented 2 years ago

Hi,

Thanks for your suggestion. I am not really planning to add any search functionality but feel free to submit a PR if you are motivated.

Great that you already found the API endpoint. It is just annoying that the URL is different than the one already used in the code for querying quotes. So if you submit a PR probably that a separate Search class would be best for this functionality where you can define a different API_URL.

daviddigital commented 2 years ago

Cool, I'll take a shot at it. May be able to find the same endpoint on your exisiting URL, I'll play around.