@allratestoday/tcmb-exchange-rate 1.3.29 → 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 +67 -67
- 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,7 +24,7 @@
|
|
|
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
|
|
|
@@ -32,53 +32,53 @@ The image is rendered live from the keyless endpoint, so it follows the central
|
|
|
32
32
|
|
|
33
33
|
<!-- daily-table:start -->
|
|
34
34
|
<details>
|
|
35
|
-
<summary>Table as text: published 2026-11-
|
|
35
|
+
<summary>Table as text: published 2026-11-11 by Central Bank of Türkiye — 43 rates. Updated 2026-11-11.</summary>
|
|
36
36
|
|
|
37
37
|
| Base | Quote | Type | Rate |
|
|
38
38
|
| --- | --- | --- | ---: |
|
|
39
|
-
| AED | TRY | buy | 13.
|
|
40
|
-
| AED | TRY | sell | 13.
|
|
41
|
-
| AUD | TRY | buy | 34.
|
|
42
|
-
| AUD | TRY | sell | 34.
|
|
43
|
-
| AZN | TRY | buy | 29.
|
|
44
|
-
| AZN | TRY | sell | 29.
|
|
45
|
-
| CAD | TRY | buy | 35.
|
|
46
|
-
| CAD | TRY | sell | 35.
|
|
47
|
-
| CHF | TRY | buy | 60.
|
|
48
|
-
| CHF | TRY | sell |
|
|
49
|
-
| CNY | TRY | buy | 7.
|
|
50
|
-
| CNY | TRY | sell | 7.
|
|
51
|
-
| DKK | TRY | buy | 7.
|
|
52
|
-
| DKK | TRY | sell | 7.
|
|
53
|
-
| EUR | TRY | buy | 55.
|
|
54
|
-
| EUR | TRY | sell | 55.
|
|
55
|
-
| GBP | TRY | buy | 66.
|
|
56
|
-
| GBP | TRY | sell | 67.
|
|
57
|
-
| JPY | TRY | buy | 0.
|
|
58
|
-
| JPY | TRY | sell | 0.
|
|
59
|
-
| KRW | TRY | buy | 0.
|
|
60
|
-
| KRW | TRY | sell | 0.
|
|
61
|
-
| KWD | TRY | buy | 161.
|
|
62
|
-
| KWD | TRY | sell | 163.
|
|
63
|
-
| KZT | TRY | buy | 0.
|
|
64
|
-
| KZT | TRY | sell | 0.
|
|
65
|
-
| NOK | TRY | buy | 5.
|
|
66
|
-
| NOK | TRY | sell | 5.
|
|
67
|
-
| PKR | TRY | buy | 0.
|
|
68
|
-
| PKR | TRY | sell | 0.
|
|
69
|
-
| QAR | TRY | buy | 13.
|
|
70
|
-
| QAR | TRY | sell | 13.
|
|
71
|
-
| RON | TRY | buy | 10.
|
|
72
|
-
| RON | TRY | sell | 10.
|
|
73
|
-
| RUB | TRY | buy | 0.
|
|
74
|
-
| RUB | TRY | sell | 0.
|
|
75
|
-
| SAR | TRY | buy | 13.
|
|
76
|
-
| SAR | TRY | sell | 13.
|
|
77
|
-
| SEK | TRY | buy | 5.
|
|
78
|
-
| SEK | TRY | sell | 5.
|
|
79
|
-
| USD | TRY | buy |
|
|
80
|
-
| USD | TRY | sell | 50.
|
|
81
|
-
| XDR | TRY | buy | 67.
|
|
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
82
|
|
|
83
83
|
</details>
|
|
84
84
|
|
|
@@ -112,8 +112,8 @@ console.log(pair.rate, pair.rate_date); // the official Central Bank of Türkiye
|
|
|
112
112
|
|
|
113
113
|
## 📚 API reference
|
|
114
114
|
|
|
115
|
-
- [Latest pair rate](#latest-pair-rate) — one pair from the latest
|
|
116
|
-
- [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
|
|
117
117
|
- [Table for a date](#table-for-a-date) — the official table for an invoice or filing date
|
|
118
118
|
- [Daily time series](#daily-time-series) — one pair across a date range
|
|
119
119
|
|
|
@@ -121,7 +121,7 @@ console.log(pair.rate, pair.rate_date); // the official Central Bank of Türkiye
|
|
|
121
121
|
|
|
122
122
|
### Latest pair rate
|
|
123
123
|
|
|
124
|
-
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).
|
|
125
125
|
|
|
126
126
|
```js
|
|
127
127
|
const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
|
|
@@ -133,10 +133,10 @@ const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
|
|
|
133
133
|
{
|
|
134
134
|
bank: 'tcmb',
|
|
135
135
|
name: 'Central Bank of Türkiye',
|
|
136
|
-
rate_date: '2026-
|
|
136
|
+
rate_date: '2026-11-11', // Central Bank of Türkiye's own publication date
|
|
137
137
|
source: 'USD',
|
|
138
138
|
target: 'TRY',
|
|
139
|
-
rate:
|
|
139
|
+
rate: 50.2282,
|
|
140
140
|
rate_type: 'sell',
|
|
141
141
|
derived: false,
|
|
142
142
|
method: 'published',
|
|
@@ -144,7 +144,7 @@ const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
|
|
|
144
144
|
}
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
### Full
|
|
147
|
+
### Full official table
|
|
148
148
|
|
|
149
149
|
Free plan and up. The complete table for the latest publication date.
|
|
150
150
|
|
|
@@ -161,11 +161,11 @@ console.log(table.rate_date, table.rates.length);
|
|
|
161
161
|
{
|
|
162
162
|
bank: 'tcmb',
|
|
163
163
|
name: 'Central Bank of Türkiye',
|
|
164
|
-
rate_date: '2026-
|
|
164
|
+
rate_date: '2026-11-11',
|
|
165
165
|
rates: [
|
|
166
|
-
{ "base": "USD", "quote": "TRY", "type": "sell", "value":
|
|
167
|
-
{ "base": "USD", "quote": "TRY", "type": "buy", "value":
|
|
168
|
-
// … 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)
|
|
169
169
|
],
|
|
170
170
|
disclaimer: '…'
|
|
171
171
|
}
|
|
@@ -204,7 +204,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
204
204
|
import { getHistory } from '@allratestoday/tcmb-exchange-rate';
|
|
205
205
|
|
|
206
206
|
const series = await getHistory(
|
|
207
|
-
{ source: 'USD', target: 'TRY', from: '2026-01-01', to: '2026-
|
|
207
|
+
{ source: 'USD', target: 'TRY', from: '2026-01-01', to: '2026-11-11' },
|
|
208
208
|
{ apiKey: 'art_live_...' }
|
|
209
209
|
);
|
|
210
210
|
```
|
|
@@ -217,11 +217,11 @@ const series = await getHistory(
|
|
|
217
217
|
source: 'USD',
|
|
218
218
|
target: 'TRY',
|
|
219
219
|
from: '2026-01-01',
|
|
220
|
-
to: '2026-
|
|
220
|
+
to: '2026-11-11',
|
|
221
221
|
count: 152,
|
|
222
222
|
rates: [
|
|
223
223
|
// one entry per publication date
|
|
224
|
-
{ date: '2026-
|
|
224
|
+
{ date: '2026-11-11', rate: 50.2282, rate_type: 'sell', derived: false, method: 'published' },
|
|
225
225
|
// …
|
|
226
226
|
],
|
|
227
227
|
disclaimer: '…'
|
|
@@ -275,7 +275,7 @@ curl "https://allratestoday.com/api/v1/central-bank/tcmb/latest?format=xml&api_k
|
|
|
275
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`
|
|
276
276
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
277
277
|
|
|
278
|
-
## ⚖️
|
|
278
|
+
## ⚖️ Official vs derived rates
|
|
279
279
|
|
|
280
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:
|
|
281
281
|
|
|
@@ -325,21 +325,21 @@ getRate('USD', 'TRY', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
|
|
|
325
325
|
|
|
326
326
|
## 💡 Quota tips
|
|
327
327
|
|
|
328
|
-
- 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.
|
|
329
329
|
- Every request counts toward your AllRatesToday quota, shared across all AllRatesToday endpoints on your key.
|
|
330
330
|
|
|
331
331
|
## 📖 Methods reference
|
|
332
332
|
|
|
333
333
|
| Method | Plan | Description |
|
|
334
334
|
| ------ | ---- | ----------- |
|
|
335
|
-
| `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the
|
|
336
|
-
| `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 |
|
|
337
337
|
| `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |
|
|
338
338
|
| `getHistory({ symbol \| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2020 |
|
|
339
339
|
|
|
340
340
|
## 📥 Bulk data (no key)
|
|
341
341
|
|
|
342
|
-
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:
|
|
343
343
|
|
|
344
344
|
- Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/tcmb.csv`)
|
|
345
345
|
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
|
|
@@ -349,7 +349,7 @@ Need the whole archive rather than an API call? The same published tables are mi
|
|
|
349
349
|
|
|
350
350
|
- **Website:** [allratestoday.com](https://allratestoday.com)
|
|
351
351
|
- [Central Bank of Türkiye rates page](https://allratestoday.com/central-bank-rates-api/tcmb/) — live table, publication cadence, FAQ
|
|
352
|
-
- [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
|
|
353
353
|
- [Download central bank rates](https://allratestoday.com/download-central-bank-rates/) — every bank's latest table and history as Excel, CSV or JSON
|
|
354
354
|
- [Package docs on the site](https://allratestoday.com/docs/sdk/tcmb-exchange-rate/) · [ERP integration guides](https://allratestoday.com/docs/integrations/)
|
|
355
355
|
- [API documentation](https://allratestoday.com/docs/#central-bank) · [Interactive reference](https://allratestoday.com/api-reference/) · [Methodology](https://allratestoday.com/official-rates-methodology/)
|
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",
|