return last price of currency like dollar, pound, euro, bitcoin plus oil and gold price in rials(or tomans)
npm install dollar-tomans-apish
npm i dollar-tomans-api
`نحوه استفاده
`javascript
const { fetchAll, fetchFootbalLeageTable } = require('dollar-tomans-api');
...
...
var lastPrice = await fetchAll();var leageTable = await fetchFootbalLeageTable();
`
خروجی
`javascriptlastPrice = {
"timestamp": 1648463109494,
"currency": {
"dollar": {
"price": "264,240",
"change": {
"type": "positive",
"change": "(0.63%)"
},
"codes": "USD",
"symbol": "$"
},
"euro": {
"price": "290,060",
"change": {
"type": "positive",
"change": "(0.57%)"
},
"codes": "EUR",
"symbol": "€"
},
"bitcoin": {
"price": "47036.03",
"change": {
"type": "positive",
"change": "(4.88%)"
},
"codes": "BTC",
"symbol": "₿"
},
"pound": {
"price": "347,880",
"change": {
"type": "positive",
"change": "(0.22%) 760"
},
"codes": "GBP",
"symbol": "£"
},
"canadaDollar": {
"price": "211,400",
"change": {
"type": "positive",
"change": "(0.48%) 1,000"
},
"codes": "CAD",
"symbol": "$"
},
"austDollar": {
"price": "201,600",
"change": {
"type": "positive",
"change": "(0.65%) 1,300"
},
"codes": "AUD",
"symbol": "$"
},
"franc": {
"price": "285,000",
"change": {
"type": "none",
"change": "(0.07%) 200"
},
"codes": "CHF",
"symbol": "fr"
},
"sweedSek": {
"price": "28,000",
"change": {
"type": "none",
"change": "(0%) 0"
},
"codes": "SEK",
"symbol": "kr"
},
"lier": {
"price": "18,800",
"change": {
"type": "positive",
"change": "(0.53%) 100"
},
"codes": "TRY",
"symbol": "₺"
},
"yuan": {
"price": "42,000",
"change": {
"type": "positive",
"change": "(0.48%) 200"
},
"codes": "CNY",
"symbol": "¥"
},
"roble": {
"price": "2,800",
"change": {
"type": "positive",
"change": "(2.56%) 70"
},
"codes": "RUB",
"symbol": "₽"
},
"uae": {
"price": "71,930",
"change": {
"type": "positive",
"change": "(0.63%) 450"
},
"codes": "AED",
"symbol": "د.إ"
},
"iraqDinar": {
"price": "181",
"change": {
"type": "positive",
"change": "(0.56%) 1"
},
"codes": "IQD",
"symbol": "د.ع"
},
"saudiArabiaRials": {
"price": "77,630",
"change": {
"type": "positive",
"change": "(0.57%) 440"
},
"codes": "SAR",
"symbol": "﷼"
},
"qatarRials": {
"price": "74,100",
"change": {
"type": "positive",
"change": "(0.82%) 600"
},
"codes": "QAR",
"symbol": "﷼"
},
"omanRials": {
"price": "695,200",
"change": {
"type": "positive",
"change": "(0.89%) 6,100"
},
"codes": "OMR",
"symbol": "﷼"
}
},
"gold": {
"seke": "124,480,000",
"goldOns": "1,928.72",
"goldMesghal": "53,880,000",
"gold18": "12,425,000"
},
"oil": {
"oilBrent": "113.56"
},
"other": {
"iranstock": "1,418,611.5",
"bitcoin": {
"price": "47036.03",
"change": {
"type": "positive",
"change": "(4.88%)"
},
"codes": "BTC",
"symbol": "₿"
}
}
}
``