https://github.com/emirkabal/tcmb-doviz
Accessing the official website of the Central Bank of the Republic of Turkey to retrieve exchange rates and instantly parsing the table found on the page into JSON.
https://github.com/emirkabal/tcmb-doviz
Last synced: 3 months ago
JSON representation
Accessing the official website of the Central Bank of the Republic of Turkey to retrieve exchange rates and instantly parsing the table found on the page into JSON.
- Host: GitHub
- URL: https://github.com/emirkabal/tcmb-doviz
- Owner: emirkabal
- License: mit
- Created: 2019-01-25T07:31:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-11T01:51:05.000Z (about 3 years ago)
- Last Synced: 2025-09-28T17:49:22.389Z (8 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/tcmb-doviz
- Size: 21.5 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

**tcmb-doviz** is used only to display the exchange rates of the Central Bank of Turkey.
 
## Installation
```bash
# installation via npm
npm install tcmb-doviz
# installation via yarn
yarn add tcmb-doviz
```
## Examples
```js
const tcmbdoviz = require('tcmb-doviz');
const data = await tcmbdoviz.getData() // Get All Data
console.log(data)
/* Output: {date: '05/11/2021 15:30 (GMT+3)', exchanges: [
{
name: 'ABD DOLARI',
code: 'USD',
buying: 8.2867,
selling: 8.3016
},
{ name: 'EURO', code: 'EUR', buying: 10.0727, selling: 10.0909 }, ...
]} */
const exchangeRate = await tcmbdoviz.getExchangeRate('USD')
console.log(exchangeRate)
/* Output: {
name: 'ABD DOLARI',
code: 'USD',
buying: 8.2867,
selling: 8.3016
} */
const exchangeRates = await tcmbdoviz.getExchangeRates() // Get Exchanges Rates
console.log(exchangeRates)
/* Output: [
{
name: 'ABD DOLARI',
code: 'USD',
buying: 8.2867,
selling: 8.3016
},
{ name: 'EURO', code: 'EUR', buying: 10.0727, selling: 10.0909 }, ...
] */
```
## License
The content of this project itself is licensed under the Creative Commons Attribution 3.0 Unported license, and the underlying source code used to format and display that content is licensed under the MIT license.