@allratestoday/tcmb-exchange-rate 1.3.29 → 1.3.31

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.
Files changed (2) hide show
  1. package/README.md +25 -75
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -4,16 +4,16 @@
4
4
  [![license](https://img.shields.io/npm/l/@allratestoday%2Ftcmb-exchange-rate.svg)](https://github.com/AllRates-Today/tcmb-exchange-rate/blob/main/LICENSE)
5
5
  [![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](https://www.npmjs.com/package/@allratestoday/tcmb-exchange-rate)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-types%20included-3178C6.svg)](https://www.typescriptlang.org/)
7
- [![USD/TRY today](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Ftcmb%3Fsource%3DUSD%26target%3DTRY&query=%24.rate&label=USD%2FTRY%20published%20by%20Central%20Bank%20of%20T%C3%BCrkiye&color=0A7E8C&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/tcmb/)
7
+ [![USD/TRY today](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Ftcmb%3Fsource%3DUSD%26target%3DTRY&query=%24.rate&label=USD%2FTRY%20official%2C%20Central%20Bank%20of%20T%C3%BCrkiye&color=0A7E8C&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/tcmb/)
8
8
  [![rate date](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Ftcmb%3Fsource%3DUSD%26target%3DTRY&query=%24.rate_date&label=rate%20date&color=555&cacheSeconds=3600)](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 published rates** — Central Bank of Türkiye's own table, with the publisher's own `rate_date` on every response
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
- - 🔀 **Published vs derived, always flagged** — computed inverse/cross pairs carry `derived: true`, never mixed with official prints
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,65 +24,14 @@
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 published table
27
+ ## 📈 Latest official table
28
28
 
29
29
  [![Latest Central Bank of Türkiye table](https://allratestoday.com/api/open/central-bank/tcmb/table.svg)](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
- <details>
35
- <summary>Table as text: published 2026-11-06 by Central Bank of Türkiye — 43 rates. Updated 2026-11-08.</summary>
36
-
37
- | Base | Quote | Type | Rate |
38
- | --- | --- | --- | ---: |
39
- | AED | TRY | buy | 13.5331 |
40
- | AED | TRY | sell | 13.7102 |
41
- | AUD | TRY | buy | 34.2775 |
42
- | AUD | TRY | sell | 34.501 |
43
- | AZN | TRY | buy | 29.2366 |
44
- | AZN | TRY | sell | 29.6192 |
45
- | CAD | TRY | buy | 35.4845 |
46
- | CAD | TRY | sell | 35.6445 |
47
- | CHF | TRY | buy | 60.9569 |
48
- | CHF | TRY | sell | 61.3483 |
49
- | CNY | TRY | buy | 7.4512 |
50
- | CNY | TRY | sell | 7.5487 |
51
- | DKK | TRY | buy | 7.4616 |
52
- | DKK | TRY | sell | 7.4982 |
53
- | EUR | TRY | buy | 55.8603 |
54
- | EUR | TRY | sell | 55.9609 |
55
- | GBP | TRY | buy | 66.8524 |
56
- | GBP | TRY | sell | 67.201 |
57
- | JPY | TRY | buy | 0.31519 |
58
- | JPY | TRY | sell | 0.317277 |
59
- | KRW | TRY | buy | 0.03668 |
60
- | KRW | TRY | sell | 0.03716 |
61
- | KWD | TRY | buy | 161.4495 |
62
- | KWD | TRY | sell | 163.562 |
63
- | KZT | TRY | buy | 0.11087 |
64
- | KZT | TRY | sell | 0.11232 |
65
- | NOK | TRY | buy | 5.3122 |
66
- | NOK | TRY | sell | 5.3479 |
67
- | PKR | TRY | buy | 0.17971 |
68
- | PKR | TRY | sell | 0.18206 |
69
- | QAR | TRY | buy | 13.641 |
70
- | QAR | TRY | sell | 13.8195 |
71
- | RON | TRY | buy | 10.4017 |
72
- | RON | TRY | sell | 10.5378 |
73
- | RUB | TRY | buy | 0.60708 |
74
- | RUB | TRY | sell | 0.61503 |
75
- | SAR | TRY | buy | 13.3162 |
76
- | SAR | TRY | sell | 13.3402 |
77
- | SEK | TRY | buy | 5.0426 |
78
- | SEK | TRY | sell | 5.0948 |
79
- | USD | TRY | buy | 49.9824 |
80
- | USD | TRY | sell | 50.0724 |
81
- | XDR | TRY | buy | 67.7403 |
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.
34
+ _The table is filled in by the daily workflow._
86
35
  <!-- daily-table:end -->
87
36
 
88
37
  ## 📦 Installation
@@ -112,8 +61,8 @@ console.log(pair.rate, pair.rate_date); // the official Central Bank of Türkiye
112
61
 
113
62
  ## 📚 API reference
114
63
 
115
- - [Latest pair rate](#latest-pair-rate) — one pair from the latest published table
116
- - [Full published table](#full-published-table) — everything the central bank printed, in one call
64
+ - [Latest pair rate](#latest-pair-rate) — one pair from the latest official table
65
+ - [Full official table](#full-official-table) — everything the central bank printed, in one call
117
66
  - [Table for a date](#table-for-a-date) — the official table for an invoice or filing date
118
67
  - [Daily time series](#daily-time-series) — one pair across a date range
119
68
 
@@ -121,7 +70,7 @@ console.log(pair.rate, pair.rate_date); // the official Central Bank of Türkiye
121
70
 
122
71
  ### Latest pair rate
123
72
 
124
- Free plan and up. Pairs the central bank does not print directly are resolved from its table and flagged (see *Published vs derived rates* below).
73
+ 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
74
 
126
75
  ```js
127
76
  const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
@@ -133,10 +82,10 @@ const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
133
82
  {
134
83
  bank: 'tcmb',
135
84
  name: 'Central Bank of Türkiye',
136
- rate_date: '2026-10-13', // Central Bank of Türkiye's own publication date
85
+ rate_date: '2026-11-11', // Central Bank of Türkiye's own publication date
137
86
  source: 'USD',
138
87
  target: 'TRY',
139
- rate: 49.3681,
88
+ rate: 50.2282,
140
89
  rate_type: 'sell',
141
90
  derived: false,
142
91
  method: 'published',
@@ -144,7 +93,7 @@ const pair = await getRate('USD', 'TRY', { apiKey: 'art_live_...' });
144
93
  }
145
94
  ```
146
95
 
147
- ### Full published table
96
+ ### Full official table
148
97
 
149
98
  Free plan and up. The complete table for the latest publication date.
150
99
 
@@ -161,11 +110,11 @@ console.log(table.rate_date, table.rates.length);
161
110
  {
162
111
  bank: 'tcmb',
163
112
  name: 'Central Bank of Türkiye',
164
- rate_date: '2026-10-13',
113
+ rate_date: '2026-11-11',
165
114
  rates: [
166
- { "base": "USD", "quote": "TRY", "type": "sell", "value": 49.3681 },
167
- { "base": "USD", "quote": "TRY", "type": "buy", "value": 49.2794 },
168
- // … the rest of the published table (22 currencies vs TRY)
115
+ { "base": "USD", "quote": "TRY", "type": "sell", "value": 50.2282 },
116
+ { "base": "USD", "quote": "TRY", "type": "buy", "value": 50.1379 },
117
+ // … the rest of the official table (22 currencies vs TRY)
169
118
  ],
170
119
  disclaimer: '…'
171
120
  }
@@ -204,7 +153,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
204
153
  import { getHistory } from '@allratestoday/tcmb-exchange-rate';
205
154
 
206
155
  const series = await getHistory(
207
- { source: 'USD', target: 'TRY', from: '2026-01-01', to: '2026-10-13' },
156
+ { source: 'USD', target: 'TRY', from: '2026-01-01', to: '2026-11-11' },
208
157
  { apiKey: 'art_live_...' }
209
158
  );
210
159
  ```
@@ -217,11 +166,11 @@ const series = await getHistory(
217
166
  source: 'USD',
218
167
  target: 'TRY',
219
168
  from: '2026-01-01',
220
- to: '2026-10-13',
169
+ to: '2026-11-11',
221
170
  count: 152,
222
171
  rates: [
223
172
  // one entry per publication date
224
- { date: '2026-10-13', rate: 49.3681, rate_type: 'sell', derived: false, method: 'published' },
173
+ { date: '2026-11-11', rate: 50.2282, rate_type: 'sell', derived: false, method: 'published' },
225
174
  // …
226
175
  ],
227
176
  disclaimer: '…'
@@ -275,7 +224,7 @@ curl "https://allratestoday.com/api/v1/central-bank/tcmb/latest?format=xml&api_k
275
224
  - 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
225
  - Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
277
226
 
278
- ## ⚖️ Published vs derived rates
227
+ ## ⚖️ Official vs derived rates
279
228
 
280
229
  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
230
 
@@ -325,21 +274,21 @@ getRate('USD', 'TRY', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
325
274
 
326
275
  ## 💡 Quota tips
327
276
 
328
- - Rates change once per business day — cache the published table locally and a small monthly quota goes a long way.
277
+ - Rates change once per business day — cache the official table locally and a small monthly quota goes a long way.
329
278
  - Every request counts toward your AllRatesToday quota, shared across all AllRatesToday endpoints on your key.
330
279
 
331
280
  ## 📖 Methods reference
332
281
 
333
282
  | Method | Plan | Description |
334
283
  | ------ | ---- | ----------- |
335
- | `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the published table |
336
- | `getLatestRates({ apiKey })` | Free | The central bank's full latest published table |
284
+ | `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the official table |
285
+ | `getLatestRates({ apiKey })` | Free | The central bank's full latest official table |
337
286
  | `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |
338
287
  | `getHistory({ symbol \| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2020 |
339
288
 
340
289
  ## 📥 Bulk data (no key)
341
290
 
342
- Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
291
+ Need the whole archive rather than an API call? The same official tables are mirrored daily as open data:
343
292
 
344
293
  - Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/tcmb.csv`)
345
294
  - Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
@@ -349,8 +298,9 @@ Need the whole archive rather than an API call? The same published tables are mi
349
298
 
350
299
  - **Website:** [allratestoday.com](https://allratestoday.com)
351
300
  - [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/)
301
+ - [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
302
  - [Download central bank rates](https://allratestoday.com/download-central-bank-rates/) — every bank's latest table and history as Excel, CSV or JSON
303
+ - [Bank Exchange Rate API](https://allratestoday.com/bank-exchange-rate-api/) — live buy and sell rates from 1,200+ commercial banks in 120+ countries · [npm](https://www.npmjs.com/package/bank-exchange-rates) · [GitHub](https://github.com/AllRates-Today/bank-exchange-rates)
354
304
  - [Package docs on the site](https://allratestoday.com/docs/sdk/tcmb-exchange-rate/) · [ERP integration guides](https://allratestoday.com/docs/integrations/)
355
305
  - [API documentation](https://allratestoday.com/docs/#central-bank) · [Interactive reference](https://allratestoday.com/api-reference/) · [Methodology](https://allratestoday.com/official-rates-methodology/)
356
306
  - [Register (Free)](https://allratestoday.com/register) · [Dashboard](https://allratestoday.com/profile) · [Pricing](https://allratestoday.com/pricing/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allratestoday/tcmb-exchange-rate",
3
- "version": "1.3.29",
3
+ "version": "1.3.31",
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",
@@ -10,6 +10,7 @@
10
10
  "turkiye",
11
11
  "exchange-rate",
12
12
  "exchange-rates",
13
+ "exchange-rate-api",
13
14
  "exchangerate",
14
15
  "exchange rate",
15
16
  "exchange rates",