Get Indicative Exchange Rates Announced by the Central Bank of Turkey
https://www.npmjs.com/package/tcmb-doviz-kuru
npm i tcmb-doviz-kuru --save
var tcmbDovizKuru = require("tcmb-doviz-kuru");
try {
const currentRates = await tcmbDovizKuru.today(); // All of today's exchange rates
const currentUSD = await tcmbDovizKuru.today("USD"); // Today's USD exchange rates
const specificRates = await tcmbDovizKuru.date("01/01/2019"); // Specific date's exchange rates
const specificUSD = await tcmbDovizKuru.date("01/01/2019", "USD"); // Specific date's USD rates
} catch (error) {
// handle error
}
{
"tarihDate": {
"attributes": {
"tarih": "19.11.2019",
"date": "11/19/2019",
"bultenNo": "2019/217"
},
"currency": [
{
"attributes": {
"crossOrder": "0",
"kod": "USD",
"currencyCode": "USD"
},
"unit": 1,
"isim": "ABD DOLARI",
"currencyName": "US DOLLAR",
"forexBuying": 5.7153,
"forexSelling": 5.7256,
"banknoteBuying": 5.7113,
"banknoteSelling": 5.7342,
"crossRateUSD": null,
"crossRateOther": null
},
{
"attributes": {
"crossOrder": "1",
"kod": "AUD",
"currencyCode": "AUD"
},
"unit": 1,
"isim": "AVUSTRALYA DOLARI",
"currencyName": "AUSTRALIAN DOLLAR",
"forexBuying": 3.8825,
"forexSelling": 3.9078,
"banknoteBuying": 3.8646,
"banknoteSelling": 3.9312,
"crossRateUSD": 1.4686,
"crossRateOther": null
},
.
.
.
]
}
}
{
"tarihDate": {
"attributes": {
"tarih": "19.11.2019",
"date": "11/19/2019",
"bultenNo": "2019/217"
},
"currency": {
"attributes": {
"crossOrder": "0",
"kod": "USD",
"currencyCode": "USD"
},
"unit": 1,
"isim": "ABD DOLARI",
"currencyName": "US DOLLAR",
"forexBuying": 5.7153,
"forexSelling": 5.7256,
"banknoteBuying": 5.7113,
"banknoteSelling": 5.7342,
"crossRateUSD": null,
"crossRateOther": null
}
}
}
Copyright (c) 2016 Gokhan Doslu Released under the MIT license