- Take information from the exchange about the existing โboardid identifiersโ (boardid) of the Moscow Exchange.
 
 
url = 'https://iss.moex.com/iss/engines/stock/markets/shares/boards/'
 
- Take a complete list of papers for some boardid at Mosbirzhe.
 
 boardid = 'TQBR' 
url = 'https://iss.moex.com/iss/engines/stock/markets/shares/boards/'+ boardid +'/securities.json?iss.meta=off&iss.only=securities&securities.columns=SECID,SECNAME'
 
- Check the summary statistics of securities on the Moscow Exchange.
- Find out the current price for a particular security.
 
 boardid = 'TQBR' 
url = 'http://iss.moex.com/iss/engines/stock/markets/shares/boards/'+ boardid +'/securities.json?iss.meta=off&iss.only=securities&securities.columns=SECID,PREVADMITTEDQUOTE'
 
- Get the price n years ago on a specific date. To do this, in the Mosbirzhi API we pass the boardid, SECID and date, for example:
 - boardid = TQBR
 - SECID = SBER
 - date = 2015-01-10 .
 
 boardid = 'TQBR' 
SECID = 'SBER' 
date = '2015-01-10' 
url = 'http://iss.moex.com/iss/history/engines/stock/markets/shares/boards/'+ boardid +'/securities/'+ SECID +'.json?iss.meta=off&iss.only=history&history.columns=SECID,TRADEDATE,CLOSE&limit=1&from=' + date
 
- Compare yesterday's asset price with the price 5 years ago to find out the profitability.
 
 curStock = 'AFKS'
dateNow = '2020-03-06'
datePre = '2015-03-06'
fetch(getCost(curStock, datePre)).then(result => {
    return (result.json())
}).then(res => {
    let costPre = res.history.data[0][2];
    return (costPre)
}).then(costPre => {
    fetch(getCost(curStock, dateNow)).then(result => {
        return (result.json())
    }).then(res => {
        let costNow = res.history.data[0][2];
        console.log(costPre);
        console.log(costNow);
        console.log(parseInt((costNow * 100) / costPre, 10) - 100)
    })
})
function getCost(id, date) {
    let url = `http://iss.moex.com/iss/history/engines/stock/markets/shares/boards/TQBR/securities/${id}.json?iss.meta=off&iss.only=history&history.columns=SECID,TRADEDATE,CLOSE&limit=1&from=${date}`
    return url;
}