Skip to content

Instantly share code, notes, and snippets.

@scriptnull
Last active April 19, 2020 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scriptnull/7bbee13a76327d87fd7d1014d933e37d to your computer and use it in GitHub Desktop.
Save scriptnull/7bbee13a76327d87fd7d1014d933e37d to your computer and use it in GitHub Desktop.
List of currencies from https://en.wikipedia.org/wiki/List_of_circulating_currencies in JSON format.
const rows = document.getElementsByTagName('tr');
let results = [];
for (const row of rows) {
const arr = Array.from(row.children);
const startIdx = arr.findIndex((td) => td.hasAttribute('data-sort-value'));
if (startIdx == -1)
continue;
let i = startIdx;
const name = row.children[i++].innerText;
const symbol = row.children[i++].innerText;
let code = row.children[i++].innerText;
const unit = row.children[i++].innerText;
const unitValue = row.children[i++].innerText;
if (code === '(none)')
continue;
// some codes has a superscript sufix [G]
// which could be safely neglected
code = code.replace('[G]', '');
// Some currencies like INR are being used in multiple countries
// So skipping to insert duplicate entries for it
if (results.some((result) => result.code === code))
continue;
results.push({
code,
name,
symbol,
unit,
unitValue
});
}
console.log(JSON.stringify(results));
[
{
"code":"RUB",
"name":"Russian ruble",
"symbol":"₽",
"unit":"Kopek",
"unitValue":"100"
},
{
"code":"AFN",
"name":"Afghan afghani",
"symbol":"؋",
"unit":"Pul",
"unitValue":"100"
},
{
"code":"ALL",
"name":"Albanian lek",
"symbol":"L",
"unit":"Qindarkë",
"unitValue":"100"
},
{
"code":"GBP",
"name":"British pound[F]",
"symbol":"£",
"unit":"Penny",
"unitValue":"100"
},
{
"code":"GGP",
"name":"Guernsey pound",
"symbol":"£",
"unit":"Penny",
"unitValue":"100"
},
{
"code":"DZD",
"name":"Algerian dinar",
"symbol":"د.ج",
"unit":"Santeem",
"unitValue":"100"
},
{
"code":"AOA",
"name":"Angolan kwanza",
"symbol":"Kz",
"unit":"Cêntimo",
"unitValue":"100"
},
{
"code":"XCD",
"name":"Eastern Caribbean dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"ARS",
"name":"Argentine peso",
"symbol":"$",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"AMD",
"name":"Armenian dram",
"symbol":"֏",
"unit":"Luma",
"unitValue":"100"
},
{
"code":"AWG",
"name":"Aruban florin",
"symbol":"ƒ",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"SHP",
"name":"Saint Helena pound",
"symbol":"£",
"unit":"Penny",
"unitValue":"100"
},
{
"code":"AUD",
"name":"Australian dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"AZN",
"name":"Azerbaijani manat",
"symbol":"₼",
"unit":"Qəpik",
"unitValue":"100"
},
{
"code":"BSD",
"name":"Bahamian dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"BHD",
"name":"Bahraini dinar",
"symbol":".د.ب",
"unit":"Fils",
"unitValue":"1000"
},
{
"code":"BDT",
"name":"Bangladeshi taka",
"symbol":"৳",
"unit":"Poisha",
"unitValue":"100"
},
{
"code":"BBD",
"name":"Barbadian dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"BYN",
"name":"Belarusian ruble",
"symbol":"Br",
"unit":"Kapyeyka",
"unitValue":"100"
},
{
"code":"BZD",
"name":"Belize dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"XOF",
"name":"West African CFA franc",
"symbol":"Fr",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"BMD",
"name":"Bermudian dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"BTN",
"name":"Bhutanese ngultrum",
"symbol":"Nu.",
"unit":"Chetrum",
"unitValue":"100"
},
{
"code":"INR",
"name":"Indian rupee",
"symbol":"₹",
"unit":"Paisa",
"unitValue":"100"
},
{
"code":"BOB",
"name":"Bolivian boliviano",
"symbol":"Bs.",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"USD",
"name":"United States dollar[H]",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"BAM",
"name":"Bosnia and Herzegovina convertible mark",
"symbol":"KM or КМ[I]",
"unit":"Fening",
"unitValue":"100"
},
{
"code":"BWP",
"name":"Botswana pula",
"symbol":"P",
"unit":"Thebe",
"unitValue":"100"
},
{
"code":"BRL",
"name":"Brazilian real",
"symbol":"R$",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"BND",
"name":"Brunei dollar",
"symbol":"$",
"unit":"Sen",
"unitValue":"100"
},
{
"code":"SGD",
"name":"Singapore dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"BGN",
"name":"Bulgarian lev",
"symbol":"лв.",
"unit":"Stotinka",
"unitValue":"100"
},
{
"code":"BIF",
"name":"Burundian franc",
"symbol":"Fr",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"KHR",
"name":"Cambodian riel",
"symbol":"៛",
"unit":"Sen",
"unitValue":"100"
},
{
"code":"XAF",
"name":"Central African CFA franc",
"symbol":"Fr",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"CAD",
"name":"Canadian dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"CVE",
"name":"Cape Verdean escudo",
"symbol":"Esc or $",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"KYD",
"name":"Cayman Islands dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"CLP",
"name":"Chilean peso",
"symbol":"$",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"CNY",
"name":"Chinese yuan",
"symbol":"¥ or 元",
"unit":"Jiao[J]",
"unitValue":"10"
},
{
"code":"COP",
"name":"Colombian peso",
"symbol":"$",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"KMF",
"name":"Comorian franc",
"symbol":"Fr",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"CDF",
"name":"Congolese franc",
"symbol":"Fr",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"CKD",
"name":"Cook Islands dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"NZD",
"name":"New Zealand dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"CRC",
"name":"Costa Rican colón",
"symbol":"₡",
"unit":"Céntimo",
"unitValue":"100"
},
{
"code":"HRK",
"name":"Croatian kuna",
"symbol":"kn",
"unit":"Lipa",
"unitValue":"100"
},
{
"code":"CUP",
"name":"Cuban peso",
"symbol":"$",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"CUC",
"name":"Cuban convertible peso",
"symbol":"$",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"ANG",
"name":"Netherlands Antillean guilder",
"symbol":"ƒ",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"CZK",
"name":"Czech koruna",
"symbol":"Kč",
"unit":"Haléř",
"unitValue":"100"
},
{
"code":"DKK",
"name":"Danish krone",
"symbol":"kr",
"unit":"Øre",
"unitValue":"100"
},
{
"code":"DJF",
"name":"Djiboutian franc",
"symbol":"Fr",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"DOP",
"name":"Dominican peso",
"symbol":"$",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"EGP",
"name":"Egyptian pound",
"symbol":"£ or ج.م",
"unit":"Piastre[B]",
"unitValue":"100"
},
{
"code":"ERN",
"name":"Eritrean nakfa",
"symbol":"Nfk",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"SZL",
"name":"Swazi lilangeni",
"symbol":"L",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"ZAR",
"name":"South African rand",
"symbol":"R",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"ETB",
"name":"Ethiopian birr",
"symbol":"Br",
"unit":"Santim",
"unitValue":"100"
},
{
"code":"FKP",
"name":"Falkland Islands pound",
"symbol":"£",
"unit":"Penny",
"unitValue":"100"
},
{
"code":"FOK",
"name":"Faroese króna",
"symbol":"kr",
"unit":"Oyra",
"unitValue":"100"
},
{
"code":"FJD",
"name":"Fijian dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"XPF",
"name":"CFP franc",
"symbol":"₣",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"GMD",
"name":"Gambian dalasi",
"symbol":"D",
"unit":"Butut",
"unitValue":"100"
},
{
"code":"GEL",
"name":"Georgian lari",
"symbol":"₾",
"unit":"Tetri",
"unitValue":"100"
},
{
"code":"GHS",
"name":"Ghanaian cedi",
"symbol":"₵",
"unit":"Pesewa",
"unitValue":"100"
},
{
"code":"GIP",
"name":"Gibraltar pound",
"symbol":"£",
"unit":"Penny",
"unitValue":"100"
},
{
"code":"GTQ",
"name":"Guatemalan quetzal",
"symbol":"Q",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"GNF",
"name":"Guinean franc",
"symbol":"Fr",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"GYD",
"name":"Guyanese dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"HTG",
"name":"Haitian gourde",
"symbol":"G",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"HNL",
"name":"Honduran lempira",
"symbol":"L",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"HKD",
"name":"Hong Kong dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"HUF",
"name":"Hungarian forint",
"symbol":"Ft",
"unit":"Fillér",
"unitValue":"100"
},
{
"code":"ISK",
"name":"Icelandic króna",
"symbol":"kr",
"unit":"Eyrir",
"unitValue":"100"
},
{
"code":"IDR",
"name":"Indonesian rupiah",
"symbol":"Rp",
"unit":"Sen",
"unitValue":"100"
},
{
"code":"IRR",
"name":"Iranian rial",
"symbol":"﷼",
"unit":"Geran",
"unitValue":"100"
},
{
"code":"IQD",
"name":"Iraqi dinar",
"symbol":"ع.د",
"unit":"Fils",
"unitValue":"1000"
},
{
"code":"IMP",
"name":"Manx pound",
"symbol":"£",
"unit":"Penny",
"unitValue":"100"
},
{
"code":"ILS",
"name":"Israeli new shekel",
"symbol":"₪",
"unit":"Agora",
"unitValue":"100"
},
{
"code":"JMD",
"name":"Jamaican dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"JPY",
"name":"Japanese yen",
"symbol":"¥ or 円",
"unit":"Sen[C]",
"unitValue":"100"
},
{
"code":"JEP",
"name":"Jersey pound",
"symbol":"£",
"unit":"Penny",
"unitValue":"100"
},
{
"code":"JOD",
"name":"Jordanian dinar",
"symbol":"د.ا",
"unit":"Piastre[M]",
"unitValue":"100"
},
{
"code":"KZT",
"name":"Kazakhstani tenge",
"symbol":"₸",
"unit":"Tıyn",
"unitValue":"100"
},
{
"code":"KES",
"name":"Kenyan shilling",
"symbol":"Sh",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"KID",
"name":"Kiribati dollar[E]",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"KPW",
"name":"North Korean won",
"symbol":"₩",
"unit":"Chon",
"unitValue":"100"
},
{
"code":"KRW",
"name":"South Korean won",
"symbol":"₩",
"unit":"Jeon",
"unitValue":"100"
},
{
"code":"KWD",
"name":"Kuwaiti dinar",
"symbol":"د.ك",
"unit":"Fils",
"unitValue":"1000"
},
{
"code":"KGS",
"name":"Kyrgyzstani som",
"symbol":"с",
"unit":"Tyiyn",
"unitValue":"100"
},
{
"code":"LAK",
"name":"Lao kip",
"symbol":"₭",
"unit":"Att",
"unitValue":"100"
},
{
"code":"LBP",
"name":"Lebanese pound",
"symbol":"ل.ل",
"unit":"Piastre",
"unitValue":"100"
},
{
"code":"LSL",
"name":"Lesotho loti",
"symbol":"L",
"unit":"Sente",
"unitValue":"100"
},
{
"code":"LRD",
"name":"Liberian dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"LYD",
"name":"Libyan dinar",
"symbol":"ل.د",
"unit":"Dirham",
"unitValue":"1000"
},
{
"code":"CHF",
"name":"Swiss franc",
"symbol":"Fr.",
"unit":"Rappen",
"unitValue":"100"
},
{
"code":"MOP",
"name":"Macanese pataca",
"symbol":"P",
"unit":"Avo",
"unitValue":"100"
},
{
"code":"MGA",
"name":"Malagasy ariary",
"symbol":"Ar",
"unit":"Iraimbilanja",
"unitValue":"5"
},
{
"code":"MWK",
"name":"Malawian kwacha",
"symbol":"MK",
"unit":"Tambala",
"unitValue":"100"
},
{
"code":"MYR",
"name":"Malaysian ringgit",
"symbol":"RM",
"unit":"Sen",
"unitValue":"100"
},
{
"code":"MVR",
"name":"Maldivian rufiyaa",
"symbol":".ރ",
"unit":"Laari",
"unitValue":"100"
},
{
"code":"MRU",
"name":"Mauritanian ouguiya",
"symbol":"UM",
"unit":"Khoums",
"unitValue":"5"
},
{
"code":"MUR",
"name":"Mauritian rupee",
"symbol":"₨",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"MXN",
"name":"Mexican peso",
"symbol":"$",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"MDL",
"name":"Moldovan leu",
"symbol":"L",
"unit":"Ban",
"unitValue":"100"
},
{
"code":"MNT",
"name":"Mongolian tögrög",
"symbol":"₮",
"unit":"Möngö",
"unitValue":"100"
},
{
"code":"MAD",
"name":"Moroccan dirham",
"symbol":"د.م.",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"MZN",
"name":"Mozambican metical",
"symbol":"MT",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"MMK",
"name":"Burmese kyat",
"symbol":"Ks",
"unit":"Pya",
"unitValue":"100"
},
{
"code":"NAD",
"name":"Namibian dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"NPR",
"name":"Nepalese rupee",
"symbol":"रू",
"unit":"Paisa",
"unitValue":"100"
},
{
"code":"NIO",
"name":"Nicaraguan córdoba",
"symbol":"C$",
"unit":"Centavo",
"unitValue":"100"
},
{
"code":"NGN",
"name":"Nigerian naira",
"symbol":"₦",
"unit":"Kobo",
"unitValue":"100"
},
{
"code":"MKD",
"name":"Macedonian denar",
"symbol":"ден",
"unit":"Deni",
"unitValue":"100"
},
{
"code":"TRY",
"name":"Turkish lira",
"symbol":"₺",
"unit":"Kuruş",
"unitValue":"100"
},
{
"code":"NOK",
"name":"Norwegian krone",
"symbol":"kr",
"unit":"Øre",
"unitValue":"100"
},
{
"code":"OMR",
"name":"Omani rial",
"symbol":"ر.ع.",
"unit":"Baisa",
"unitValue":"1000"
},
{
"code":"PKR",
"name":"Pakistani rupee",
"symbol":"₨",
"unit":"Paisa",
"unitValue":"100"
},
{
"code":"PAB",
"name":"Panamanian balboa",
"symbol":"B/.",
"unit":"Centésimo",
"unitValue":"100"
},
{
"code":"PGK",
"name":"Papua New Guinean kina",
"symbol":"K",
"unit":"Toea",
"unitValue":"100"
},
{
"code":"PYG",
"name":"Paraguayan guaraní",
"symbol":"₲",
"unit":"Céntimo",
"unitValue":"100"
},
{
"code":"PEN",
"name":"Peruvian sol",
"symbol":"S/.",
"unit":"Céntimo",
"unitValue":"100"
},
{
"code":"PHP",
"name":"Philippine peso",
"symbol":"₱",
"unit":"Sentimo",
"unitValue":"100"
},
{
"code":"PND",
"name":"Pitcairn Islands dollar[E]",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"PLN",
"name":"Polish złoty",
"symbol":"zł",
"unit":"Grosz",
"unitValue":"100"
},
{
"code":"QAR",
"name":"Qatari riyal",
"symbol":"ر.ق",
"unit":"Dirham",
"unitValue":"100"
},
{
"code":"RON",
"name":"Romanian leu",
"symbol":"lei",
"unit":"Ban",
"unitValue":"100"
},
{
"code":"RWF",
"name":"Rwandan franc",
"symbol":"Fr",
"unit":"Centime",
"unitValue":"100"
},
{
"code":"WST",
"name":"Samoan tālā",
"symbol":"T",
"unit":"Sene",
"unitValue":"100"
},
{
"code":"STN",
"name":"São Tomé and Príncipe dobra",
"symbol":"Db",
"unit":"Cêntimo",
"unitValue":"100"
},
{
"code":"SAR",
"name":"Saudi riyal",
"symbol":"ر.س",
"unit":"Halala",
"unitValue":"100"
},
{
"code":"RSD",
"name":"Serbian dinar",
"symbol":"дин. or din.",
"unit":"Para",
"unitValue":"100"
},
{
"code":"SCR",
"name":"Seychellois rupee",
"symbol":"₨",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"SLL",
"name":"Sierra Leonean leone",
"symbol":"Le",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"SBD",
"name":"Solomon Islands dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"SOS",
"name":"Somali shilling",
"symbol":"Sh",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"SLS",
"name":"Somaliland shilling",
"symbol":"Sl",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"SSP",
"name":"South Sudanese pound",
"symbol":"£",
"unit":"Piaster",
"unitValue":"100"
},
{
"code":"LKR",
"name":"Sri Lankan rupee",
"symbol":"Rs, රු or ரூ",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"SDG",
"name":"Sudanese pound",
"symbol":"ج.س.",
"unit":"Piastre",
"unitValue":"100"
},
{
"code":"SRD",
"name":"Surinamese dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"SEK",
"name":"Swedish krona",
"symbol":"kr",
"unit":"Öre",
"unitValue":"100"
},
{
"code":"SYP",
"name":"Syrian pound",
"symbol":"£ or ل.س",
"unit":"Piastre",
"unitValue":"100"
},
{
"code":"TWD",
"name":"New Taiwan dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"TJS",
"name":"Tajikistani somoni",
"symbol":"ЅМ",
"unit":"Diram",
"unitValue":"100"
},
{
"code":"TZS",
"name":"Tanzanian shilling",
"symbol":"Sh",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"THB",
"name":"Thai baht",
"symbol":"฿",
"unit":"Satang",
"unitValue":"100"
},
{
"code":"TOP",
"name":"Tongan paʻanga[P]",
"symbol":"T$",
"unit":"Seniti",
"unitValue":"100"
},
{
"code":"PRB",
"name":"Transnistrian ruble",
"symbol":"р.",
"unit":"Kopek",
"unitValue":"100"
},
{
"code":"TTD",
"name":"Trinidad and Tobago dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"TND",
"name":"Tunisian dinar",
"symbol":"د.ت",
"unit":"Millime",
"unitValue":"1000"
},
{
"code":"TMT",
"name":"Turkmenistan manat",
"symbol":"m",
"unit":"Tennesi",
"unitValue":"100"
},
{
"code":"TVD",
"name":"Tuvaluan dollar",
"symbol":"$",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"UGX",
"name":"Ugandan shilling",
"symbol":"Sh",
"unit":"Cent",
"unitValue":"100"
},
{
"code":"UAH",
"name":"Ukrainian hryvnia",
"symbol":"₴",
"unit":"Kopiyka",
"unitValue":"100"
},
{
"code":"AED",
"name":"United Arab Emirates dirham",
"symbol":"د.إ",
"unit":"Fils",
"unitValue":"100"
},
{
"code":"UYU",
"name":"Uruguayan peso",
"symbol":"$",
"unit":"Centésimo",
"unitValue":"100"
},
{
"code":"UZS",
"name":"Uzbekistani soʻm",
"symbol":"so'm or сўм",
"unit":"Tiyin",
"unitValue":"100"
},
{
"code":"VUV",
"name":"Vanuatu vatu",
"symbol":"Vt",
"unit":"(none)",
"unitValue":"(none)"
},
{
"code":"VES",
"name":"Venezuelan bolívar soberano",
"symbol":"Bs.S. or Bs.",
"unit":"Céntimo",
"unitValue":"100"
},
{
"code":"VND",
"name":"Vietnamese đồng",
"symbol":"₫",
"unit":"Hào[R]",
"unitValue":"10"
},
{
"code":"YER",
"name":"Yemeni rial",
"symbol":"ر.ي",
"unit":"Fils",
"unitValue":"100"
},
{
"code":"ZMW",
"name":"Zambian kwacha",
"symbol":"ZK",
"unit":"Ngwee",
"unitValue":"100"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment