datestringwajib
Historical date in ISO format YYYY-MM-DD.
https://api.sandbase.ai/v1/api/x-rates/historical-rates-tableFetches historical exchange rates for a base currency against all supported currencies on a specific date. The date must be in ISO YYYY-MM-DD format. Returns the same structure as the current rates table but for the specified historical date.
Output Anda akan muncul di sini
Lengkapi input, lalu klik Run.
Fetches historical exchange rates for a base currency against all supported currencies on a specific date. The date must be in ISO YYYY-MM-DD format. Returns the same structure as the current rates table but for the specified historical date.
curl -X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "x-rates/historical-rates-table", "date": "2026-10-16", "from": "USD", "amount": 1.0}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
date | string | Yes | Historical date in ISO format YYYY-MM-DD. |
amount | number | No | Amount to calculate rates for. |
from | string | No | Base currency code. One of: USD, EUR, GBP, JPY, CHF, CAD, AUD. |
Flat $0.03 per call. Failed calls are not charged.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
curl -X POST "https://api.sandbase.ai/v1/api/x-rates/historical-rates-table" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date": "2026-10-16",
"from": "USD",
"amount": 1
}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
datestringwajibHistorical date in ISO format YYYY-MM-DD.
fromstringBase currency code.
Default: "USD"
Nilai yang mungkin: USD, EUR, GBP, JPY, CHF, CAD, AUD
amountnumberAmount to calculate rates for.
Default: 1
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
Belum ada respons tersimpan yang dipublikasikan. Jalankan API di Playground untuk melihat responsnya.
Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
X-Rates | $0.03 per panggilan | JSON |
X-Rates | $0.03 per panggilan | JSON |
X-Rates | $0.03 per panggilan | JSON |
X-Rates | $0.03 per panggilan | JSON |
X-Rates | $0.03 per panggilan | JSON |
X-Rates | $0.03 per panggilan | JSON |
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/x-rates/historical-rates-table dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
$0.03 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Wajib: date (string). Opsional: from (salah satu dari USD, EUR, GBP, JPY, CHF, CAD, AUD) dan amount (number). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron).
Tidak. X-Rates Historical Rates Table berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API X-Rates secara terpisah.