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

Retrieve the type of an asset #209

Closed hourliert closed 4 years ago

hourliert commented 4 years ago

Hi,

That might be a very dumb question, but I am trying to get the category of a stock asset (eg. ETF, index fund, stock, etc). Is there a way of doing that using the API?

Thanks in advance.

hourliert commented 4 years ago

Thanks for your reply.

This seems to work well to retrieve the company info of a stock (eg. https://finnhub.io/api/v1/stock/profile2?symbol=AAPL&token={{Token}} or https://finnhub.io/api/v1/stock/profile2?symbol=AMD&token={{Token}}) but it returns an empty object {} when I use it with an ETF

Eg. https://finnhub.io/api/v1/stock/profile2?symbol=VWRL&token={{Token}} or https://finnhub.io/api/v1/stock/profile2?symbol=VWRl.L&token={{Token}}

All return {}.

What's interesting is that when I query https://finnhub.io/api/v1/stock/symbol?exchange=L&token={{Token}} to get all the stocks from the London Stock Exchange, I actually getVWRL.L in the response.

Any idea what I am doing wrong?

Thanks in advance

On Thu, May 7, 2020 at 11:21 PM Pranavkumar Patel notifications@github.com wrote:

Check out Company Profile 2: https://finnhub.io/api/v1/stock/profile2?symbol=AAPL&token={{Token}}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/finnhubio/Finnhub-API/issues/209#issuecomment-625526487, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZVZVSTOVHVRWXYALFQKITRQMX7HANCNFSM4M3WGSGQ .

finnhubio commented 4 years ago

This is not possible with the current API unfortunately.

hourliert commented 4 years ago

No worries. Thanks! I hope this will be available at some point :)