example-data.com
Menu
Browse docs and collections

Overview

currencies / #28

South African Rand

ZAR

Component variants

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/currencies/28" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/currencies/28"
);
const currency = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/currencies.d.ts https://example-data.com/types/currencies.d.ts
import type { Currency } from "./types/currencies";

const res = await fetch(
  "https://example-data.com/api/v1/currencies/28"
);
const currency = (await res.json()) as Currency;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/currencies/28"
)
currencie = res.json()

Response

{
  "id": 28,
  "code": "ZAR",
  "name": "South African Rand",
  "symbol": "R",
  "decimalDigits": 2
}