@allratestoday/tcmb-exchange-rate 1.3.27 → 1.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
[](https://github.com/AllRates-Today/tcmb-exchange-rate/blob/main/LICENSE)
|
|
5
5
|
[](https://www.npmjs.com/package/@allratestoday/tcmb-exchange-rate)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
|
-
[](https://allratestoday.com/central-bank-rates-api/tcmb/)
|
|
8
8
|
[](https://allratestoday.com/central-bank-rates-api/tcmb/)
|
|
9
9
|
|
|
10
10
|
**Official Central Bank of Türkiye (Türkiye) daily exchange rates for Node.js and TypeScript. The published central bank rates behind tax filings, customs valuations, audits, and compliant invoicing — not market estimates, but the numbers Central Bank of Türkiye itself prints, every business day.**
|
|
11
11
|
|
|
12
12
|
## 🚀 Why this client?
|
|
13
13
|
|
|
14
|
-
- 🏛️ **Official
|
|
14
|
+
- 🏛️ **Official rates** — Central Bank of Türkiye's own table, with the publisher's own `rate_date` on every response
|
|
15
15
|
- 📅 **History back to 2020** — point-in-time tables and daily series for any past date
|
|
16
|
-
- 🔀 **
|
|
16
|
+
- 🔀 **Official vs derived, always flagged** — computed inverse/cross pairs carry `derived: true`, never mixed with official prints
|
|
17
17
|
- ⚡ **Zero dependencies** — pure ESM + CJS over global `fetch`; Node 18+, Bun, Deno, and edge runtimes
|
|
18
18
|
- 🔷 **Type-safe** — full TypeScript definitions shipped with the package
|
|
19
19
|
- 🧾 **Compliance-grade metadata** — `rate_type`, publication date, and source disclaimer on every response
|
|
@@ -24,14 +24,65 @@
|
|
|
24
24
|
|
|
25
25
|
Get a free API key at [allratestoday.com/register](https://allratestoday.com/register) — no credit card required. Latest rates are on every plan, including free.
|
|
26
26
|
|
|
27
|
-
## 📈 Latest
|
|
27
|
+
## 📈 Latest official table
|
|
28
28
|
|
|
29
29
|
[](https://allratestoday.com/central-bank-rates-api/tcmb/)
|
|
30
30
|
|
|
31
31
|
The image is rendered live from the keyless endpoint, so it follows the central bank's publications on npm and on GitHub alike without a new release. The same table as text is folded below for search and copy-paste: on GitHub [a daily Action](.github/workflows/daily-table.yml) refreshes it whenever the central bank publishes a new table; on npm it is as of the package's publish date.
|
|
32
32
|
|
|
33
33
|
<!-- daily-table:start -->
|
|
34
|
-
|
|
34
|
+
<details>
|
|
35
|
+
<summary>Table as text: published 2026-11-11 by Central Bank of Türkiye — 43 rates. Updated 2026-11-11.</summary>
|
|
36
|
+
|
|
37
|
+
| Base | Quote | Type | Rate |
|
|
38
|
+
| --- | --- | --- | ---: |
|
|
39
|
+
| AED | TRY | buy | 13.5748 |
|
|
40
|
+
| AED | TRY | sell | 13.7525 |
|
|
41
|
+
| AUD | TRY | buy | 34.3604 |
|
|
42
|
+
| AUD | TRY | sell | 34.5845 |
|
|
43
|
+
| AZN | TRY | buy | 29.3276 |
|
|
44
|
+
| AZN | TRY | sell | 29.7113 |
|
|
45
|
+
| CAD | TRY | buy | 35.2164 |
|
|
46
|
+
| CAD | TRY | sell | 35.3753 |
|
|
47
|
+
| CHF | TRY | buy | 60.3996 |
|
|
48
|
+
| CHF | TRY | sell | 60.7874 |
|
|
49
|
+
| CNY | TRY | buy | 7.4736 |
|
|
50
|
+
| CNY | TRY | sell | 7.5713 |
|
|
51
|
+
| DKK | TRY | buy | 7.4637 |
|
|
52
|
+
| DKK | TRY | sell | 7.5004 |
|
|
53
|
+
| EUR | TRY | buy | 55.8804 |
|
|
54
|
+
| EUR | TRY | sell | 55.981 |
|
|
55
|
+
| GBP | TRY | buy | 66.6892 |
|
|
56
|
+
| GBP | TRY | sell | 67.0369 |
|
|
57
|
+
| JPY | TRY | buy | 0.314666 |
|
|
58
|
+
| JPY | TRY | sell | 0.31675 |
|
|
59
|
+
| KRW | TRY | buy | 0.03736 |
|
|
60
|
+
| KRW | TRY | sell | 0.03785 |
|
|
61
|
+
| KWD | TRY | buy | 161.7417 |
|
|
62
|
+
| KWD | TRY | sell | 163.8581 |
|
|
63
|
+
| KZT | TRY | buy | 0.11184 |
|
|
64
|
+
| KZT | TRY | sell | 0.1133 |
|
|
65
|
+
| NOK | TRY | buy | 5.2489 |
|
|
66
|
+
| NOK | TRY | sell | 5.2842 |
|
|
67
|
+
| PKR | TRY | buy | 0.18025 |
|
|
68
|
+
| PKR | TRY | sell | 0.18261 |
|
|
69
|
+
| QAR | TRY | buy | 13.6782 |
|
|
70
|
+
| QAR | TRY | sell | 13.8571 |
|
|
71
|
+
| RON | TRY | buy | 10.3962 |
|
|
72
|
+
| RON | TRY | sell | 10.5322 |
|
|
73
|
+
| RUB | TRY | buy | 0.60214 |
|
|
74
|
+
| RUB | TRY | sell | 0.61002 |
|
|
75
|
+
| SAR | TRY | buy | 13.3594 |
|
|
76
|
+
| SAR | TRY | sell | 13.3834 |
|
|
77
|
+
| SEK | TRY | buy | 5.04 |
|
|
78
|
+
| SEK | TRY | sell | 5.0922 |
|
|
79
|
+
| USD | TRY | buy | 50.1379 |
|
|
80
|
+
| USD | TRY | sell | 50.2282 |
|
|
81
|
+
| XDR | TRY | buy | 67.8422 |
|
|
82
|
+
|
|
83
|
+
</details>
|
|
84
|
+
|
|
85
|
+
Source: [Official rates published by TCMB, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/tcmb/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
|
|
35
86
|
<!-- daily-table:end -->
|
|
36
87
|
|
|
37
88
|
## 📦 Installation
|
|
@@ -61,8 +112,8 @@ console.log(pair.rate, pair.rate_date); // the official Central Bank of Türkiye
|
|
|
61
112
|
|
|
62
113
|
## 📚 API reference
|
|
63
114
|
|
|
64
|
-
- [Latest pair rate](#latest-pair-rate) — one pair from the latest
|
|
65
|
-
- [Full
|
|
115
|
+
- [Latest pair rate](#latest-pair-rate) — one pair from the latest official table
|
|
116
|
+
- [Full official table](#full-official-table) — everything the central bank printed, in one call
|
|
66
117
|
- [Table for a date](#table-for-a-date) — the official table for an invoice or filing date
|
|
67
118
|
- [Daily time series](#daily-time-series) — one pair across a date range
|
|
68
119
|
|
|
@@ -70,7 +121,7 @@ console.log(pair.rate, pair.rate_date); // the official Central Bank of Türkiye
|
|
|
70
121
|
|
|
71
122
|
### Latest pair rate
|
|
72
123
|
|
|
73
|
-
Free plan and up. Pairs the central bank does not print directly are resolved from its table and flagged (see *
|
|
124
|
+
Free plan and up. Pairs the central bank does not print directly are resolved from its table and flagged (see *Official vs derived rates* below).
|
|
74
125
|
|
|
75
126
|
```js
|
|
76
127
|
const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
|
|
@@ -82,10 +133,10 @@ const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
|
|
|
82
133
|
{
|
|
83
134
|
bank: 'tcmb',
|
|
84
135
|
name: 'Central Bank of Türkiye',
|
|
85
|
-
rate_date: '2026-
|
|
136
|
+
rate_date: '2026-11-11', // Central Bank of Türkiye's own publication date
|
|
86
137
|
source: 'USD',
|
|
87
138
|
target: 'TRY',
|
|
88
|
-
rate:
|
|
139
|
+
rate: 50.2282,
|
|
89
140
|
rate_type: 'sell',
|
|
90
141
|
derived: false,
|
|
91
142
|
method: 'published',
|
|
@@ -93,7 +144,7 @@ const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
|
|
|
93
144
|
}
|
|
94
145
|
```
|
|
95
146
|
|
|
96
|
-
### Full
|
|
147
|
+
### Full official table
|
|
97
148
|
|
|
98
149
|
Free plan and up. The complete table for the latest publication date.
|
|
99
150
|
|
|
@@ -110,11 +161,11 @@ console.log(table.rate_date, table.rates.length);
|
|
|
110
161
|
{
|
|
111
162
|
bank: 'tcmb',
|
|
112
163
|
name: 'Central Bank of Türkiye',
|
|
113
|
-
rate_date: '2026-
|
|
164
|
+
rate_date: '2026-11-11',
|
|
114
165
|
rates: [
|
|
115
|
-
{ "base": "USD", "quote": "TRY", "type": "sell", "value":
|
|
116
|
-
{ "base": "USD", "quote": "TRY", "type": "buy", "value":
|
|
117
|
-
// … the rest of the
|
|
166
|
+
{ "base": "USD", "quote": "TRY", "type": "sell", "value": 50.2282 },
|
|
167
|
+
{ "base": "USD", "quote": "TRY", "type": "buy", "value": 50.1379 },
|
|
168
|
+
// … the rest of the official table (22 currencies vs TRY)
|
|
118
169
|
],
|
|
119
170
|
disclaimer: '…'
|
|
120
171
|
}
|
|
@@ -153,7 +204,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
153
204
|
import { getHistory } from '@allratestoday/tcmb-exchange-rate';
|
|
154
205
|
|
|
155
206
|
const series = await getHistory(
|
|
156
|
-
{ source: 'USD', target: 'TRY', from: '2026-01-01', to: '2026-
|
|
207
|
+
{ source: 'USD', target: 'TRY', from: '2026-01-01', to: '2026-11-11' },
|
|
157
208
|
{ apiKey: 'art_live_...' }
|
|
158
209
|
);
|
|
159
210
|
```
|
|
@@ -166,11 +217,11 @@ const series = await getHistory(
|
|
|
166
217
|
source: 'USD',
|
|
167
218
|
target: 'TRY',
|
|
168
219
|
from: '2026-01-01',
|
|
169
|
-
to: '2026-
|
|
220
|
+
to: '2026-11-11',
|
|
170
221
|
count: 152,
|
|
171
222
|
rates: [
|
|
172
223
|
// one entry per publication date
|
|
173
|
-
{ date: '2026-
|
|
224
|
+
{ date: '2026-11-11', rate: 50.2282, rate_type: 'sell', derived: false, method: 'published' },
|
|
174
225
|
// …
|
|
175
226
|
],
|
|
176
227
|
disclaimer: '…'
|
|
@@ -224,7 +275,7 @@ curl "https://allratestoday.com/api/v1/central-bank/tcmb/latest?format=xml&api_k
|
|
|
224
275
|
- Evaluating? Agents can self-issue a trial key with no signup: `POST https://allratestoday.com/api/agent/keys` (send `Content-Type: application/json`) returns a 100-call key valid 7 days that covers the free-plan methods (latest table, pairs); dated tables and history need a [paid plan](https://allratestoday.com/pricing/). The MCP servers expose it as `request_trial_key`
|
|
225
276
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
226
277
|
|
|
227
|
-
## ⚖️
|
|
278
|
+
## ⚖️ Official vs derived rates
|
|
228
279
|
|
|
229
280
|
If Central Bank of Türkiye does not print a pair directly, the API resolves it from the central bank's own table and says so — official and computed values are never confused:
|
|
230
281
|
|
|
@@ -274,21 +325,21 @@ getRate('USD', 'TRY', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
|
|
|
274
325
|
|
|
275
326
|
## 💡 Quota tips
|
|
276
327
|
|
|
277
|
-
- Rates change once per business day — cache the
|
|
328
|
+
- Rates change once per business day — cache the official table locally and a small monthly quota goes a long way.
|
|
278
329
|
- Every request counts toward your AllRatesToday quota, shared across all AllRatesToday endpoints on your key.
|
|
279
330
|
|
|
280
331
|
## 📖 Methods reference
|
|
281
332
|
|
|
282
333
|
| Method | Plan | Description |
|
|
283
334
|
| ------ | ---- | ----------- |
|
|
284
|
-
| `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the
|
|
285
|
-
| `getLatestRates({ apiKey })` | Free | The central bank's full latest
|
|
335
|
+
| `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the official table |
|
|
336
|
+
| `getLatestRates({ apiKey })` | Free | The central bank's full latest official table |
|
|
286
337
|
| `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |
|
|
287
338
|
| `getHistory({ symbol \| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2020 |
|
|
288
339
|
|
|
289
340
|
## 📥 Bulk data (no key)
|
|
290
341
|
|
|
291
|
-
Need the whole archive rather than an API call? The same
|
|
342
|
+
Need the whole archive rather than an API call? The same official tables are mirrored daily as open data:
|
|
292
343
|
|
|
293
344
|
- Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/tcmb.csv`)
|
|
294
345
|
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
|
|
@@ -298,7 +349,7 @@ Need the whole archive rather than an API call? The same published tables are mi
|
|
|
298
349
|
|
|
299
350
|
- **Website:** [allratestoday.com](https://allratestoday.com)
|
|
300
351
|
- [Central Bank of Türkiye rates page](https://allratestoday.com/central-bank-rates-api/tcmb/) — live table, publication cadence, FAQ
|
|
301
|
-
- [All central bank sources](https://allratestoday.com/central-bank-rates-api/)
|
|
352
|
+
- [All central bank sources](https://allratestoday.com/central-bank-rates-api/) · [Full list of 130+ central banks and tax authorities](https://allratestoday.com/central-bank-rates-api/institutions/) — one API, the same response shape for every source
|
|
302
353
|
- [Download central bank rates](https://allratestoday.com/download-central-bank-rates/) — every bank's latest table and history as Excel, CSV or JSON
|
|
303
354
|
- [Package docs on the site](https://allratestoday.com/docs/sdk/tcmb-exchange-rate/) · [ERP integration guides](https://allratestoday.com/docs/integrations/)
|
|
304
355
|
- [API documentation](https://allratestoday.com/docs/#central-bank) · [Interactive reference](https://allratestoday.com/api-reference/) · [Methodology](https://allratestoday.com/official-rates-methodology/)
|
|
@@ -306,6 +357,7 @@ Need the whole archive rather than an API call? The same published tables are mi
|
|
|
306
357
|
- [Status](https://allratestoday.com/status)
|
|
307
358
|
- [Postman collection](https://allratestoday.com/postman/)
|
|
308
359
|
- [ChatGPT app](https://chatgpt.com/plugins/plugin_asdk_app_6ae1e76098f48191a285ac3f5ab7a83b) — ask ChatGPT for live and official central bank rates
|
|
360
|
+
- [OpenAPI reference on Bump.sh](https://bump.sh/allratestoday/doc/allratestoday-api) — also on [SwaggerHub](https://app.swaggerhub.com/apis-docs/allratestoday/allratestoday-exchange-rate-central-bank-rates-api/2.2.0)
|
|
309
361
|
- [GitHub](https://github.com/AllRates-Today/tcmb-exchange-rate)
|
|
310
362
|
|
|
311
363
|
## 📜 License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allratestoday/tcmb-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.30",
|
|
4
4
|
"description": "Official Central Bank of Türkiye (Türkiye) daily exchange rates — 22 currencies vs TRY, history since 2020. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tcmb",
|