Research Insights

Learn to use the YH Finance API to know more about the issuer and the security.

A security is as stable as its issuer entity. Therefore, while looking at a security, the traders also like to know about the company that issued the security. Details like asset reports, liability reports and the past track of the issuer can really help the investor decide whether to trust the issuer or not.

Endpoint for research insights

We can use the endpoint https://yfapi.net/ws/insights/v1/finance/insights to get an insight into the company and some key metrics of the security.

Request Parameters

This endpoint has only one following query parameter:

Parameters

Category

Type

Description

symbol

required

string

This is the symbol of the security we want to search for. The table in the Appendix contains some symbols that we can use to test this endpoint.

Let's look at how we can use this endpoint to get insights into a specific stock. Click "Run" to get the desired data.

Press + to interact
const endpointUrl = new URL('https://yfapi.net/ws/insights/v1/finance/insights');
const queryParameters = new URLSearchParams({
'symbol':'AAPL' //AAPL is the symbol for Apple Inc.
});
const headerParameters = {
'X-API-KEY': '{{API_KEY}}'
}
const options = {
method: 'GET',
headers: headerParameters
};
async function fetchInsights() {
try {
endpointUrl.search = queryParameters;
const response = await fetch(endpointUrl, options);
printResponse(response);
} catch (error) {
printError(error);
}
}
fetchInsights();

Let's look at the code in the widget above:

  • Line 1: We set the URL to https://yfapi.net/ws/insights/v1/finance/insights.

  • Lines 3–5: We define the query parameters.

  • Lines 16–24: We define a function fetchInsights() that calls this endpoints and prints the response.

We can replace AAPL in line 4 with the symbol of any other security to get an insight about that security.

Response fields

We'll get key technical metrics and valuation of the stock, recommendations, reports about the stock, the holder company's information, along with the information of the sector the company belongs to. Some key response fields are mentioned below:

Response fields

Description

companySnapshot

This list contains company metrics like dividends, sustainability index, and innovativeness index which can give us a snapshot of the company.

instrumentInfo

This list contains security metrics like valuation, technical events, and recommendations which can give us a snapshot of the security.

reports

This is the list of the published news related to this security.

Note: The response also contains other important information. The information varies depending on the symbol that we search for.