Investment Portofolio
The goal of this App is to track your financial instruments synchronizing with Yahoo-Finance.
Visual representation of instruments profitability with Apache ECharts:
Sector distribution :
You should set your RapidAPI - Key in order to connect with Yahoo - Finance :
function fetchMarketPrice(symbol) {
const encodedParams = new URLSearchParams();
encodedParams.append('symbol', symbol);
const options = {
method: 'POST',
headers: {
'content-type': 'application/x-www-form-urlencoded',
'X-RapidAPI-Key': '00000022222',
'X-RapidAPI-Host': 'yahoo-finance97.p.rapidapi.com',
},
body: encodedParams,
};
return fetch('https://yahoo-finance97.p.rapidapi.com/stock-info', options)
.then((response) => response.json())
.then((response) => {
return {
symbol,
marketP: parseInt(response.data.currentPrice),
};
})
.catch((err) => console.error(err));
}
Current app can connect with external investment-portofolio-api to store data in DB .
- Clone api
- npm instal
- Start API - npm start
- From current UI make request to investment-portofolio-api