From e7df1857330992d186eb4ed1fef4963f59238b50 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 20 Oct 2025 11:03:08 -0400 Subject: [PATCH] Cover ISO 4217 currency codes Signed-off-by: Juan Cruz Viotti --- Makefile | 13 + conventions.json | 24 +- data/six-group-iso-currency-historical.json | 1194 ++++++++++ data/six-group-iso-currency.json | 2002 +++++++++++++++++ schemas/iso/currency/alpha-code.json | 19 + schemas/iso/currency/alpha-currency.json | 1000 ++++++++ schemas/iso/currency/alpha-fund.json | 58 + .../iso/currency/alpha-precious-metal.json | 26 + schemas/iso/currency/alpha-test.json | 9 + schemas/iso/currency/alpha-unknown.json | 9 + .../iso/currency/historical/alpha-code.json | 14 + .../currency/historical/alpha-currency.json | 809 +++++++ .../iso/currency/historical/numeric-code.json | 14 + .../currency/historical/numeric-currency.json | 635 ++++++ .../iso/currency/numeric-code-additional.json | 11 + schemas/iso/currency/numeric-code.json | 19 + schemas/iso/currency/numeric-currency.json | 1000 ++++++++ schemas/iso/currency/numeric-fund.json | 58 + .../iso/currency/numeric-precious-metal.json | 26 + schemas/iso/currency/numeric-test.json | 9 + schemas/iso/currency/numeric-unknown.json | 9 + scripts/fetch-xml.py | 60 + scripts/generate-iso-currency.py | 383 ++++ tests/iso/currency/alpha-code.test.json | 96 + tests/iso/currency/alpha-currency.test.json | 141 ++ tests/iso/currency/alpha-fund.test.json | 51 + .../currency/alpha-precious-metal.test.json | 66 + tests/iso/currency/alpha-test.test.json | 71 + tests/iso/currency/alpha-unknown.test.json | 66 + .../currency/historical/alpha-code.test.json | 66 + .../historical/alpha-currency.test.json | 86 + .../historical/numeric-code.test.json | 61 + .../historical/numeric-currency.test.json | 71 + .../numeric-code-additional.test.json | 66 + tests/iso/currency/numeric-code.test.json | 86 + tests/iso/currency/numeric-currency.test.json | 101 + tests/iso/currency/numeric-fund.test.json | 51 + .../currency/numeric-precious-metal.test.json | 66 + tests/iso/currency/numeric-test.test.json | 61 + tests/iso/currency/numeric-unknown.test.json | 56 + 40 files changed, 8659 insertions(+), 4 deletions(-) create mode 100644 data/six-group-iso-currency-historical.json create mode 100644 data/six-group-iso-currency.json create mode 100644 schemas/iso/currency/alpha-code.json create mode 100644 schemas/iso/currency/alpha-currency.json create mode 100644 schemas/iso/currency/alpha-fund.json create mode 100644 schemas/iso/currency/alpha-precious-metal.json create mode 100644 schemas/iso/currency/alpha-test.json create mode 100644 schemas/iso/currency/alpha-unknown.json create mode 100644 schemas/iso/currency/historical/alpha-code.json create mode 100644 schemas/iso/currency/historical/alpha-currency.json create mode 100644 schemas/iso/currency/historical/numeric-code.json create mode 100644 schemas/iso/currency/historical/numeric-currency.json create mode 100644 schemas/iso/currency/numeric-code-additional.json create mode 100644 schemas/iso/currency/numeric-code.json create mode 100644 schemas/iso/currency/numeric-currency.json create mode 100644 schemas/iso/currency/numeric-fund.json create mode 100644 schemas/iso/currency/numeric-precious-metal.json create mode 100644 schemas/iso/currency/numeric-test.json create mode 100644 schemas/iso/currency/numeric-unknown.json create mode 100644 scripts/fetch-xml.py create mode 100755 scripts/generate-iso-currency.py create mode 100644 tests/iso/currency/alpha-code.test.json create mode 100644 tests/iso/currency/alpha-currency.test.json create mode 100644 tests/iso/currency/alpha-fund.test.json create mode 100644 tests/iso/currency/alpha-precious-metal.test.json create mode 100644 tests/iso/currency/alpha-test.test.json create mode 100644 tests/iso/currency/alpha-unknown.test.json create mode 100644 tests/iso/currency/historical/alpha-code.test.json create mode 100644 tests/iso/currency/historical/alpha-currency.test.json create mode 100644 tests/iso/currency/historical/numeric-code.test.json create mode 100644 tests/iso/currency/historical/numeric-currency.test.json create mode 100644 tests/iso/currency/numeric-code-additional.test.json create mode 100644 tests/iso/currency/numeric-code.test.json create mode 100644 tests/iso/currency/numeric-currency.test.json create mode 100644 tests/iso/currency/numeric-fund.test.json create mode 100644 tests/iso/currency/numeric-precious-metal.test.json create mode 100644 tests/iso/currency/numeric-test.test.json create mode 100644 tests/iso/currency/numeric-unknown.test.json diff --git a/Makefile b/Makefile index 634a2118..a46f07fb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ JSONSCHEMA = jsonschema SHELLCHECK = shellcheck +PYTHON = python3 # TODO: Extend `validate` to take a directory as argument SCHEMAS = $(shell find schemas/ -type f -name '*.json') @@ -22,4 +23,16 @@ lint: common test: .always $(JSONSCHEMA) test ./tests +generate: .always + $(PYTHON) scripts/generate-iso-currency.py + +fetch: .always + $(PYTHON) scripts/fetch-xml.py \ + "https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml" \ + > data/six-group-iso-currency.json + $(PYTHON) scripts/fetch-xml.py \ + "https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-three.xml" \ + > data/six-group-iso-currency-historical.json + + .always: diff --git a/conventions.json b/conventions.json index 6097fac4..ac1db61a 100644 --- a/conventions.json +++ b/conventions.json @@ -1,6 +1,26 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "anyOf": [ + { + "properties": { + "examples": { + "type": "array", + "minItems": 1 + }, + "const": true + } + }, + { + "properties": { + "examples": { + "type": "array", + "minItems": 3 + }, + "const": false + } + } + ], "required": [ "x-license", "title", @@ -17,10 +37,6 @@ "$comment": { "$ref": "./schemas/ietf/http/https-url.json" }, - "examples": { - "type": "array", - "minItems": 3 - }, "x-license": { "const": "https://github.com/sourcemeta/std/blob/main/LICENSE" } diff --git a/data/six-group-iso-currency-historical.json b/data/six-group-iso-currency-historical.json new file mode 100644 index 00000000..82484c9c --- /dev/null +++ b/data/six-group-iso-currency-historical.json @@ -0,0 +1,1194 @@ +{ + "ISO_4217": { + "@attributes": { + "Pblshd": "2025-03-31" + }, + "HstrcCcyTbl": { + "HstrcCcyNtry": [ + { + "CtryNm": "AFGHANISTAN", + "CcyNm": "Afghani", + "Ccy": "AFA", + "CcyNbr": "004", + "WthdrwlDt": "2003-01" + }, + { + "CtryNm": "\u00c5LAND ISLANDS", + "CcyNm": "Markka", + "Ccy": "FIM", + "CcyNbr": "246", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "ALBANIA", + "CcyNm": "Old Lek", + "Ccy": "ALK", + "CcyNbr": "008", + "WthdrwlDt": "1989-12" + }, + { + "CtryNm": "ANDORRA", + "CcyNm": "Andorran Peseta", + "Ccy": "ADP", + "CcyNbr": "020", + "WthdrwlDt": "2003-07" + }, + { + "CtryNm": "ANDORRA", + "CcyNm": "Spanish Peseta", + "Ccy": "ESP", + "CcyNbr": "724", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "ANDORRA", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "ANGOLA", + "CcyNm": "Kwanza", + "Ccy": "AOK", + "CcyNbr": "024", + "WthdrwlDt": "1991-03" + }, + { + "CtryNm": "ANGOLA", + "CcyNm": "New Kwanza", + "Ccy": "AON", + "CcyNbr": "024", + "WthdrwlDt": "2000-02" + }, + { + "CtryNm": "ANGOLA", + "CcyNm": "Kwanza Reajustado", + "Ccy": "AOR", + "CcyNbr": "982", + "WthdrwlDt": "2000-02" + }, + { + "CtryNm": "ARGENTINA", + "CcyNm": "Austral", + "Ccy": "ARA", + "CcyNbr": "032", + "WthdrwlDt": "1992-01" + }, + { + "CtryNm": "ARGENTINA", + "CcyNm": "Peso Argentino", + "Ccy": "ARP", + "CcyNbr": "032", + "WthdrwlDt": "1985-07" + }, + { + "CtryNm": "ARGENTINA", + "CcyNm": "Peso", + "Ccy": "ARY", + "CcyNbr": "032", + "WthdrwlDt": "1989 to 1990" + }, + { + "CtryNm": "ARMENIA", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1994-08" + }, + { + "CtryNm": "AUSTRIA", + "CcyNm": "Schilling", + "Ccy": "ATS", + "CcyNbr": "040", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "AZERBAIJAN", + "CcyNm": "Azerbaijan Manat", + "Ccy": "AYM", + "CcyNbr": "945", + "WthdrwlDt": "2005-10" + }, + { + "CtryNm": "AZERBAIJAN", + "CcyNm": "Azerbaijanian Manat", + "Ccy": "AZM", + "CcyNbr": "031", + "WthdrwlDt": "2005-12" + }, + { + "CtryNm": "AZERBAIJAN", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1994-08" + }, + { + "CtryNm": "BELARUS", + "CcyNm": "Belarusian Ruble", + "Ccy": "BYB", + "CcyNbr": "112", + "WthdrwlDt": "2001-01" + }, + { + "CtryNm": "BELARUS", + "CcyNm": "Belarusian Ruble", + "Ccy": "BYR", + "CcyNbr": "974", + "WthdrwlDt": "2017-01" + }, + { + "CtryNm": "BELARUS", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1994-06" + }, + { + "CtryNm": "BELGIUM", + "CcyNm": "Convertible Franc", + "Ccy": "BEC", + "CcyNbr": "993", + "WthdrwlDt": "1990-03" + }, + { + "CtryNm": "BELGIUM", + "CcyNm": "Belgian Franc", + "Ccy": "BEF", + "CcyNbr": "056", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "BELGIUM", + "CcyNm": "Financial Franc", + "Ccy": "BEL", + "CcyNbr": "992", + "WthdrwlDt": "1990-03" + }, + { + "CtryNm": "BOLIVIA", + "CcyNm": "Peso boliviano", + "Ccy": "BOP", + "CcyNbr": "068", + "WthdrwlDt": "1987-02" + }, + { + "CtryNm": "BOSNIA AND HERZEGOVINA", + "CcyNm": "Dinar", + "Ccy": "BAD", + "CcyNbr": "070", + "WthdrwlDt": "1998-07" + }, + { + "CtryNm": "BRAZIL", + "CcyNm": "Cruzeiro", + "Ccy": "BRB", + "CcyNbr": "076", + "WthdrwlDt": "1986-03" + }, + { + "CtryNm": "BRAZIL", + "CcyNm": "Cruzado", + "Ccy": "BRC", + "CcyNbr": "076", + "WthdrwlDt": "1989-02" + }, + { + "CtryNm": "BRAZIL", + "CcyNm": "Cruzeiro", + "Ccy": "BRE", + "CcyNbr": "076", + "WthdrwlDt": "1993-03" + }, + { + "CtryNm": "BRAZIL", + "CcyNm": "New Cruzado", + "Ccy": "BRN", + "CcyNbr": "076", + "WthdrwlDt": "1990-03" + }, + { + "CtryNm": "BRAZIL", + "CcyNm": "Cruzeiro Real", + "Ccy": "BRR", + "CcyNbr": "987", + "WthdrwlDt": "1994-07" + }, + { + "CtryNm": "BULGARIA", + "CcyNm": "Lev A/52", + "Ccy": "BGJ", + "CcyNbr": "100", + "WthdrwlDt": "1989 to 1990" + }, + { + "CtryNm": "BULGARIA", + "CcyNm": "Lev A/62", + "Ccy": "BGK", + "CcyNbr": "100", + "WthdrwlDt": "1989 to 1990" + }, + { + "CtryNm": "BULGARIA", + "CcyNm": "Lev", + "Ccy": "BGL", + "CcyNbr": "100", + "WthdrwlDt": "2003-11" + }, + { + "CtryNm": "BURMA", + "CcyNm": "Kyat", + "Ccy": "BUK", + "CcyNbr": "104", + "WthdrwlDt": "1990-02" + }, + { + "CtryNm": "CROATIA", + "CcyNm": "Croatian Dinar", + "Ccy": "HRD", + "CcyNbr": "191", + "WthdrwlDt": "1995-01" + }, + { + "CtryNm": "CROATIA", + "CcyNm": "Croatian Kuna", + "Ccy": "HRK", + "CcyNbr": "191", + "WthdrwlDt": "2015-06" + }, + { + "CtryNm": "CROATIA", + "CcyNm": "Kuna", + "Ccy": "HRK", + "CcyNbr": "191", + "WthdrwlDt": "2023-01" + }, + { + "CtryNm": "CUBA", + "CcyNm": "Peso Convertible", + "Ccy": "CUC", + "CcyNbr": "931", + "WthdrwlDt": "2021-06" + }, + { + "CtryNm": "CURA\u00c7AO", + "CcyNm": "Netherlands Antillean Guilder", + "Ccy": "ANG", + "CcyNbr": "532", + "WthdrwlDt": "2025-03" + }, + { + "CtryNm": "CYPRUS", + "CcyNm": "Cyprus Pound", + "Ccy": "CYP", + "CcyNbr": "196", + "WthdrwlDt": "2008-01" + }, + { + "CtryNm": "CZECHOSLOVAKIA", + "CcyNm": "Krona A/53", + "Ccy": "CSJ", + "CcyNbr": "203", + "WthdrwlDt": "1989 to 1990" + }, + { + "CtryNm": "CZECHOSLOVAKIA", + "CcyNm": "Koruna", + "Ccy": "CSK", + "CcyNbr": "200", + "WthdrwlDt": "1993-03" + }, + { + "CtryNm": "ECUADOR", + "CcyNm": "Sucre", + "Ccy": "ECS", + "CcyNbr": "218", + "WthdrwlDt": "2000-09" + }, + { + "CtryNm": "ECUADOR", + "CcyNm": "Unidad de Valor Constante (UVC)", + "Ccy": "ECV", + "CcyNbr": "983", + "WthdrwlDt": "2000-09" + }, + { + "CtryNm": "EQUATORIAL GUINEA", + "CcyNm": "Ekwele", + "Ccy": "GQE", + "CcyNbr": "226", + "WthdrwlDt": "1986-06" + }, + { + "CtryNm": "ESTONIA", + "CcyNm": "Kroon", + "Ccy": "EEK", + "CcyNbr": "233", + "WthdrwlDt": "2011-01" + }, + { + "CtryNm": "EUROPEAN MONETARY CO-OPERATION FUND (EMCF)", + "CcyNm": "European Currency Unit (E.C.U)", + "Ccy": "XEU", + "CcyNbr": "954", + "WthdrwlDt": "1999-01" + }, + { + "CtryNm": "FINLAND", + "CcyNm": "Markka", + "Ccy": "FIM", + "CcyNbr": "246", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "FRANCE", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "FRENCH GUIANA", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "FRENCH SOUTHERN TERRITORIES", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "GEORGIA", + "CcyNm": "Georgian Coupon", + "Ccy": "GEK", + "CcyNbr": "268", + "WthdrwlDt": "1995-10" + }, + { + "CtryNm": "GEORGIA", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1994-04" + }, + { + "CtryNm": "GERMAN DEMOCRATIC REPUBLIC", + "CcyNm": "Mark der DDR", + "Ccy": "DDM", + "CcyNbr": "278", + "WthdrwlDt": "1990-07 to 1990-09" + }, + { + "CtryNm": "GERMANY", + "CcyNm": "Deutsche Mark", + "Ccy": "DEM", + "CcyNbr": "276", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "GHANA", + "CcyNm": "Cedi", + "Ccy": "GHC", + "CcyNbr": "288", + "WthdrwlDt": "2008-01" + }, + { + "CtryNm": "GHANA", + "CcyNm": "Ghana Cedi", + "Ccy": "GHP", + "CcyNbr": "939", + "WthdrwlDt": "2007-06" + }, + { + "CtryNm": "GREECE", + "CcyNm": "Drachma", + "Ccy": "GRD", + "CcyNbr": "300", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "GUADELOUPE", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "GUINEA", + "CcyNm": "Syli", + "Ccy": "GNE", + "CcyNbr": "324", + "WthdrwlDt": "1989-12" + }, + { + "CtryNm": "GUINEA", + "CcyNm": "Syli", + "Ccy": "GNS", + "CcyNbr": "324", + "WthdrwlDt": "1986-02" + }, + { + "CtryNm": "GUINEA-BISSAU", + "CcyNm": "Guinea Escudo", + "Ccy": "GWE", + "CcyNbr": "624", + "WthdrwlDt": "1978 to 1981" + }, + { + "CtryNm": "GUINEA-BISSAU", + "CcyNm": "Guinea-Bissau Peso", + "Ccy": "GWP", + "CcyNbr": "624", + "WthdrwlDt": "1997-05" + }, + { + "CtryNm": "HOLY SEE (VATICAN CITY STATE)", + "CcyNm": "Italian Lira", + "Ccy": "ITL", + "CcyNbr": "380", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "ICELAND", + "CcyNm": "Old Krona", + "Ccy": "ISJ", + "CcyNbr": "352", + "WthdrwlDt": "1989 to 1990" + }, + { + "CtryNm": "IRELAND", + "CcyNm": "Irish Pound", + "Ccy": "IEP", + "CcyNbr": "372", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "ISRAEL", + "CcyNm": "Pound", + "Ccy": "ILP", + "CcyNbr": "376", + "WthdrwlDt": "1978 to 1981" + }, + { + "CtryNm": "ISRAEL", + "CcyNm": "Old Shekel", + "Ccy": "ILR", + "CcyNbr": "376", + "WthdrwlDt": "1989 to 1990" + }, + { + "CtryNm": "ITALY", + "CcyNm": "Italian Lira", + "Ccy": "ITL", + "CcyNbr": "380", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "KAZAKHSTAN", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1994-05" + }, + { + "CtryNm": "KYRGYZSTAN", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1993-01" + }, + { + "CtryNm": "LAO", + "CcyNm": "Pathet Lao Kip", + "Ccy": "LAJ", + "CcyNbr": "418", + "WthdrwlDt": "1979-12" + }, + { + "CtryNm": "LATVIA", + "CcyNm": "Latvian Lats", + "Ccy": "LVL", + "CcyNbr": "428", + "WthdrwlDt": "2014-01" + }, + { + "CtryNm": "LATVIA", + "CcyNm": "Latvian Ruble", + "Ccy": "LVR", + "CcyNbr": "428", + "WthdrwlDt": "1994-12" + }, + { + "CtryNm": "LESOTHO", + "CcyNm": "Loti", + "Ccy": "LSM", + "CcyNbr": "426", + "WthdrwlDt": "1985-05" + }, + { + "CtryNm": "LESOTHO", + "CcyNm": "Financial Rand", + "Ccy": "ZAL", + "CcyNbr": "991", + "WthdrwlDt": "1995-03" + }, + { + "CtryNm": "LITHUANIA", + "CcyNm": "Lithuanian Litas", + "Ccy": "LTL", + "CcyNbr": "440", + "WthdrwlDt": "2014-12" + }, + { + "CtryNm": "LITHUANIA", + "CcyNm": "Talonas", + "Ccy": "LTT", + "CcyNbr": "440", + "WthdrwlDt": "1993-07" + }, + { + "CtryNm": "LUXEMBOURG", + "CcyNm": "Luxembourg Convertible Franc", + "Ccy": "LUC", + "CcyNbr": "989", + "WthdrwlDt": "1990-03" + }, + { + "CtryNm": "LUXEMBOURG", + "CcyNm": "Luxembourg Franc", + "Ccy": "LUF", + "CcyNbr": "442", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "LUXEMBOURG", + "CcyNm": "Luxembourg Financial Franc", + "Ccy": "LUL", + "CcyNbr": "988", + "WthdrwlDt": "1990-03" + }, + { + "CtryNm": "MADAGASCAR", + "CcyNm": "Malagasy Franc", + "Ccy": "MGF", + "CcyNbr": "450", + "WthdrwlDt": "2004-12" + }, + { + "CtryNm": "MALAWI", + "CcyNm": "Kwacha", + "Ccy": "MWK", + "CcyNbr": "454", + "WthdrwlDt": "2016-02" + }, + { + "CtryNm": "MALDIVES", + "CcyNm": "Maldive Rupee", + "Ccy": "MVQ", + "CcyNbr": "462", + "WthdrwlDt": "1989-12" + }, + { + "CtryNm": "MALI", + "CcyNm": "Mali Franc", + "Ccy": "MLF", + "CcyNbr": "466", + "WthdrwlDt": "1984-11" + }, + { + "CtryNm": "MALTA", + "CcyNm": "Maltese Lira", + "Ccy": "MTL", + "CcyNbr": "470", + "WthdrwlDt": "2008-01" + }, + { + "CtryNm": "MALTA", + "CcyNm": "Maltese Pound", + "Ccy": "MTP", + "CcyNbr": "470", + "WthdrwlDt": "1983-06" + }, + { + "CtryNm": "MARTINIQUE", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "MAURITANIA", + "CcyNm": "Ouguiya", + "Ccy": "MRO", + "CcyNbr": "478", + "WthdrwlDt": "2017-12" + }, + { + "CtryNm": "MAYOTTE", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "MEXICO", + "CcyNm": "Mexican Peso", + "Ccy": "MXP", + "CcyNbr": "484", + "WthdrwlDt": "1993-01" + }, + { + "CtryNm": "MOLDOVA, REPUBLIC OF", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1993-12" + }, + { + "CtryNm": "MONACO", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "MOZAMBIQUE", + "CcyNm": "Mozambique Escudo", + "Ccy": "MZE", + "CcyNbr": "508", + "WthdrwlDt": "1978 to 1981" + }, + { + "CtryNm": "MOZAMBIQUE", + "CcyNm": "Mozambique Metical", + "Ccy": "MZM", + "CcyNbr": "508", + "WthdrwlDt": "2006-06" + }, + { + "CtryNm": "NETHERLANDS", + "CcyNm": "Netherlands Guilder", + "Ccy": "NLG", + "CcyNbr": "528", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "NETHERLANDS ANTILLES", + "CcyNm": "Netherlands Antillean Guilder", + "Ccy": "ANG", + "CcyNbr": "532", + "WthdrwlDt": "2010-10" + }, + { + "CtryNm": "NICARAGUA", + "CcyNm": "Cordoba", + "Ccy": "NIC", + "CcyNbr": "558", + "WthdrwlDt": "1990-10" + }, + { + "CtryNm": "PERU", + "CcyNm": "Sol", + "Ccy": "PEH", + "CcyNbr": "604", + "WthdrwlDt": "1989 to 1990" + }, + { + "CtryNm": "PERU", + "CcyNm": "Inti", + "Ccy": "PEI", + "CcyNbr": "604", + "WthdrwlDt": "1991-07" + }, + { + "CtryNm": "PERU", + "CcyNm": "Nuevo Sol", + "Ccy": "PEN", + "CcyNbr": "604", + "WthdrwlDt": "2015-12" + }, + { + "CtryNm": "PERU", + "CcyNm": "Sol", + "Ccy": "PES", + "CcyNbr": "604", + "WthdrwlDt": "1986-02" + }, + { + "CtryNm": "POLAND", + "CcyNm": "Zloty", + "Ccy": "PLZ", + "CcyNbr": "616", + "WthdrwlDt": "1997-01" + }, + { + "CtryNm": "PORTUGAL", + "CcyNm": "Portuguese Escudo", + "Ccy": "PTE", + "CcyNbr": "620", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "R\u00c9UNION", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "ROMANIA", + "CcyNm": "Leu A/52", + "Ccy": "ROK", + "CcyNbr": "642", + "WthdrwlDt": "1989 to 1990" + }, + { + "CtryNm": "ROMANIA", + "CcyNm": "Old Leu", + "Ccy": "ROL", + "CcyNbr": "642", + "WthdrwlDt": "2005-06" + }, + { + "CtryNm": "ROMANIA", + "CcyNm": "New Romanian Leu", + "Ccy": "RON", + "CcyNbr": "946", + "WthdrwlDt": "2015-06" + }, + { + "CtryNm": "RUSSIAN FEDERATION", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "2004-01" + }, + { + "CtryNm": "SAINT MARTIN", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "1999-01" + }, + { + "CtryNm": "SAINT PIERRE AND MIQUELON", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "SAINT-BARTH\u00c9LEMY", + "CcyNm": "French Franc", + "Ccy": "FRF", + "CcyNbr": "250", + "WthdrwlDt": "1999-01" + }, + { + "CtryNm": "SAN MARINO", + "CcyNm": "Italian Lira", + "Ccy": "ITL", + "CcyNbr": "380", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "SAO TOME AND PRINCIPE", + "CcyNm": "Dobra", + "Ccy": "STD", + "CcyNbr": "678", + "WthdrwlDt": "2017-12" + }, + { + "CtryNm": "SERBIA AND MONTENEGRO", + "CcyNm": "Serbian Dinar", + "Ccy": "CSD", + "CcyNbr": "891", + "WthdrwlDt": "2006-10" + }, + { + "CtryNm": "SERBIA AND MONTENEGRO", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "WthdrwlDt": "2006-10" + }, + { + "CtryNm": "SIERRA LEONE", + "CcyNm": "Leone", + "Ccy": "SLL", + "CcyNbr": "694", + "WthdrwlDt": "2023-12" + }, + { + "CtryNm": "SINT MAARTEN (DUTCH PART)", + "CcyNm": "Netherlands Antillean Guilder", + "Ccy": "ANG", + "CcyNbr": "532", + "WthdrwlDt": "2025-03" + }, + { + "CtryNm": "SLOVAKIA", + "CcyNm": "Slovak Koruna", + "Ccy": "SKK", + "CcyNbr": "703", + "WthdrwlDt": "2009-01" + }, + { + "CtryNm": "SLOVENIA", + "CcyNm": "Tolar", + "Ccy": "SIT", + "CcyNbr": "705", + "WthdrwlDt": "2007-01" + }, + { + "CtryNm": "SOUTH AFRICA", + "CcyNm": "Financial Rand", + "Ccy": "ZAL", + "CcyNbr": "991", + "WthdrwlDt": "1995-03" + }, + { + "CtryNm": "SOUTH SUDAN", + "CcyNm": "Sudanese Pound", + "Ccy": "SDG", + "CcyNbr": "938", + "WthdrwlDt": "2012-09" + }, + { + "CtryNm": "SOUTHERN RHODESIA", + "CcyNm": "Rhodesian Dollar", + "Ccy": "RHD", + "CcyNbr": "716", + "WthdrwlDt": "1978 to 1981" + }, + { + "CtryNm": "SPAIN", + "CcyNm": "Spanish Peseta", + "Ccy": "ESA", + "CcyNbr": "996", + "WthdrwlDt": "1978 to 1981" + }, + { + "CtryNm": "SPAIN", + "CcyNm": "\"A\" Account (convertible Peseta Account)", + "Ccy": "ESB", + "CcyNbr": "995", + "WthdrwlDt": "1994-12" + }, + { + "CtryNm": "SPAIN", + "CcyNm": "Spanish Peseta", + "Ccy": "ESP", + "CcyNbr": "724", + "WthdrwlDt": "2002-03" + }, + { + "CtryNm": "SUDAN", + "CcyNm": "Sudanese Dinar", + "Ccy": "SDD", + "CcyNbr": "736", + "WthdrwlDt": "2007-07" + }, + { + "CtryNm": "SUDAN", + "CcyNm": "Sudanese Pound", + "Ccy": "SDP", + "CcyNbr": "736", + "WthdrwlDt": "1998-06" + }, + { + "CtryNm": "SURINAME", + "CcyNm": "Surinam Guilder", + "Ccy": "SRG", + "CcyNbr": "740", + "WthdrwlDt": "2003-12" + }, + { + "CtryNm": "SWAZILAND", + "CcyNm": "Lilangeni", + "Ccy": "SZL", + "CcyNbr": "748", + "WthdrwlDt": "2018-08" + }, + { + "CtryNm": "SWITZERLAND", + "CcyNm": "WIR Franc (for electronic)", + "Ccy": "CHC", + "CcyNbr": "948", + "WthdrwlDt": "2004-11" + }, + { + "CtryNm": "TAJIKISTAN", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1995-05" + }, + { + "CtryNm": "TAJIKISTAN", + "CcyNm": "Tajik Ruble", + "Ccy": "TJR", + "CcyNbr": "762", + "WthdrwlDt": "2001-04" + }, + { + "CtryNm": "TIMOR-LESTE", + "CcyNm": "Rupiah", + "Ccy": "IDR", + "CcyNbr": "360", + "WthdrwlDt": "2002-07" + }, + { + "CtryNm": "TIMOR-LESTE", + "CcyNm": "Timor Escudo", + "Ccy": "TPE", + "CcyNbr": "626", + "WthdrwlDt": "2002-11" + }, + { + "CtryNm": "TURKEY", + "CcyNm": "Old Turkish Lira", + "Ccy": "TRL", + "CcyNbr": "792", + "WthdrwlDt": "2005-12" + }, + { + "CtryNm": "TURKEY", + "CcyNm": "New Turkish Lira", + "Ccy": "TRY", + "CcyNbr": "949", + "WthdrwlDt": "2009-01" + }, + { + "CtryNm": "TURKMENISTAN", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1993-10" + }, + { + "CtryNm": "TURKMENISTAN", + "CcyNm": "Turkmenistan Manat", + "Ccy": "TMM", + "CcyNbr": "795", + "WthdrwlDt": "2009-01" + }, + { + "CtryNm": "UGANDA", + "CcyNm": "Uganda Shilling", + "Ccy": "UGS", + "CcyNbr": "800", + "WthdrwlDt": "1987-05" + }, + { + "CtryNm": "UGANDA", + "CcyNm": "Old Shilling", + "Ccy": "UGW", + "CcyNbr": "800", + "WthdrwlDt": "1989 to 1990" + }, + { + "CtryNm": "UKRAINE", + "CcyNm": "Karbovanet", + "Ccy": "UAK", + "CcyNbr": "804", + "WthdrwlDt": "1996-09" + }, + { + "CtryNm": "UNION OF SOVIET SOCIALIST REPUBLICS", + "CcyNm": "Rouble", + "Ccy": "SUR", + "CcyNbr": "810", + "WthdrwlDt": "1990-12" + }, + { + "CtryNm": "UNITED STATES", + "CcyNm": "US Dollar (Same day)", + "Ccy": "USS", + "CcyNbr": "998", + "WthdrwlDt": "2014-03" + }, + { + "CtryNm": "URUGUAY", + "CcyNm": "Old Uruguay Peso", + "Ccy": "UYN", + "CcyNbr": "858", + "WthdrwlDt": "1989-12" + }, + { + "CtryNm": "URUGUAY", + "CcyNm": "Uruguayan Peso", + "Ccy": "UYP", + "CcyNbr": "858", + "WthdrwlDt": "1993-03" + }, + { + "CtryNm": "UZBEKISTAN", + "CcyNm": "Russian Ruble", + "Ccy": "RUR", + "CcyNbr": "810", + "WthdrwlDt": "1994-07" + }, + { + "CtryNm": "VENEZUELA", + "CcyNm": "Bolivar", + "Ccy": "VEB", + "CcyNbr": "862", + "WthdrwlDt": "2008-01" + }, + { + "CtryNm": "VENEZUELA", + "CcyNm": "Bolivar Fuerte", + "Ccy": "VEF", + "CcyNbr": "937", + "WthdrwlDt": "2011-12" + }, + { + "CtryNm": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "CcyNm": "Bolivar", + "Ccy": "VEF", + "CcyNbr": "937", + "WthdrwlDt": "2016-02" + }, + { + "CtryNm": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "CcyNm": "Bol\u00edvar", + "Ccy": "VEF", + "CcyNbr": "937", + "WthdrwlDt": "2018-08" + }, + { + "CtryNm": "VIETNAM", + "CcyNm": "Old Dong", + "Ccy": "VNC", + "CcyNbr": "704", + "WthdrwlDt": "1989-1990" + }, + { + "CtryNm": "YEMEN, DEMOCRATIC", + "CcyNm": "Yemeni Dinar", + "Ccy": "YDD", + "CcyNbr": "720", + "WthdrwlDt": "1991-09" + }, + { + "CtryNm": "YUGOSLAVIA", + "CcyNm": "New Yugoslavian Dinar", + "Ccy": "YUD", + "CcyNbr": "890", + "WthdrwlDt": "1990-01" + }, + { + "CtryNm": "YUGOSLAVIA", + "CcyNm": "New Dinar", + "Ccy": "YUM", + "CcyNbr": "891", + "WthdrwlDt": "2003-07" + }, + { + "CtryNm": "YUGOSLAVIA", + "CcyNm": "Yugoslavian Dinar", + "Ccy": "YUN", + "CcyNbr": "890", + "WthdrwlDt": "1995-11" + }, + { + "CtryNm": "ZAIRE", + "CcyNm": "New Zaire", + "Ccy": "ZRN", + "CcyNbr": "180", + "WthdrwlDt": "1999-06" + }, + { + "CtryNm": "ZAIRE", + "CcyNm": "Zaire", + "Ccy": "ZRZ", + "CcyNbr": "180", + "WthdrwlDt": "1994-02" + }, + { + "CtryNm": "ZAMBIA", + "CcyNm": "Zambian Kwacha", + "Ccy": "ZMK", + "CcyNbr": "894", + "WthdrwlDt": "2012-12" + }, + { + "CtryNm": "ZIMBABWE", + "CcyNm": "Rhodesian Dollar", + "Ccy": "ZWC", + "CcyNbr": "716", + "WthdrwlDt": "1989-12" + }, + { + "CtryNm": "ZIMBABWE", + "CcyNm": "Zimbabwe Dollar (old)", + "Ccy": "ZWD", + "CcyNbr": "716", + "WthdrwlDt": "2006-08" + }, + { + "CtryNm": "ZIMBABWE", + "CcyNm": "Zimbabwe Dollar", + "Ccy": "ZWD", + "CcyNbr": "716", + "WthdrwlDt": "2008-08" + }, + { + "CtryNm": "ZIMBABWE", + "CcyNm": "Zimbabwe Dollar (new)", + "Ccy": "ZWN", + "CcyNbr": "942", + "WthdrwlDt": "2006-09" + }, + { + "CtryNm": "ZIMBABWE", + "CcyNm": "Zimbabwe Dollar", + "Ccy": "ZWR", + "CcyNbr": "935", + "WthdrwlDt": "2009-06" + }, + { + "CtryNm": "ZIMBABWE", + "CcyNm": "Zimbabwe\u00a0Dollar", + "Ccy": "ZWL", + "CcyNbr": "932", + "WthdrwlDt": "2024-09" + }, + { + "CtryNm": "ZZ01_Gold-Franc", + "CcyNm": "Gold-Franc", + "Ccy": "XFO", + "WthdrwlDt": "2006-10" + }, + { + "CtryNm": "ZZ02_RINET Funds Code", + "CcyNm": { + "@attributes": { + "IsFund": "WAHR" + }, + "@text": "RINET Funds Code" + }, + "Ccy": "XRE", + "WthdrwlDt": "1999-11" + }, + { + "CtryNm": "ZZ05_UIC-Franc", + "CcyNm": { + "@attributes": { + "IsFund": "WAHR" + }, + "@text": "UIC-Franc" + }, + "Ccy": "XFU", + "WthdrwlDt": "2013-11" + } + ] + } + } +} diff --git a/data/six-group-iso-currency.json b/data/six-group-iso-currency.json new file mode 100644 index 00000000..458bcdde --- /dev/null +++ b/data/six-group-iso-currency.json @@ -0,0 +1,2002 @@ +{ + "ISO_4217": { + "@attributes": { + "Pblshd": "2025-05-12" + }, + "CcyTbl": { + "CcyNtry": [ + { + "CtryNm": "AFGHANISTAN", + "CcyNm": "Afghani", + "Ccy": "AFN", + "CcyNbr": "971", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "\u00c5LAND ISLANDS", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ALBANIA", + "CcyNm": "Lek", + "Ccy": "ALL", + "CcyNbr": "008", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ALGERIA", + "CcyNm": "Algerian Dinar", + "Ccy": "DZD", + "CcyNbr": "012", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "AMERICAN SAMOA", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ANDORRA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ANGOLA", + "CcyNm": "Kwanza", + "Ccy": "AOA", + "CcyNbr": "973", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ANGUILLA", + "CcyNm": "East Caribbean Dollar", + "Ccy": "XCD", + "CcyNbr": "951", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ANTARCTICA", + "CcyNm": "No universal currency" + }, + { + "CtryNm": "ANTIGUA AND BARBUDA", + "CcyNm": "East Caribbean Dollar", + "Ccy": "XCD", + "CcyNbr": "951", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ARAB MONETARY FUND", + "CcyNm": "Arab Accounting Dinar", + "Ccy": "XAD", + "CcyNbr": "396", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ARGENTINA", + "CcyNm": "Argentine Peso", + "Ccy": "ARS", + "CcyNbr": "032", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ARMENIA", + "CcyNm": "Armenian Dram", + "Ccy": "AMD", + "CcyNbr": "051", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ARUBA", + "CcyNm": "Aruban Florin", + "Ccy": "AWG", + "CcyNbr": "533", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "AUSTRALIA", + "CcyNm": "Australian Dollar", + "Ccy": "AUD", + "CcyNbr": "036", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "AUSTRIA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "AZERBAIJAN", + "CcyNm": "Azerbaijan Manat", + "Ccy": "AZN", + "CcyNbr": "944", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BAHAMAS (THE)", + "CcyNm": "Bahamian Dollar", + "Ccy": "BSD", + "CcyNbr": "044", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BAHRAIN", + "CcyNm": "Bahraini Dinar", + "Ccy": "BHD", + "CcyNbr": "048", + "CcyMnrUnts": "3" + }, + { + "CtryNm": "BANGLADESH", + "CcyNm": "Taka", + "Ccy": "BDT", + "CcyNbr": "050", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BARBADOS", + "CcyNm": "Barbados Dollar", + "Ccy": "BBD", + "CcyNbr": "052", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BELARUS", + "CcyNm": "Belarusian Ruble", + "Ccy": "BYN", + "CcyNbr": "933", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BELGIUM", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BELIZE", + "CcyNm": "Belize Dollar", + "Ccy": "BZD", + "CcyNbr": "084", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BENIN", + "CcyNm": "CFA Franc BCEAO", + "Ccy": "XOF", + "CcyNbr": "952", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "BERMUDA", + "CcyNm": "Bermudian Dollar", + "Ccy": "BMD", + "CcyNbr": "060", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BHUTAN", + "CcyNm": "Indian Rupee", + "Ccy": "INR", + "CcyNbr": "356", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BHUTAN", + "CcyNm": "Ngultrum", + "Ccy": "BTN", + "CcyNbr": "064", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BOLIVIA (PLURINATIONAL STATE OF)", + "CcyNm": "Boliviano", + "Ccy": "BOB", + "CcyNbr": "068", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BOLIVIA (PLURINATIONAL STATE OF)", + "CcyNm": { + "@attributes": { + "IsFund": "true" + }, + "@text": "Mvdol" + }, + "Ccy": "BOV", + "CcyNbr": "984", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BONAIRE, SINT EUSTATIUS AND SABA", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BOSNIA AND HERZEGOVINA", + "CcyNm": "Convertible Mark", + "Ccy": "BAM", + "CcyNbr": "977", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BOTSWANA", + "CcyNm": "Pula", + "Ccy": "BWP", + "CcyNbr": "072", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BOUVET ISLAND", + "CcyNm": "Norwegian Krone", + "Ccy": "NOK", + "CcyNbr": "578", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BRAZIL", + "CcyNm": "Brazilian Real", + "Ccy": "BRL", + "CcyNbr": "986", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BRITISH INDIAN OCEAN TERRITORY (THE)", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BRUNEI DARUSSALAM", + "CcyNm": "Brunei Dollar", + "Ccy": "BND", + "CcyNbr": "096", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BULGARIA", + "CcyNm": "Bulgarian Lev", + "Ccy": "BGN", + "CcyNbr": "975", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "BURKINA FASO", + "CcyNm": "CFA Franc BCEAO", + "Ccy": "XOF", + "CcyNbr": "952", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "BURUNDI", + "CcyNm": "Burundi Franc", + "Ccy": "BIF", + "CcyNbr": "108", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "CABO VERDE", + "CcyNm": "Cabo Verde Escudo", + "Ccy": "CVE", + "CcyNbr": "132", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CAMBODIA", + "CcyNm": "Riel", + "Ccy": "KHR", + "CcyNbr": "116", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CAMEROON", + "CcyNm": "CFA Franc BEAC", + "Ccy": "XAF", + "CcyNbr": "950", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "CANADA", + "CcyNm": "Canadian Dollar", + "Ccy": "CAD", + "CcyNbr": "124", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CAYMAN ISLANDS (THE)", + "CcyNm": "Cayman Islands Dollar", + "Ccy": "KYD", + "CcyNbr": "136", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CENTRAL AFRICAN REPUBLIC (THE)", + "CcyNm": "CFA Franc BEAC", + "Ccy": "XAF", + "CcyNbr": "950", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "CHAD", + "CcyNm": "CFA Franc BEAC", + "Ccy": "XAF", + "CcyNbr": "950", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "CHILE", + "CcyNm": "Chilean Peso", + "Ccy": "CLP", + "CcyNbr": "152", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "CHILE", + "CcyNm": { + "@attributes": { + "IsFund": "true" + }, + "@text": "Unidad de Fomento" + }, + "Ccy": "CLF", + "CcyNbr": "990", + "CcyMnrUnts": "4" + }, + { + "CtryNm": "CHINA", + "CcyNm": "Yuan Renminbi", + "Ccy": "CNY", + "CcyNbr": "156", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CHRISTMAS ISLAND", + "CcyNm": "Australian Dollar", + "Ccy": "AUD", + "CcyNbr": "036", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "COCOS (KEELING) ISLANDS (THE)", + "CcyNm": "Australian Dollar", + "Ccy": "AUD", + "CcyNbr": "036", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "COLOMBIA", + "CcyNm": "Colombian Peso", + "Ccy": "COP", + "CcyNbr": "170", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "COLOMBIA", + "CcyNm": { + "@attributes": { + "IsFund": "true" + }, + "@text": "Unidad de Valor Real" + }, + "Ccy": "COU", + "CcyNbr": "970", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "COMOROS (THE)", + "CcyNm": "Comorian Franc", + "Ccy": "KMF", + "CcyNbr": "174", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "CONGO (THE DEMOCRATIC REPUBLIC OF THE)", + "CcyNm": "Congolese Franc", + "Ccy": "CDF", + "CcyNbr": "976", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CONGO (THE)", + "CcyNm": "CFA Franc BEAC", + "Ccy": "XAF", + "CcyNbr": "950", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "COOK ISLANDS (THE)", + "CcyNm": "New Zealand Dollar", + "Ccy": "NZD", + "CcyNbr": "554", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "COSTA RICA", + "CcyNm": "Costa Rican Colon", + "Ccy": "CRC", + "CcyNbr": "188", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "C\u00d4TE D'IVOIRE", + "CcyNm": "CFA Franc BCEAO", + "Ccy": "XOF", + "CcyNbr": "952", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "CROATIA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CUBA", + "CcyNm": "Cuban Peso", + "Ccy": "CUP", + "CcyNbr": "192", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CURA\u00c7AO", + "CcyNm": "Caribbean Guilder", + "Ccy": "XCG", + "CcyNbr": "532", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CYPRUS", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "CZECHIA", + "CcyNm": "Czech Koruna", + "Ccy": "CZK", + "CcyNbr": "203", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "DENMARK", + "CcyNm": "Danish Krone", + "Ccy": "DKK", + "CcyNbr": "208", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "DJIBOUTI", + "CcyNm": "Djibouti Franc", + "Ccy": "DJF", + "CcyNbr": "262", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "DOMINICA", + "CcyNm": "East Caribbean Dollar", + "Ccy": "XCD", + "CcyNbr": "951", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "DOMINICAN REPUBLIC (THE)", + "CcyNm": "Dominican Peso", + "Ccy": "DOP", + "CcyNbr": "214", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ECUADOR", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "EGYPT", + "CcyNm": "Egyptian Pound", + "Ccy": "EGP", + "CcyNbr": "818", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "EL SALVADOR", + "CcyNm": "El Salvador Colon", + "Ccy": "SVC", + "CcyNbr": "222", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "EL SALVADOR", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "EQUATORIAL GUINEA", + "CcyNm": "CFA Franc BEAC", + "Ccy": "XAF", + "CcyNbr": "950", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "ERITREA", + "CcyNm": "Nakfa", + "Ccy": "ERN", + "CcyNbr": "232", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ESTONIA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ESWATINI", + "CcyNm": "Lilangeni", + "Ccy": "SZL", + "CcyNbr": "748", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ETHIOPIA", + "CcyNm": "Ethiopian Birr", + "Ccy": "ETB", + "CcyNbr": "230", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "EUROPEAN UNION", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "FALKLAND ISLANDS (THE) [MALVINAS]", + "CcyNm": "Falkland Islands Pound", + "Ccy": "FKP", + "CcyNbr": "238", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "FAROE ISLANDS (THE)", + "CcyNm": "Danish Krone", + "Ccy": "DKK", + "CcyNbr": "208", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "FIJI", + "CcyNm": "Fiji Dollar", + "Ccy": "FJD", + "CcyNbr": "242", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "FINLAND", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "FRANCE", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "FRENCH GUIANA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "FRENCH POLYNESIA", + "CcyNm": "CFP Franc", + "Ccy": "XPF", + "CcyNbr": "953", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "FRENCH SOUTHERN TERRITORIES (THE)", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GABON", + "CcyNm": "CFA Franc BEAC", + "Ccy": "XAF", + "CcyNbr": "950", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "GAMBIA (THE)", + "CcyNm": "Dalasi", + "Ccy": "GMD", + "CcyNbr": "270", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GEORGIA", + "CcyNm": "Lari", + "Ccy": "GEL", + "CcyNbr": "981", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GERMANY", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GHANA", + "CcyNm": "Ghana Cedi", + "Ccy": "GHS", + "CcyNbr": "936", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GIBRALTAR", + "CcyNm": "Gibraltar Pound", + "Ccy": "GIP", + "CcyNbr": "292", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GREECE", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GREENLAND", + "CcyNm": "Danish Krone", + "Ccy": "DKK", + "CcyNbr": "208", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GRENADA", + "CcyNm": "East Caribbean Dollar", + "Ccy": "XCD", + "CcyNbr": "951", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GUADELOUPE", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GUAM", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GUATEMALA", + "CcyNm": "Quetzal", + "Ccy": "GTQ", + "CcyNbr": "320", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GUERNSEY", + "CcyNm": "Pound Sterling", + "Ccy": "GBP", + "CcyNbr": "826", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "GUINEA", + "CcyNm": "Guinean Franc", + "Ccy": "GNF", + "CcyNbr": "324", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "GUINEA-BISSAU", + "CcyNm": "CFA Franc BCEAO", + "Ccy": "XOF", + "CcyNbr": "952", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "GUYANA", + "CcyNm": "Guyana Dollar", + "Ccy": "GYD", + "CcyNbr": "328", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "HAITI", + "CcyNm": "Gourde", + "Ccy": "HTG", + "CcyNbr": "332", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "HAITI", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "HEARD ISLAND AND McDONALD ISLANDS", + "CcyNm": "Australian Dollar", + "Ccy": "AUD", + "CcyNbr": "036", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "HOLY SEE (THE)", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "HONDURAS", + "CcyNm": "Lempira", + "Ccy": "HNL", + "CcyNbr": "340", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "HONG KONG", + "CcyNm": "Hong Kong Dollar", + "Ccy": "HKD", + "CcyNbr": "344", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "HUNGARY", + "CcyNm": "Forint", + "Ccy": "HUF", + "CcyNbr": "348", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ICELAND", + "CcyNm": "Iceland Krona", + "Ccy": "ISK", + "CcyNbr": "352", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "INDIA", + "CcyNm": "Indian Rupee", + "Ccy": "INR", + "CcyNbr": "356", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "INDONESIA", + "CcyNm": "Rupiah", + "Ccy": "IDR", + "CcyNbr": "360", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "INTERNATIONAL MONETARY FUND (IMF)", + "CcyNm": "SDR (Special Drawing Right)", + "Ccy": "XDR", + "CcyNbr": "960", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "IRAN (ISLAMIC REPUBLIC OF)", + "CcyNm": "Iranian Rial", + "Ccy": "IRR", + "CcyNbr": "364", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "IRAQ", + "CcyNm": "Iraqi Dinar", + "Ccy": "IQD", + "CcyNbr": "368", + "CcyMnrUnts": "3" + }, + { + "CtryNm": "IRELAND", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ISLE OF MAN", + "CcyNm": "Pound Sterling", + "Ccy": "GBP", + "CcyNbr": "826", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ISRAEL", + "CcyNm": "New Israeli Sheqel", + "Ccy": "ILS", + "CcyNbr": "376", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ITALY", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "JAMAICA", + "CcyNm": "Jamaican Dollar", + "Ccy": "JMD", + "CcyNbr": "388", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "JAPAN", + "CcyNm": "Yen", + "Ccy": "JPY", + "CcyNbr": "392", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "JERSEY", + "CcyNm": "Pound Sterling", + "Ccy": "GBP", + "CcyNbr": "826", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "JORDAN", + "CcyNm": "Jordanian Dinar", + "Ccy": "JOD", + "CcyNbr": "400", + "CcyMnrUnts": "3" + }, + { + "CtryNm": "KAZAKHSTAN", + "CcyNm": "Tenge", + "Ccy": "KZT", + "CcyNbr": "398", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "KENYA", + "CcyNm": "Kenyan Shilling", + "Ccy": "KES", + "CcyNbr": "404", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "KIRIBATI", + "CcyNm": "Australian Dollar", + "Ccy": "AUD", + "CcyNbr": "036", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "KOREA (THE DEMOCRATIC PEOPLE\u2019S REPUBLIC OF)", + "CcyNm": "North Korean Won", + "Ccy": "KPW", + "CcyNbr": "408", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "KOREA (THE REPUBLIC OF)", + "CcyNm": "Won", + "Ccy": "KRW", + "CcyNbr": "410", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "KUWAIT", + "CcyNm": "Kuwaiti Dinar", + "Ccy": "KWD", + "CcyNbr": "414", + "CcyMnrUnts": "3" + }, + { + "CtryNm": "KYRGYZSTAN", + "CcyNm": "Som", + "Ccy": "KGS", + "CcyNbr": "417", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "LAO PEOPLE\u2019S DEMOCRATIC REPUBLIC (THE)", + "CcyNm": "Lao Kip", + "Ccy": "LAK", + "CcyNbr": "418", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "LATVIA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "LEBANON", + "CcyNm": "Lebanese Pound", + "Ccy": "LBP", + "CcyNbr": "422", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "LESOTHO", + "CcyNm": "Loti", + "Ccy": "LSL", + "CcyNbr": "426", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "LESOTHO", + "CcyNm": "Rand", + "Ccy": "ZAR", + "CcyNbr": "710", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "LIBERIA", + "CcyNm": "Liberian Dollar", + "Ccy": "LRD", + "CcyNbr": "430", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "LIBYA", + "CcyNm": "Libyan Dinar", + "Ccy": "LYD", + "CcyNbr": "434", + "CcyMnrUnts": "3" + }, + { + "CtryNm": "LIECHTENSTEIN", + "CcyNm": "Swiss Franc", + "Ccy": "CHF", + "CcyNbr": "756", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "LITHUANIA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "LUXEMBOURG", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MACAO", + "CcyNm": "Pataca", + "Ccy": "MOP", + "CcyNbr": "446", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NORTH MACEDONIA", + "CcyNm": "Denar", + "Ccy": "MKD", + "CcyNbr": "807", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MADAGASCAR", + "CcyNm": "Malagasy Ariary", + "Ccy": "MGA", + "CcyNbr": "969", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MALAWI", + "CcyNm": "Malawi Kwacha", + "Ccy": "MWK", + "CcyNbr": "454", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MALAYSIA", + "CcyNm": "Malaysian Ringgit", + "Ccy": "MYR", + "CcyNbr": "458", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MALDIVES", + "CcyNm": "Rufiyaa", + "Ccy": "MVR", + "CcyNbr": "462", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MALI", + "CcyNm": "CFA Franc BCEAO", + "Ccy": "XOF", + "CcyNbr": "952", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "MALTA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MARSHALL ISLANDS (THE)", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MARTINIQUE", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MAURITANIA", + "CcyNm": "Ouguiya", + "Ccy": "MRU", + "CcyNbr": "929", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MAURITIUS", + "CcyNm": "Mauritius Rupee", + "Ccy": "MUR", + "CcyNbr": "480", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MAYOTTE", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MEMBER COUNTRIES OF THE AFRICAN DEVELOPMENT BANK GROUP", + "CcyNm": "ADB Unit of Account", + "Ccy": "XUA", + "CcyNbr": "965", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "MEXICO", + "CcyNm": "Mexican Peso", + "Ccy": "MXN", + "CcyNbr": "484", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MEXICO", + "CcyNm": { + "@attributes": { + "IsFund": "true" + }, + "@text": "Mexican Unidad de Inversion (UDI)" + }, + "Ccy": "MXV", + "CcyNbr": "979", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MICRONESIA (FEDERATED STATES OF)", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MOLDOVA (THE REPUBLIC OF)", + "CcyNm": "Moldovan Leu", + "Ccy": "MDL", + "CcyNbr": "498", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MONACO", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MONGOLIA", + "CcyNm": "Tugrik", + "Ccy": "MNT", + "CcyNbr": "496", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MONTENEGRO", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MONTSERRAT", + "CcyNm": "East Caribbean Dollar", + "Ccy": "XCD", + "CcyNbr": "951", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MOROCCO", + "CcyNm": "Moroccan Dirham", + "Ccy": "MAD", + "CcyNbr": "504", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MOZAMBIQUE", + "CcyNm": "Mozambique Metical", + "Ccy": "MZN", + "CcyNbr": "943", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "MYANMAR", + "CcyNm": "Kyat", + "Ccy": "MMK", + "CcyNbr": "104", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NAMIBIA", + "CcyNm": "Namibia Dollar", + "Ccy": "NAD", + "CcyNbr": "516", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NAMIBIA", + "CcyNm": "Rand", + "Ccy": "ZAR", + "CcyNbr": "710", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NAURU", + "CcyNm": "Australian Dollar", + "Ccy": "AUD", + "CcyNbr": "036", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NEPAL", + "CcyNm": "Nepalese Rupee", + "Ccy": "NPR", + "CcyNbr": "524", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NETHERLANDS (THE)", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NEW CALEDONIA", + "CcyNm": "CFP Franc", + "Ccy": "XPF", + "CcyNbr": "953", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "NEW ZEALAND", + "CcyNm": "New Zealand Dollar", + "Ccy": "NZD", + "CcyNbr": "554", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NICARAGUA", + "CcyNm": "Cordoba Oro", + "Ccy": "NIO", + "CcyNbr": "558", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NIGER (THE)", + "CcyNm": "CFA Franc BCEAO", + "Ccy": "XOF", + "CcyNbr": "952", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "NIGERIA", + "CcyNm": "Naira", + "Ccy": "NGN", + "CcyNbr": "566", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NIUE", + "CcyNm": "New Zealand Dollar", + "Ccy": "NZD", + "CcyNbr": "554", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NORFOLK ISLAND", + "CcyNm": "Australian Dollar", + "Ccy": "AUD", + "CcyNbr": "036", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NORTHERN MARIANA ISLANDS (THE)", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "NORWAY", + "CcyNm": "Norwegian Krone", + "Ccy": "NOK", + "CcyNbr": "578", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "OMAN", + "CcyNm": "Rial Omani", + "Ccy": "OMR", + "CcyNbr": "512", + "CcyMnrUnts": "3" + }, + { + "CtryNm": "PAKISTAN", + "CcyNm": "Pakistan Rupee", + "Ccy": "PKR", + "CcyNbr": "586", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "PALAU", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "PALESTINE, STATE OF", + "CcyNm": "No universal currency" + }, + { + "CtryNm": "PANAMA", + "CcyNm": "Balboa", + "Ccy": "PAB", + "CcyNbr": "590", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "PANAMA", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "PAPUA NEW GUINEA", + "CcyNm": "Kina", + "Ccy": "PGK", + "CcyNbr": "598", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "PARAGUAY", + "CcyNm": "Guarani", + "Ccy": "PYG", + "CcyNbr": "600", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "PERU", + "CcyNm": "Sol", + "Ccy": "PEN", + "CcyNbr": "604", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "PHILIPPINES (THE)", + "CcyNm": "Philippine Peso", + "Ccy": "PHP", + "CcyNbr": "608", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "PITCAIRN", + "CcyNm": "New Zealand Dollar", + "Ccy": "NZD", + "CcyNbr": "554", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "POLAND", + "CcyNm": "Zloty", + "Ccy": "PLN", + "CcyNbr": "985", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "PORTUGAL", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "PUERTO RICO", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "QATAR", + "CcyNm": "Qatari Rial", + "Ccy": "QAR", + "CcyNbr": "634", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "R\u00c9UNION", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ROMANIA", + "CcyNm": "Romanian Leu", + "Ccy": "RON", + "CcyNbr": "946", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "RUSSIAN FEDERATION (THE)", + "CcyNm": "Russian Ruble", + "Ccy": "RUB", + "CcyNbr": "643", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "RWANDA", + "CcyNm": "Rwanda Franc", + "Ccy": "RWF", + "CcyNbr": "646", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "SAINT BARTH\u00c9LEMY", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA", + "CcyNm": "Saint Helena Pound", + "Ccy": "SHP", + "CcyNbr": "654", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAINT KITTS AND NEVIS", + "CcyNm": "East Caribbean Dollar", + "Ccy": "XCD", + "CcyNbr": "951", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAINT LUCIA", + "CcyNm": "East Caribbean Dollar", + "Ccy": "XCD", + "CcyNbr": "951", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAINT MARTIN (FRENCH PART)", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAINT PIERRE AND MIQUELON", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAINT VINCENT AND THE GRENADINES", + "CcyNm": "East Caribbean Dollar", + "Ccy": "XCD", + "CcyNbr": "951", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAMOA", + "CcyNm": "Tala", + "Ccy": "WST", + "CcyNbr": "882", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAN MARINO", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAO TOME AND PRINCIPE", + "CcyNm": "Dobra", + "Ccy": "STN", + "CcyNbr": "930", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SAUDI ARABIA", + "CcyNm": "Saudi Riyal", + "Ccy": "SAR", + "CcyNbr": "682", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SENEGAL", + "CcyNm": "CFA Franc BCEAO", + "Ccy": "XOF", + "CcyNbr": "952", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "SERBIA", + "CcyNm": "Serbian Dinar", + "Ccy": "RSD", + "CcyNbr": "941", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SEYCHELLES", + "CcyNm": "Seychelles Rupee", + "Ccy": "SCR", + "CcyNbr": "690", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SIERRA LEONE", + "CcyNm": "Leone", + "Ccy": "SLE", + "CcyNbr": "925", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SINGAPORE", + "CcyNm": "Singapore Dollar", + "Ccy": "SGD", + "CcyNbr": "702", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SINT MAARTEN (DUTCH PART)", + "CcyNm": "Caribbean Guilder", + "Ccy": "XCG", + "CcyNbr": "532", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SISTEMA UNITARIO DE COMPENSACION REGIONAL DE PAGOS \"SUCRE\"", + "CcyNm": "Sucre", + "Ccy": "XSU", + "CcyNbr": "994", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "SLOVAKIA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SLOVENIA", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SOLOMON ISLANDS", + "CcyNm": "Solomon Islands Dollar", + "Ccy": "SBD", + "CcyNbr": "090", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SOMALIA", + "CcyNm": "Somali Shilling", + "Ccy": "SOS", + "CcyNbr": "706", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SOUTH AFRICA", + "CcyNm": "Rand", + "Ccy": "ZAR", + "CcyNbr": "710", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS", + "CcyNm": "No universal currency" + }, + { + "CtryNm": "SOUTH SUDAN", + "CcyNm": "South Sudanese Pound", + "Ccy": "SSP", + "CcyNbr": "728", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SPAIN", + "CcyNm": "Euro", + "Ccy": "EUR", + "CcyNbr": "978", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SRI LANKA", + "CcyNm": "Sri Lanka Rupee", + "Ccy": "LKR", + "CcyNbr": "144", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SUDAN (THE)", + "CcyNm": "Sudanese Pound", + "Ccy": "SDG", + "CcyNbr": "938", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SURINAME", + "CcyNm": "Surinam Dollar", + "Ccy": "SRD", + "CcyNbr": "968", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SVALBARD AND JAN MAYEN", + "CcyNm": "Norwegian Krone", + "Ccy": "NOK", + "CcyNbr": "578", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SWEDEN", + "CcyNm": "Swedish Krona", + "Ccy": "SEK", + "CcyNbr": "752", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SWITZERLAND", + "CcyNm": "Swiss Franc", + "Ccy": "CHF", + "CcyNbr": "756", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SWITZERLAND", + "CcyNm": { + "@attributes": { + "IsFund": "true" + }, + "@text": "WIR Euro" + }, + "Ccy": "CHE", + "CcyNbr": "947", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SWITZERLAND", + "CcyNm": { + "@attributes": { + "IsFund": "true" + }, + "@text": "WIR Franc" + }, + "Ccy": "CHW", + "CcyNbr": "948", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "SYRIAN ARAB REPUBLIC", + "CcyNm": "Syrian Pound", + "Ccy": "SYP", + "CcyNbr": "760", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TAIWAN (PROVINCE OF CHINA)", + "CcyNm": "New Taiwan Dollar", + "Ccy": "TWD", + "CcyNbr": "901", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TAJIKISTAN", + "CcyNm": "Somoni", + "Ccy": "TJS", + "CcyNbr": "972", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TANZANIA, UNITED REPUBLIC OF", + "CcyNm": "Tanzanian Shilling", + "Ccy": "TZS", + "CcyNbr": "834", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "THAILAND", + "CcyNm": "Baht", + "Ccy": "THB", + "CcyNbr": "764", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TIMOR-LESTE", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TOGO", + "CcyNm": "CFA Franc BCEAO", + "Ccy": "XOF", + "CcyNbr": "952", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "TOKELAU", + "CcyNm": "New Zealand Dollar", + "Ccy": "NZD", + "CcyNbr": "554", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TONGA", + "CcyNm": "Pa\u2019anga", + "Ccy": "TOP", + "CcyNbr": "776", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TRINIDAD AND TOBAGO", + "CcyNm": "Trinidad and Tobago Dollar", + "Ccy": "TTD", + "CcyNbr": "780", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TUNISIA", + "CcyNm": "Tunisian Dinar", + "Ccy": "TND", + "CcyNbr": "788", + "CcyMnrUnts": "3" + }, + { + "CtryNm": "T\u00dcRK\u0130YE", + "CcyNm": "Turkish Lira", + "Ccy": "TRY", + "CcyNbr": "949", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TURKMENISTAN", + "CcyNm": "Turkmenistan New Manat", + "Ccy": "TMT", + "CcyNbr": "934", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TURKS AND CAICOS ISLANDS (THE)", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "TUVALU", + "CcyNm": "Australian Dollar", + "Ccy": "AUD", + "CcyNbr": "036", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "UGANDA", + "CcyNm": "Uganda Shilling", + "Ccy": "UGX", + "CcyNbr": "800", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "UKRAINE", + "CcyNm": "Hryvnia", + "Ccy": "UAH", + "CcyNbr": "980", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "UNITED ARAB EMIRATES (THE)", + "CcyNm": "UAE Dirham", + "Ccy": "AED", + "CcyNbr": "784", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND (THE)", + "CcyNm": "Pound Sterling", + "Ccy": "GBP", + "CcyNbr": "826", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "UNITED STATES MINOR OUTLYING ISLANDS (THE)", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "UNITED STATES OF AMERICA (THE)", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "UNITED STATES OF AMERICA (THE)", + "CcyNm": { + "@attributes": { + "IsFund": "true" + }, + "@text": "US Dollar (Next day)" + }, + "Ccy": "USN", + "CcyNbr": "997", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "URUGUAY", + "CcyNm": "Peso Uruguayo", + "Ccy": "UYU", + "CcyNbr": "858", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "URUGUAY", + "CcyNm": { + "@attributes": { + "IsFund": "true" + }, + "@text": "Uruguay Peso en Unidades Indexadas (UI)" + }, + "Ccy": "UYI", + "CcyNbr": "940", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "URUGUAY", + "CcyNm": "Unidad Previsional", + "Ccy": "UYW", + "CcyNbr": "927", + "CcyMnrUnts": "4" + }, + { + "CtryNm": "UZBEKISTAN", + "CcyNm": "Uzbekistan Sum", + "Ccy": "UZS", + "CcyNbr": "860", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "VANUATU", + "CcyNm": "Vatu", + "Ccy": "VUV", + "CcyNbr": "548", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "CcyNm": "Bol\u00edvar Soberano", + "Ccy": "VES", + "CcyNbr": "928", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "CcyNm": "Bol\u00edvar Soberano", + "Ccy": "VED", + "CcyNbr": "926", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "VIET NAM", + "CcyNm": "Dong", + "Ccy": "VND", + "CcyNbr": "704", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "VIRGIN ISLANDS (BRITISH)", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "VIRGIN ISLANDS (U.S.)", + "CcyNm": "US Dollar", + "Ccy": "USD", + "CcyNbr": "840", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "WALLIS AND FUTUNA", + "CcyNm": "CFP Franc", + "Ccy": "XPF", + "CcyNbr": "953", + "CcyMnrUnts": "0" + }, + { + "CtryNm": "WESTERN SAHARA", + "CcyNm": "Moroccan Dirham", + "Ccy": "MAD", + "CcyNbr": "504", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "YEMEN", + "CcyNm": "Yemeni Rial", + "Ccy": "YER", + "CcyNbr": "886", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ZAMBIA", + "CcyNm": "Zambian Kwacha", + "Ccy": "ZMW", + "CcyNbr": "967", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ZIMBABWE", + "CcyNm": "Zimbabwe Gold", + "Ccy": "ZWG", + "CcyNbr": "924", + "CcyMnrUnts": "2" + }, + { + "CtryNm": "ZZ01_Bond Markets Unit European_EURCO", + "CcyNm": "Bond Markets Unit European Composite Unit (EURCO)", + "Ccy": "XBA", + "CcyNbr": "955", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "ZZ02_Bond Markets Unit European_EMU-6", + "CcyNm": "Bond Markets Unit European Monetary Unit (E.M.U.-6)", + "Ccy": "XBB", + "CcyNbr": "956", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "ZZ03_Bond Markets Unit European_EUA-9", + "CcyNm": "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)", + "Ccy": "XBC", + "CcyNbr": "957", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "ZZ04_Bond Markets Unit European_EUA-17", + "CcyNm": "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)", + "Ccy": "XBD", + "CcyNbr": "958", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "ZZ06_Testing_Code", + "CcyNm": "Codes specifically reserved for testing purposes", + "Ccy": "XTS", + "CcyNbr": "963", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "ZZ07_No_Currency", + "CcyNm": "The codes assigned for transactions where no currency is involved", + "Ccy": "XXX", + "CcyNbr": "999", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "ZZ08_Gold", + "CcyNm": "Gold", + "Ccy": "XAU", + "CcyNbr": "959", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "ZZ09_Palladium", + "CcyNm": "Palladium", + "Ccy": "XPD", + "CcyNbr": "964", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "ZZ10_Platinum", + "CcyNm": "Platinum", + "Ccy": "XPT", + "CcyNbr": "962", + "CcyMnrUnts": "N.A." + }, + { + "CtryNm": "ZZ11_Silver", + "CcyNm": "Silver", + "Ccy": "XAG", + "CcyNbr": "961", + "CcyMnrUnts": "N.A." + } + ] + } + } +} diff --git a/schemas/iso/currency/alpha-code.json b/schemas/iso/currency/alpha-code.json new file mode 100644 index 00000000..e863bbe0 --- /dev/null +++ b/schemas/iso/currency/alpha-code.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Currency, Fund, and Precious Metal Code", + "description": "A three-letter alphabetic code including currencies, funds, and precious metals (2025-05-12)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ "AED", "AFN", "ALL", "AMD", "BOV", "CHE", "XAG" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "$ref": "alpha-currency.json" + }, + { + "$ref": "alpha-fund.json" + }, + { + "$ref": "alpha-precious-metal.json" + } + ] +} diff --git a/schemas/iso/currency/alpha-currency.json b/schemas/iso/currency/alpha-currency.json new file mode 100644 index 00000000..aaa9fc59 --- /dev/null +++ b/schemas/iso/currency/alpha-currency.json @@ -0,0 +1,1000 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Currency Code", + "description": "A three-letter alphabetic currency code, excluding funds and precious metals (2025-05-12)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ "AED", "AFN", "ALL", "AMD" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "title": "UAE Dirham", + "x-country-name": "UNITED ARAB EMIRATES (THE)", + "x-minor-unit": 2, + "const": "AED" + }, + { + "title": "Afghani", + "x-country-name": "AFGHANISTAN", + "x-minor-unit": 2, + "const": "AFN" + }, + { + "title": "Lek", + "x-country-name": "ALBANIA", + "x-minor-unit": 2, + "const": "ALL" + }, + { + "title": "Armenian Dram", + "x-country-name": "ARMENIA", + "x-minor-unit": 2, + "const": "AMD" + }, + { + "title": "Kwanza", + "x-country-name": "ANGOLA", + "x-minor-unit": 2, + "const": "AOA" + }, + { + "title": "Argentine Peso", + "x-country-name": "ARGENTINA", + "x-minor-unit": 2, + "const": "ARS" + }, + { + "title": "Australian Dollar", + "x-country-name": "TUVALU", + "x-minor-unit": 2, + "const": "AUD" + }, + { + "title": "Aruban Florin", + "x-country-name": "ARUBA", + "x-minor-unit": 2, + "const": "AWG" + }, + { + "title": "Azerbaijan Manat", + "x-country-name": "AZERBAIJAN", + "x-minor-unit": 2, + "const": "AZN" + }, + { + "title": "Convertible Mark", + "x-country-name": "BOSNIA AND HERZEGOVINA", + "x-minor-unit": 2, + "const": "BAM" + }, + { + "title": "Barbados Dollar", + "x-country-name": "BARBADOS", + "x-minor-unit": 2, + "const": "BBD" + }, + { + "title": "Taka", + "x-country-name": "BANGLADESH", + "x-minor-unit": 2, + "const": "BDT" + }, + { + "title": "Bulgarian Lev", + "x-country-name": "BULGARIA", + "x-minor-unit": 2, + "const": "BGN" + }, + { + "title": "Bahraini Dinar", + "x-country-name": "BAHRAIN", + "x-minor-unit": 3, + "const": "BHD" + }, + { + "title": "Burundi Franc", + "x-country-name": "BURUNDI", + "x-minor-unit": 0, + "const": "BIF" + }, + { + "title": "Bermudian Dollar", + "x-country-name": "BERMUDA", + "x-minor-unit": 2, + "const": "BMD" + }, + { + "title": "Brunei Dollar", + "x-country-name": "BRUNEI DARUSSALAM", + "x-minor-unit": 2, + "const": "BND" + }, + { + "title": "Boliviano", + "x-country-name": "BOLIVIA (PLURINATIONAL STATE OF)", + "x-minor-unit": 2, + "const": "BOB" + }, + { + "title": "Brazilian Real", + "x-country-name": "BRAZIL", + "x-minor-unit": 2, + "const": "BRL" + }, + { + "title": "Bahamian Dollar", + "x-country-name": "BAHAMAS (THE)", + "x-minor-unit": 2, + "const": "BSD" + }, + { + "title": "Ngultrum", + "x-country-name": "BHUTAN", + "x-minor-unit": 2, + "const": "BTN" + }, + { + "title": "Pula", + "x-country-name": "BOTSWANA", + "x-minor-unit": 2, + "const": "BWP" + }, + { + "title": "Belarusian Ruble", + "x-country-name": "BELARUS", + "x-minor-unit": 2, + "const": "BYN" + }, + { + "title": "Belize Dollar", + "x-country-name": "BELIZE", + "x-minor-unit": 2, + "const": "BZD" + }, + { + "title": "Canadian Dollar", + "x-country-name": "CANADA", + "x-minor-unit": 2, + "const": "CAD" + }, + { + "title": "Congolese Franc", + "x-country-name": "CONGO (THE DEMOCRATIC REPUBLIC OF THE)", + "x-minor-unit": 2, + "const": "CDF" + }, + { + "title": "Swiss Franc", + "x-country-name": "SWITZERLAND", + "x-minor-unit": 2, + "const": "CHF" + }, + { + "title": "Chilean Peso", + "x-country-name": "CHILE", + "x-minor-unit": 0, + "const": "CLP" + }, + { + "title": "Yuan Renminbi", + "x-country-name": "CHINA", + "x-minor-unit": 2, + "const": "CNY" + }, + { + "title": "Colombian Peso", + "x-country-name": "COLOMBIA", + "x-minor-unit": 2, + "const": "COP" + }, + { + "title": "Costa Rican Colon", + "x-country-name": "COSTA RICA", + "x-minor-unit": 2, + "const": "CRC" + }, + { + "title": "Cuban Peso", + "x-country-name": "CUBA", + "x-minor-unit": 2, + "const": "CUP" + }, + { + "title": "Cabo Verde Escudo", + "x-country-name": "CABO VERDE", + "x-minor-unit": 2, + "const": "CVE" + }, + { + "title": "Czech Koruna", + "x-country-name": "CZECHIA", + "x-minor-unit": 2, + "const": "CZK" + }, + { + "title": "Djibouti Franc", + "x-country-name": "DJIBOUTI", + "x-minor-unit": 0, + "const": "DJF" + }, + { + "title": "Danish Krone", + "x-country-name": "GREENLAND", + "x-minor-unit": 2, + "const": "DKK" + }, + { + "title": "Dominican Peso", + "x-country-name": "DOMINICAN REPUBLIC (THE)", + "x-minor-unit": 2, + "const": "DOP" + }, + { + "title": "Algerian Dinar", + "x-country-name": "ALGERIA", + "x-minor-unit": 2, + "const": "DZD" + }, + { + "title": "Egyptian Pound", + "x-country-name": "EGYPT", + "x-minor-unit": 2, + "const": "EGP" + }, + { + "title": "Nakfa", + "x-country-name": "ERITREA", + "x-minor-unit": 2, + "const": "ERN" + }, + { + "title": "Ethiopian Birr", + "x-country-name": "ETHIOPIA", + "x-minor-unit": 2, + "const": "ETB" + }, + { + "title": "Euro", + "x-country-name": "SPAIN", + "x-minor-unit": 2, + "const": "EUR" + }, + { + "title": "Fiji Dollar", + "x-country-name": "FIJI", + "x-minor-unit": 2, + "const": "FJD" + }, + { + "title": "Falkland Islands Pound", + "x-country-name": "FALKLAND ISLANDS (THE) [MALVINAS]", + "x-minor-unit": 2, + "const": "FKP" + }, + { + "title": "Pound Sterling", + "x-country-name": "UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND (THE)", + "x-minor-unit": 2, + "const": "GBP" + }, + { + "title": "Lari", + "x-country-name": "GEORGIA", + "x-minor-unit": 2, + "const": "GEL" + }, + { + "title": "Ghana Cedi", + "x-country-name": "GHANA", + "x-minor-unit": 2, + "const": "GHS" + }, + { + "title": "Gibraltar Pound", + "x-country-name": "GIBRALTAR", + "x-minor-unit": 2, + "const": "GIP" + }, + { + "title": "Dalasi", + "x-country-name": "GAMBIA (THE)", + "x-minor-unit": 2, + "const": "GMD" + }, + { + "title": "Guinean Franc", + "x-country-name": "GUINEA", + "x-minor-unit": 0, + "const": "GNF" + }, + { + "title": "Quetzal", + "x-country-name": "GUATEMALA", + "x-minor-unit": 2, + "const": "GTQ" + }, + { + "title": "Guyana Dollar", + "x-country-name": "GUYANA", + "x-minor-unit": 2, + "const": "GYD" + }, + { + "title": "Hong Kong Dollar", + "x-country-name": "HONG KONG", + "x-minor-unit": 2, + "const": "HKD" + }, + { + "title": "Lempira", + "x-country-name": "HONDURAS", + "x-minor-unit": 2, + "const": "HNL" + }, + { + "title": "Gourde", + "x-country-name": "HAITI", + "x-minor-unit": 2, + "const": "HTG" + }, + { + "title": "Forint", + "x-country-name": "HUNGARY", + "x-minor-unit": 2, + "const": "HUF" + }, + { + "title": "Rupiah", + "x-country-name": "INDONESIA", + "x-minor-unit": 2, + "const": "IDR" + }, + { + "title": "New Israeli Sheqel", + "x-country-name": "ISRAEL", + "x-minor-unit": 2, + "const": "ILS" + }, + { + "title": "Indian Rupee", + "x-country-name": "INDIA", + "x-minor-unit": 2, + "const": "INR" + }, + { + "title": "Iraqi Dinar", + "x-country-name": "IRAQ", + "x-minor-unit": 3, + "const": "IQD" + }, + { + "title": "Iranian Rial", + "x-country-name": "IRAN (ISLAMIC REPUBLIC OF)", + "x-minor-unit": 2, + "const": "IRR" + }, + { + "title": "Iceland Krona", + "x-country-name": "ICELAND", + "x-minor-unit": 0, + "const": "ISK" + }, + { + "title": "Jamaican Dollar", + "x-country-name": "JAMAICA", + "x-minor-unit": 2, + "const": "JMD" + }, + { + "title": "Jordanian Dinar", + "x-country-name": "JORDAN", + "x-minor-unit": 3, + "const": "JOD" + }, + { + "title": "Yen", + "x-country-name": "JAPAN", + "x-minor-unit": 0, + "const": "JPY" + }, + { + "title": "Kenyan Shilling", + "x-country-name": "KENYA", + "x-minor-unit": 2, + "const": "KES" + }, + { + "title": "Som", + "x-country-name": "KYRGYZSTAN", + "x-minor-unit": 2, + "const": "KGS" + }, + { + "title": "Riel", + "x-country-name": "CAMBODIA", + "x-minor-unit": 2, + "const": "KHR" + }, + { + "title": "Comorian Franc", + "x-country-name": "COMOROS (THE)", + "x-minor-unit": 0, + "const": "KMF" + }, + { + "title": "North Korean Won", + "x-country-name": "KOREA (THE DEMOCRATIC PEOPLE’S REPUBLIC OF)", + "x-minor-unit": 2, + "const": "KPW" + }, + { + "title": "Won", + "x-country-name": "KOREA (THE REPUBLIC OF)", + "x-minor-unit": 0, + "const": "KRW" + }, + { + "title": "Kuwaiti Dinar", + "x-country-name": "KUWAIT", + "x-minor-unit": 3, + "const": "KWD" + }, + { + "title": "Cayman Islands Dollar", + "x-country-name": "CAYMAN ISLANDS (THE)", + "x-minor-unit": 2, + "const": "KYD" + }, + { + "title": "Tenge", + "x-country-name": "KAZAKHSTAN", + "x-minor-unit": 2, + "const": "KZT" + }, + { + "title": "Lao Kip", + "x-country-name": "LAO PEOPLE’S DEMOCRATIC REPUBLIC (THE)", + "x-minor-unit": 2, + "const": "LAK" + }, + { + "title": "Lebanese Pound", + "x-country-name": "LEBANON", + "x-minor-unit": 2, + "const": "LBP" + }, + { + "title": "Sri Lanka Rupee", + "x-country-name": "SRI LANKA", + "x-minor-unit": 2, + "const": "LKR" + }, + { + "title": "Liberian Dollar", + "x-country-name": "LIBERIA", + "x-minor-unit": 2, + "const": "LRD" + }, + { + "title": "Loti", + "x-country-name": "LESOTHO", + "x-minor-unit": 2, + "const": "LSL" + }, + { + "title": "Libyan Dinar", + "x-country-name": "LIBYA", + "x-minor-unit": 3, + "const": "LYD" + }, + { + "title": "Moroccan Dirham", + "x-country-name": "WESTERN SAHARA", + "x-minor-unit": 2, + "const": "MAD" + }, + { + "title": "Moldovan Leu", + "x-country-name": "MOLDOVA (THE REPUBLIC OF)", + "x-minor-unit": 2, + "const": "MDL" + }, + { + "title": "Malagasy Ariary", + "x-country-name": "MADAGASCAR", + "x-minor-unit": 2, + "const": "MGA" + }, + { + "title": "Denar", + "x-country-name": "NORTH MACEDONIA", + "x-minor-unit": 2, + "const": "MKD" + }, + { + "title": "Kyat", + "x-country-name": "MYANMAR", + "x-minor-unit": 2, + "const": "MMK" + }, + { + "title": "Tugrik", + "x-country-name": "MONGOLIA", + "x-minor-unit": 2, + "const": "MNT" + }, + { + "title": "Pataca", + "x-country-name": "MACAO", + "x-minor-unit": 2, + "const": "MOP" + }, + { + "title": "Ouguiya", + "x-country-name": "MAURITANIA", + "x-minor-unit": 2, + "const": "MRU" + }, + { + "title": "Mauritius Rupee", + "x-country-name": "MAURITIUS", + "x-minor-unit": 2, + "const": "MUR" + }, + { + "title": "Rufiyaa", + "x-country-name": "MALDIVES", + "x-minor-unit": 2, + "const": "MVR" + }, + { + "title": "Malawi Kwacha", + "x-country-name": "MALAWI", + "x-minor-unit": 2, + "const": "MWK" + }, + { + "title": "Mexican Peso", + "x-country-name": "MEXICO", + "x-minor-unit": 2, + "const": "MXN" + }, + { + "title": "Malaysian Ringgit", + "x-country-name": "MALAYSIA", + "x-minor-unit": 2, + "const": "MYR" + }, + { + "title": "Mozambique Metical", + "x-country-name": "MOZAMBIQUE", + "x-minor-unit": 2, + "const": "MZN" + }, + { + "title": "Namibia Dollar", + "x-country-name": "NAMIBIA", + "x-minor-unit": 2, + "const": "NAD" + }, + { + "title": "Naira", + "x-country-name": "NIGERIA", + "x-minor-unit": 2, + "const": "NGN" + }, + { + "title": "Cordoba Oro", + "x-country-name": "NICARAGUA", + "x-minor-unit": 2, + "const": "NIO" + }, + { + "title": "Norwegian Krone", + "x-country-name": "SVALBARD AND JAN MAYEN", + "x-minor-unit": 2, + "const": "NOK" + }, + { + "title": "Nepalese Rupee", + "x-country-name": "NEPAL", + "x-minor-unit": 2, + "const": "NPR" + }, + { + "title": "New Zealand Dollar", + "x-country-name": "TOKELAU", + "x-minor-unit": 2, + "const": "NZD" + }, + { + "title": "Rial Omani", + "x-country-name": "OMAN", + "x-minor-unit": 3, + "const": "OMR" + }, + { + "title": "Balboa", + "x-country-name": "PANAMA", + "x-minor-unit": 2, + "const": "PAB" + }, + { + "title": "Sol", + "x-country-name": "PERU", + "x-minor-unit": 2, + "const": "PEN" + }, + { + "title": "Kina", + "x-country-name": "PAPUA NEW GUINEA", + "x-minor-unit": 2, + "const": "PGK" + }, + { + "title": "Philippine Peso", + "x-country-name": "PHILIPPINES (THE)", + "x-minor-unit": 2, + "const": "PHP" + }, + { + "title": "Pakistan Rupee", + "x-country-name": "PAKISTAN", + "x-minor-unit": 2, + "const": "PKR" + }, + { + "title": "Zloty", + "x-country-name": "POLAND", + "x-minor-unit": 2, + "const": "PLN" + }, + { + "title": "Guarani", + "x-country-name": "PARAGUAY", + "x-minor-unit": 0, + "const": "PYG" + }, + { + "title": "Qatari Rial", + "x-country-name": "QATAR", + "x-minor-unit": 2, + "const": "QAR" + }, + { + "title": "Romanian Leu", + "x-country-name": "ROMANIA", + "x-minor-unit": 2, + "const": "RON" + }, + { + "title": "Serbian Dinar", + "x-country-name": "SERBIA", + "x-minor-unit": 2, + "const": "RSD" + }, + { + "title": "Russian Ruble", + "x-country-name": "RUSSIAN FEDERATION (THE)", + "x-minor-unit": 2, + "const": "RUB" + }, + { + "title": "Rwanda Franc", + "x-country-name": "RWANDA", + "x-minor-unit": 0, + "const": "RWF" + }, + { + "title": "Saudi Riyal", + "x-country-name": "SAUDI ARABIA", + "x-minor-unit": 2, + "const": "SAR" + }, + { + "title": "Solomon Islands Dollar", + "x-country-name": "SOLOMON ISLANDS", + "x-minor-unit": 2, + "const": "SBD" + }, + { + "title": "Seychelles Rupee", + "x-country-name": "SEYCHELLES", + "x-minor-unit": 2, + "const": "SCR" + }, + { + "title": "Sudanese Pound", + "x-country-name": "SUDAN (THE)", + "x-minor-unit": 2, + "const": "SDG" + }, + { + "title": "Swedish Krona", + "x-country-name": "SWEDEN", + "x-minor-unit": 2, + "const": "SEK" + }, + { + "title": "Singapore Dollar", + "x-country-name": "SINGAPORE", + "x-minor-unit": 2, + "const": "SGD" + }, + { + "title": "Saint Helena Pound", + "x-country-name": "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA", + "x-minor-unit": 2, + "const": "SHP" + }, + { + "title": "Leone", + "x-country-name": "SIERRA LEONE", + "x-minor-unit": 2, + "const": "SLE" + }, + { + "title": "Somali Shilling", + "x-country-name": "SOMALIA", + "x-minor-unit": 2, + "const": "SOS" + }, + { + "title": "Surinam Dollar", + "x-country-name": "SURINAME", + "x-minor-unit": 2, + "const": "SRD" + }, + { + "title": "South Sudanese Pound", + "x-country-name": "SOUTH SUDAN", + "x-minor-unit": 2, + "const": "SSP" + }, + { + "title": "Dobra", + "x-country-name": "SAO TOME AND PRINCIPE", + "x-minor-unit": 2, + "const": "STN" + }, + { + "title": "El Salvador Colon", + "x-country-name": "EL SALVADOR", + "x-minor-unit": 2, + "const": "SVC" + }, + { + "title": "Syrian Pound", + "x-country-name": "SYRIAN ARAB REPUBLIC", + "x-minor-unit": 2, + "const": "SYP" + }, + { + "title": "Lilangeni", + "x-country-name": "ESWATINI", + "x-minor-unit": 2, + "const": "SZL" + }, + { + "title": "Baht", + "x-country-name": "THAILAND", + "x-minor-unit": 2, + "const": "THB" + }, + { + "title": "Somoni", + "x-country-name": "TAJIKISTAN", + "x-minor-unit": 2, + "const": "TJS" + }, + { + "title": "Turkmenistan New Manat", + "x-country-name": "TURKMENISTAN", + "x-minor-unit": 2, + "const": "TMT" + }, + { + "title": "Tunisian Dinar", + "x-country-name": "TUNISIA", + "x-minor-unit": 3, + "const": "TND" + }, + { + "title": "Pa’anga", + "x-country-name": "TONGA", + "x-minor-unit": 2, + "const": "TOP" + }, + { + "title": "Turkish Lira", + "x-country-name": "TÜRKİYE", + "x-minor-unit": 2, + "const": "TRY" + }, + { + "title": "Trinidad and Tobago Dollar", + "x-country-name": "TRINIDAD AND TOBAGO", + "x-minor-unit": 2, + "const": "TTD" + }, + { + "title": "New Taiwan Dollar", + "x-country-name": "TAIWAN (PROVINCE OF CHINA)", + "x-minor-unit": 2, + "const": "TWD" + }, + { + "title": "Tanzanian Shilling", + "x-country-name": "TANZANIA, UNITED REPUBLIC OF", + "x-minor-unit": 2, + "const": "TZS" + }, + { + "title": "Hryvnia", + "x-country-name": "UKRAINE", + "x-minor-unit": 2, + "const": "UAH" + }, + { + "title": "Uganda Shilling", + "x-country-name": "UGANDA", + "x-minor-unit": 0, + "const": "UGX" + }, + { + "title": "US Dollar", + "x-country-name": "VIRGIN ISLANDS (U.S.)", + "x-minor-unit": 2, + "const": "USD" + }, + { + "title": "Peso Uruguayo", + "x-country-name": "URUGUAY", + "x-minor-unit": 2, + "const": "UYU" + }, + { + "title": "Unidad Previsional", + "x-country-name": "URUGUAY", + "x-minor-unit": 4, + "const": "UYW" + }, + { + "title": "Uzbekistan Sum", + "x-country-name": "UZBEKISTAN", + "x-minor-unit": 2, + "const": "UZS" + }, + { + "title": "Bolívar Soberano", + "x-country-name": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "x-minor-unit": 2, + "const": "VED" + }, + { + "title": "Bolívar Soberano", + "x-country-name": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "x-minor-unit": 2, + "const": "VES" + }, + { + "title": "Dong", + "x-country-name": "VIET NAM", + "x-minor-unit": 0, + "const": "VND" + }, + { + "title": "Vatu", + "x-country-name": "VANUATU", + "x-minor-unit": 0, + "const": "VUV" + }, + { + "title": "Tala", + "x-country-name": "SAMOA", + "x-minor-unit": 2, + "const": "WST" + }, + { + "title": "Arab Accounting Dinar", + "x-country-name": "ARAB MONETARY FUND", + "x-minor-unit": 2, + "const": "XAD" + }, + { + "title": "CFA Franc BEAC", + "x-country-name": "GABON", + "x-minor-unit": 0, + "const": "XAF" + }, + { + "title": "Bond Markets Unit European Composite Unit (EURCO)", + "x-country-name": "ZZ01_Bond Markets Unit European_EURCO", + "x-minor-unit": null, + "const": "XBA" + }, + { + "title": "Bond Markets Unit European Monetary Unit (E.M.U.-6)", + "x-country-name": "ZZ02_Bond Markets Unit European_EMU-6", + "x-minor-unit": null, + "const": "XBB" + }, + { + "title": "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)", + "x-country-name": "ZZ03_Bond Markets Unit European_EUA-9", + "x-minor-unit": null, + "const": "XBC" + }, + { + "title": "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)", + "x-country-name": "ZZ04_Bond Markets Unit European_EUA-17", + "x-minor-unit": null, + "const": "XBD" + }, + { + "title": "East Caribbean Dollar", + "x-country-name": "SAINT VINCENT AND THE GRENADINES", + "x-minor-unit": 2, + "const": "XCD" + }, + { + "title": "Caribbean Guilder", + "x-country-name": "SINT MAARTEN (DUTCH PART)", + "x-minor-unit": 2, + "const": "XCG" + }, + { + "title": "SDR (Special Drawing Right)", + "x-country-name": "INTERNATIONAL MONETARY FUND (IMF)", + "x-minor-unit": null, + "const": "XDR" + }, + { + "title": "CFA Franc BCEAO", + "x-country-name": "TOGO", + "x-minor-unit": 0, + "const": "XOF" + }, + { + "title": "CFP Franc", + "x-country-name": "WALLIS AND FUTUNA", + "x-minor-unit": 0, + "const": "XPF" + }, + { + "title": "Sucre", + "x-country-name": "SISTEMA UNITARIO DE COMPENSACION REGIONAL DE PAGOS \"SUCRE\"", + "x-minor-unit": null, + "const": "XSU" + }, + { + "title": "ADB Unit of Account", + "x-country-name": "MEMBER COUNTRIES OF THE AFRICAN DEVELOPMENT BANK GROUP", + "x-minor-unit": null, + "const": "XUA" + }, + { + "title": "Yemeni Rial", + "x-country-name": "YEMEN", + "x-minor-unit": 2, + "const": "YER" + }, + { + "title": "Rand", + "x-country-name": "SOUTH AFRICA", + "x-minor-unit": 2, + "const": "ZAR" + }, + { + "title": "Zambian Kwacha", + "x-country-name": "ZAMBIA", + "x-minor-unit": 2, + "const": "ZMW" + }, + { + "title": "Zimbabwe Gold", + "x-country-name": "ZIMBABWE", + "x-minor-unit": 2, + "const": "ZWG" + } + ] +} diff --git a/schemas/iso/currency/alpha-fund.json b/schemas/iso/currency/alpha-fund.json new file mode 100644 index 00000000..8db72401 --- /dev/null +++ b/schemas/iso/currency/alpha-fund.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Fund Code", + "description": "A three-letter alphabetic fund code (2025-05-12)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ "BOV", "CHE", "CHW", "CLF" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "title": "Mvdol", + "x-country-name": "BOLIVIA (PLURINATIONAL STATE OF)", + "x-minor-unit": 2, + "const": "BOV" + }, + { + "title": "WIR Euro", + "x-country-name": "SWITZERLAND", + "x-minor-unit": 2, + "const": "CHE" + }, + { + "title": "WIR Franc", + "x-country-name": "SWITZERLAND", + "x-minor-unit": 2, + "const": "CHW" + }, + { + "title": "Unidad de Fomento", + "x-country-name": "CHILE", + "x-minor-unit": 4, + "const": "CLF" + }, + { + "title": "Unidad de Valor Real", + "x-country-name": "COLOMBIA", + "x-minor-unit": 2, + "const": "COU" + }, + { + "title": "Mexican Unidad de Inversion (UDI)", + "x-country-name": "MEXICO", + "x-minor-unit": 2, + "const": "MXV" + }, + { + "title": "US Dollar (Next day)", + "x-country-name": "UNITED STATES OF AMERICA (THE)", + "x-minor-unit": 2, + "const": "USN" + }, + { + "title": "Uruguay Peso en Unidades Indexadas (UI)", + "x-country-name": "URUGUAY", + "x-minor-unit": 0, + "const": "UYI" + } + ] +} diff --git a/schemas/iso/currency/alpha-precious-metal.json b/schemas/iso/currency/alpha-precious-metal.json new file mode 100644 index 00000000..b63c1371 --- /dev/null +++ b/schemas/iso/currency/alpha-precious-metal.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Precious Metal Code", + "description": "A three-letter alphabetic code for precious metals (2025-05-12)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ "XAU", "XAG", "XPT", "XPD" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "title": "Silver", + "const": "XAG" + }, + { + "title": "Gold", + "const": "XAU" + }, + { + "title": "Palladium", + "const": "XPD" + }, + { + "title": "Platinum", + "const": "XPT" + } + ] +} diff --git a/schemas/iso/currency/alpha-test.json b/schemas/iso/currency/alpha-test.json new file mode 100644 index 00000000..2f79a62d --- /dev/null +++ b/schemas/iso/currency/alpha-test.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Test Currency Code", + "description": "The alphabetic code specifically reserved for testing purposes", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ "XTS" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "const": "XTS" +} diff --git a/schemas/iso/currency/alpha-unknown.json b/schemas/iso/currency/alpha-unknown.json new file mode 100644 index 00000000..7a59768a --- /dev/null +++ b/schemas/iso/currency/alpha-unknown.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Unknown Currency Code", + "description": "The alphabetic code for transactions where no currency is involved", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ "XXX" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "const": "XXX" +} diff --git a/schemas/iso/currency/historical/alpha-code.json b/schemas/iso/currency/historical/alpha-code.json new file mode 100644 index 00000000..4c9b2be0 --- /dev/null +++ b/schemas/iso/currency/historical/alpha-code.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Currency, Fund, and Precious Metal Code (Historical)", + "description": "A three-letter alphabetic code including withdrawn currencies, funds, and precious metals (2025-03-31)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ "ADP", "AFA", "ALK", "ANG" ], + "deprecated": true, + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "$ref": "alpha-currency.json" + } + ] +} diff --git a/schemas/iso/currency/historical/alpha-currency.json b/schemas/iso/currency/historical/alpha-currency.json new file mode 100644 index 00000000..03bf7173 --- /dev/null +++ b/schemas/iso/currency/historical/alpha-currency.json @@ -0,0 +1,809 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Currency Code (Historical)", + "description": "A three-letter alphabetic withdrawn currency code, excluding funds and precious metals (2025-03-31)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ "ADP", "AFA", "ALK", "ANG" ], + "deprecated": true, + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "title": "Andorran Peseta", + "x-country-name": "ANDORRA", + "x-withdrawal-date": "2003-07", + "const": "ADP" + }, + { + "title": "Afghani", + "x-country-name": "AFGHANISTAN", + "x-withdrawal-date": "2003-01", + "const": "AFA" + }, + { + "title": "Old Lek", + "x-country-name": "ALBANIA", + "x-withdrawal-date": "1989-12", + "const": "ALK" + }, + { + "title": "Netherlands Antillean Guilder", + "x-country-name": "SINT MAARTEN (DUTCH PART)", + "x-withdrawal-date": "2025-03", + "const": "ANG" + }, + { + "title": "Kwanza", + "x-country-name": "ANGOLA", + "x-withdrawal-date": "1991-03", + "const": "AOK" + }, + { + "title": "New Kwanza", + "x-country-name": "ANGOLA", + "x-withdrawal-date": "2000-02", + "const": "AON" + }, + { + "title": "Kwanza Reajustado", + "x-country-name": "ANGOLA", + "x-withdrawal-date": "2000-02", + "const": "AOR" + }, + { + "title": "Austral", + "x-country-name": "ARGENTINA", + "x-withdrawal-date": "1992-01", + "const": "ARA" + }, + { + "title": "Peso Argentino", + "x-country-name": "ARGENTINA", + "x-withdrawal-date": "1985-07", + "const": "ARP" + }, + { + "title": "Peso", + "x-country-name": "ARGENTINA", + "x-withdrawal-date": "1989 to 1990", + "const": "ARY" + }, + { + "title": "Schilling", + "x-country-name": "AUSTRIA", + "x-withdrawal-date": "2002-03", + "const": "ATS" + }, + { + "title": "Azerbaijan Manat", + "x-country-name": "AZERBAIJAN", + "x-withdrawal-date": "2005-10", + "const": "AYM" + }, + { + "title": "Azerbaijanian Manat", + "x-country-name": "AZERBAIJAN", + "x-withdrawal-date": "2005-12", + "const": "AZM" + }, + { + "title": "Dinar", + "x-country-name": "BOSNIA AND HERZEGOVINA", + "x-withdrawal-date": "1998-07", + "const": "BAD" + }, + { + "title": "Convertible Franc", + "x-country-name": "BELGIUM", + "x-withdrawal-date": "1990-03", + "const": "BEC" + }, + { + "title": "Belgian Franc", + "x-country-name": "BELGIUM", + "x-withdrawal-date": "2002-03", + "const": "BEF" + }, + { + "title": "Financial Franc", + "x-country-name": "BELGIUM", + "x-withdrawal-date": "1990-03", + "const": "BEL" + }, + { + "title": "Lev A/52", + "x-country-name": "BULGARIA", + "x-withdrawal-date": "1989 to 1990", + "const": "BGJ" + }, + { + "title": "Lev A/62", + "x-country-name": "BULGARIA", + "x-withdrawal-date": "1989 to 1990", + "const": "BGK" + }, + { + "title": "Lev", + "x-country-name": "BULGARIA", + "x-withdrawal-date": "2003-11", + "const": "BGL" + }, + { + "title": "Peso boliviano", + "x-country-name": "BOLIVIA", + "x-withdrawal-date": "1987-02", + "const": "BOP" + }, + { + "title": "Cruzeiro", + "x-country-name": "BRAZIL", + "x-withdrawal-date": "1986-03", + "const": "BRB" + }, + { + "title": "Cruzado", + "x-country-name": "BRAZIL", + "x-withdrawal-date": "1989-02", + "const": "BRC" + }, + { + "title": "Cruzeiro", + "x-country-name": "BRAZIL", + "x-withdrawal-date": "1993-03", + "const": "BRE" + }, + { + "title": "New Cruzado", + "x-country-name": "BRAZIL", + "x-withdrawal-date": "1990-03", + "const": "BRN" + }, + { + "title": "Cruzeiro Real", + "x-country-name": "BRAZIL", + "x-withdrawal-date": "1994-07", + "const": "BRR" + }, + { + "title": "Kyat", + "x-country-name": "BURMA", + "x-withdrawal-date": "1990-02", + "const": "BUK" + }, + { + "title": "Belarusian Ruble", + "x-country-name": "BELARUS", + "x-withdrawal-date": "2001-01", + "const": "BYB" + }, + { + "title": "Belarusian Ruble", + "x-country-name": "BELARUS", + "x-withdrawal-date": "2017-01", + "const": "BYR" + }, + { + "title": "WIR Franc (for electronic)", + "x-country-name": "SWITZERLAND", + "x-withdrawal-date": "2004-11", + "const": "CHC" + }, + { + "title": "Serbian Dinar", + "x-country-name": "SERBIA AND MONTENEGRO", + "x-withdrawal-date": "2006-10", + "const": "CSD" + }, + { + "title": "Krona A/53", + "x-country-name": "CZECHOSLOVAKIA", + "x-withdrawal-date": "1989 to 1990", + "const": "CSJ" + }, + { + "title": "Koruna", + "x-country-name": "CZECHOSLOVAKIA", + "x-withdrawal-date": "1993-03", + "const": "CSK" + }, + { + "title": "Peso Convertible", + "x-country-name": "CUBA", + "x-withdrawal-date": "2021-06", + "const": "CUC" + }, + { + "title": "Cyprus Pound", + "x-country-name": "CYPRUS", + "x-withdrawal-date": "2008-01", + "const": "CYP" + }, + { + "title": "Mark der DDR", + "x-country-name": "GERMAN DEMOCRATIC REPUBLIC", + "x-withdrawal-date": "1990-07 to 1990-09", + "const": "DDM" + }, + { + "title": "Deutsche Mark", + "x-country-name": "GERMANY", + "x-withdrawal-date": "2002-03", + "const": "DEM" + }, + { + "title": "Sucre", + "x-country-name": "ECUADOR", + "x-withdrawal-date": "2000-09", + "const": "ECS" + }, + { + "title": "Unidad de Valor Constante (UVC)", + "x-country-name": "ECUADOR", + "x-withdrawal-date": "2000-09", + "const": "ECV" + }, + { + "title": "Kroon", + "x-country-name": "ESTONIA", + "x-withdrawal-date": "2011-01", + "const": "EEK" + }, + { + "title": "Spanish Peseta", + "x-country-name": "SPAIN", + "x-withdrawal-date": "1978 to 1981", + "const": "ESA" + }, + { + "title": "\"A\" Account (convertible Peseta Account)", + "x-country-name": "SPAIN", + "x-withdrawal-date": "1994-12", + "const": "ESB" + }, + { + "title": "Spanish Peseta", + "x-country-name": "SPAIN", + "x-withdrawal-date": "2002-03", + "const": "ESP" + }, + { + "title": "Euro", + "x-country-name": "SERBIA AND MONTENEGRO", + "x-withdrawal-date": "2006-10", + "const": "EUR" + }, + { + "title": "Markka", + "x-country-name": "FINLAND", + "x-withdrawal-date": "2002-03", + "const": "FIM" + }, + { + "title": "French Franc", + "x-country-name": "SAINT-BARTHÉLEMY", + "x-withdrawal-date": "1999-01", + "const": "FRF" + }, + { + "title": "Georgian Coupon", + "x-country-name": "GEORGIA", + "x-withdrawal-date": "1995-10", + "const": "GEK" + }, + { + "title": "Cedi", + "x-country-name": "GHANA", + "x-withdrawal-date": "2008-01", + "const": "GHC" + }, + { + "title": "Ghana Cedi", + "x-country-name": "GHANA", + "x-withdrawal-date": "2007-06", + "const": "GHP" + }, + { + "title": "Syli", + "x-country-name": "GUINEA", + "x-withdrawal-date": "1989-12", + "const": "GNE" + }, + { + "title": "Syli", + "x-country-name": "GUINEA", + "x-withdrawal-date": "1986-02", + "const": "GNS" + }, + { + "title": "Ekwele", + "x-country-name": "EQUATORIAL GUINEA", + "x-withdrawal-date": "1986-06", + "const": "GQE" + }, + { + "title": "Drachma", + "x-country-name": "GREECE", + "x-withdrawal-date": "2002-03", + "const": "GRD" + }, + { + "title": "Guinea Escudo", + "x-country-name": "GUINEA-BISSAU", + "x-withdrawal-date": "1978 to 1981", + "const": "GWE" + }, + { + "title": "Guinea-Bissau Peso", + "x-country-name": "GUINEA-BISSAU", + "x-withdrawal-date": "1997-05", + "const": "GWP" + }, + { + "title": "Croatian Dinar", + "x-country-name": "CROATIA", + "x-withdrawal-date": "1995-01", + "const": "HRD" + }, + { + "title": "Kuna", + "x-country-name": "CROATIA", + "x-withdrawal-date": "2023-01", + "const": "HRK" + }, + { + "title": "Rupiah", + "x-country-name": "TIMOR-LESTE", + "x-withdrawal-date": "2002-07", + "const": "IDR" + }, + { + "title": "Irish Pound", + "x-country-name": "IRELAND", + "x-withdrawal-date": "2002-03", + "const": "IEP" + }, + { + "title": "Pound", + "x-country-name": "ISRAEL", + "x-withdrawal-date": "1978 to 1981", + "const": "ILP" + }, + { + "title": "Old Shekel", + "x-country-name": "ISRAEL", + "x-withdrawal-date": "1989 to 1990", + "const": "ILR" + }, + { + "title": "Old Krona", + "x-country-name": "ICELAND", + "x-withdrawal-date": "1989 to 1990", + "const": "ISJ" + }, + { + "title": "Italian Lira", + "x-country-name": "SAN MARINO", + "x-withdrawal-date": "2002-03", + "const": "ITL" + }, + { + "title": "Pathet Lao Kip", + "x-country-name": "LAO", + "x-withdrawal-date": "1979-12", + "const": "LAJ" + }, + { + "title": "Loti", + "x-country-name": "LESOTHO", + "x-withdrawal-date": "1985-05", + "const": "LSM" + }, + { + "title": "Lithuanian Litas", + "x-country-name": "LITHUANIA", + "x-withdrawal-date": "2014-12", + "const": "LTL" + }, + { + "title": "Talonas", + "x-country-name": "LITHUANIA", + "x-withdrawal-date": "1993-07", + "const": "LTT" + }, + { + "title": "Luxembourg Convertible Franc", + "x-country-name": "LUXEMBOURG", + "x-withdrawal-date": "1990-03", + "const": "LUC" + }, + { + "title": "Luxembourg Franc", + "x-country-name": "LUXEMBOURG", + "x-withdrawal-date": "2002-03", + "const": "LUF" + }, + { + "title": "Luxembourg Financial Franc", + "x-country-name": "LUXEMBOURG", + "x-withdrawal-date": "1990-03", + "const": "LUL" + }, + { + "title": "Latvian Lats", + "x-country-name": "LATVIA", + "x-withdrawal-date": "2014-01", + "const": "LVL" + }, + { + "title": "Latvian Ruble", + "x-country-name": "LATVIA", + "x-withdrawal-date": "1994-12", + "const": "LVR" + }, + { + "title": "Malagasy Franc", + "x-country-name": "MADAGASCAR", + "x-withdrawal-date": "2004-12", + "const": "MGF" + }, + { + "title": "Mali Franc", + "x-country-name": "MALI", + "x-withdrawal-date": "1984-11", + "const": "MLF" + }, + { + "title": "Ouguiya", + "x-country-name": "MAURITANIA", + "x-withdrawal-date": "2017-12", + "const": "MRO" + }, + { + "title": "Maltese Lira", + "x-country-name": "MALTA", + "x-withdrawal-date": "2008-01", + "const": "MTL" + }, + { + "title": "Maltese Pound", + "x-country-name": "MALTA", + "x-withdrawal-date": "1983-06", + "const": "MTP" + }, + { + "title": "Maldive Rupee", + "x-country-name": "MALDIVES", + "x-withdrawal-date": "1989-12", + "const": "MVQ" + }, + { + "title": "Kwacha", + "x-country-name": "MALAWI", + "x-withdrawal-date": "2016-02", + "const": "MWK" + }, + { + "title": "Mexican Peso", + "x-country-name": "MEXICO", + "x-withdrawal-date": "1993-01", + "const": "MXP" + }, + { + "title": "Mozambique Escudo", + "x-country-name": "MOZAMBIQUE", + "x-withdrawal-date": "1978 to 1981", + "const": "MZE" + }, + { + "title": "Mozambique Metical", + "x-country-name": "MOZAMBIQUE", + "x-withdrawal-date": "2006-06", + "const": "MZM" + }, + { + "title": "Cordoba", + "x-country-name": "NICARAGUA", + "x-withdrawal-date": "1990-10", + "const": "NIC" + }, + { + "title": "Netherlands Guilder", + "x-country-name": "NETHERLANDS", + "x-withdrawal-date": "2002-03", + "const": "NLG" + }, + { + "title": "Sol", + "x-country-name": "PERU", + "x-withdrawal-date": "1989 to 1990", + "const": "PEH" + }, + { + "title": "Inti", + "x-country-name": "PERU", + "x-withdrawal-date": "1991-07", + "const": "PEI" + }, + { + "title": "Nuevo Sol", + "x-country-name": "PERU", + "x-withdrawal-date": "2015-12", + "const": "PEN" + }, + { + "title": "Sol", + "x-country-name": "PERU", + "x-withdrawal-date": "1986-02", + "const": "PES" + }, + { + "title": "Zloty", + "x-country-name": "POLAND", + "x-withdrawal-date": "1997-01", + "const": "PLZ" + }, + { + "title": "Portuguese Escudo", + "x-country-name": "PORTUGAL", + "x-withdrawal-date": "2002-03", + "const": "PTE" + }, + { + "title": "Rhodesian Dollar", + "x-country-name": "SOUTHERN RHODESIA", + "x-withdrawal-date": "1978 to 1981", + "const": "RHD" + }, + { + "title": "Leu A/52", + "x-country-name": "ROMANIA", + "x-withdrawal-date": "1989 to 1990", + "const": "ROK" + }, + { + "title": "Old Leu", + "x-country-name": "ROMANIA", + "x-withdrawal-date": "2005-06", + "const": "ROL" + }, + { + "title": "New Romanian Leu", + "x-country-name": "ROMANIA", + "x-withdrawal-date": "2015-06", + "const": "RON" + }, + { + "title": "Russian Ruble", + "x-country-name": "UZBEKISTAN", + "x-withdrawal-date": "1994-07", + "const": "RUR" + }, + { + "title": "Sudanese Dinar", + "x-country-name": "SUDAN", + "x-withdrawal-date": "2007-07", + "const": "SDD" + }, + { + "title": "Sudanese Pound", + "x-country-name": "SOUTH SUDAN", + "x-withdrawal-date": "2012-09", + "const": "SDG" + }, + { + "title": "Sudanese Pound", + "x-country-name": "SUDAN", + "x-withdrawal-date": "1998-06", + "const": "SDP" + }, + { + "title": "Tolar", + "x-country-name": "SLOVENIA", + "x-withdrawal-date": "2007-01", + "const": "SIT" + }, + { + "title": "Slovak Koruna", + "x-country-name": "SLOVAKIA", + "x-withdrawal-date": "2009-01", + "const": "SKK" + }, + { + "title": "Leone", + "x-country-name": "SIERRA LEONE", + "x-withdrawal-date": "2023-12", + "const": "SLL" + }, + { + "title": "Surinam Guilder", + "x-country-name": "SURINAME", + "x-withdrawal-date": "2003-12", + "const": "SRG" + }, + { + "title": "Dobra", + "x-country-name": "SAO TOME AND PRINCIPE", + "x-withdrawal-date": "2017-12", + "const": "STD" + }, + { + "title": "Rouble", + "x-country-name": "UNION OF SOVIET SOCIALIST REPUBLICS", + "x-withdrawal-date": "1990-12", + "const": "SUR" + }, + { + "title": "Lilangeni", + "x-country-name": "SWAZILAND", + "x-withdrawal-date": "2018-08", + "const": "SZL" + }, + { + "title": "Tajik Ruble", + "x-country-name": "TAJIKISTAN", + "x-withdrawal-date": "2001-04", + "const": "TJR" + }, + { + "title": "Turkmenistan Manat", + "x-country-name": "TURKMENISTAN", + "x-withdrawal-date": "2009-01", + "const": "TMM" + }, + { + "title": "Timor Escudo", + "x-country-name": "TIMOR-LESTE", + "x-withdrawal-date": "2002-11", + "const": "TPE" + }, + { + "title": "Old Turkish Lira", + "x-country-name": "TURKEY", + "x-withdrawal-date": "2005-12", + "const": "TRL" + }, + { + "title": "New Turkish Lira", + "x-country-name": "TURKEY", + "x-withdrawal-date": "2009-01", + "const": "TRY" + }, + { + "title": "Karbovanet", + "x-country-name": "UKRAINE", + "x-withdrawal-date": "1996-09", + "const": "UAK" + }, + { + "title": "Uganda Shilling", + "x-country-name": "UGANDA", + "x-withdrawal-date": "1987-05", + "const": "UGS" + }, + { + "title": "Old Shilling", + "x-country-name": "UGANDA", + "x-withdrawal-date": "1989 to 1990", + "const": "UGW" + }, + { + "title": "US Dollar (Same day)", + "x-country-name": "UNITED STATES", + "x-withdrawal-date": "2014-03", + "const": "USS" + }, + { + "title": "Old Uruguay Peso", + "x-country-name": "URUGUAY", + "x-withdrawal-date": "1989-12", + "const": "UYN" + }, + { + "title": "Uruguayan Peso", + "x-country-name": "URUGUAY", + "x-withdrawal-date": "1993-03", + "const": "UYP" + }, + { + "title": "Bolivar", + "x-country-name": "VENEZUELA", + "x-withdrawal-date": "2008-01", + "const": "VEB" + }, + { + "title": "Bolívar", + "x-country-name": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "x-withdrawal-date": "2018-08", + "const": "VEF" + }, + { + "title": "Old Dong", + "x-country-name": "VIETNAM", + "x-withdrawal-date": "1989-1990", + "const": "VNC" + }, + { + "title": "European Currency Unit (E.C.U)", + "x-country-name": "EUROPEAN MONETARY CO-OPERATION FUND (EMCF)", + "x-withdrawal-date": "1999-01", + "const": "XEU" + }, + { + "title": "Yemeni Dinar", + "x-country-name": "YEMEN, DEMOCRATIC", + "x-withdrawal-date": "1991-09", + "const": "YDD" + }, + { + "title": "New Yugoslavian Dinar", + "x-country-name": "YUGOSLAVIA", + "x-withdrawal-date": "1990-01", + "const": "YUD" + }, + { + "title": "New Dinar", + "x-country-name": "YUGOSLAVIA", + "x-withdrawal-date": "2003-07", + "const": "YUM" + }, + { + "title": "Yugoslavian Dinar", + "x-country-name": "YUGOSLAVIA", + "x-withdrawal-date": "1995-11", + "const": "YUN" + }, + { + "title": "Financial Rand", + "x-country-name": "SOUTH AFRICA", + "x-withdrawal-date": "1995-03", + "const": "ZAL" + }, + { + "title": "Zambian Kwacha", + "x-country-name": "ZAMBIA", + "x-withdrawal-date": "2012-12", + "const": "ZMK" + }, + { + "title": "New Zaire", + "x-country-name": "ZAIRE", + "x-withdrawal-date": "1999-06", + "const": "ZRN" + }, + { + "title": "Zaire", + "x-country-name": "ZAIRE", + "x-withdrawal-date": "1994-02", + "const": "ZRZ" + }, + { + "title": "Rhodesian Dollar", + "x-country-name": "ZIMBABWE", + "x-withdrawal-date": "1989-12", + "const": "ZWC" + }, + { + "title": "Zimbabwe Dollar", + "x-country-name": "ZIMBABWE", + "x-withdrawal-date": "2008-08", + "const": "ZWD" + }, + { + "title": "Zimbabwe Dollar", + "x-country-name": "ZIMBABWE", + "x-withdrawal-date": "2024-09", + "const": "ZWL" + }, + { + "title": "Zimbabwe Dollar (new)", + "x-country-name": "ZIMBABWE", + "x-withdrawal-date": "2006-09", + "const": "ZWN" + }, + { + "title": "Zimbabwe Dollar", + "x-country-name": "ZIMBABWE", + "x-withdrawal-date": "2009-06", + "const": "ZWR" + } + ] +} diff --git a/schemas/iso/currency/historical/numeric-code.json b/schemas/iso/currency/historical/numeric-code.json new file mode 100644 index 00000000..e8a84e29 --- /dev/null +++ b/schemas/iso/currency/historical/numeric-code.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Currency, Fund, and Precious Metal Code (Historical)", + "description": "A three-digit numeric code including withdrawn currencies, funds, and precious metals (2025-03-31)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ 4, 8, 20, 24 ], + "deprecated": true, + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "$ref": "numeric-currency.json" + } + ] +} diff --git a/schemas/iso/currency/historical/numeric-currency.json b/schemas/iso/currency/historical/numeric-currency.json new file mode 100644 index 00000000..d6adea22 --- /dev/null +++ b/schemas/iso/currency/historical/numeric-currency.json @@ -0,0 +1,635 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Currency Code (Historical)", + "description": "A three-digit numeric withdrawn currency code, excluding funds and precious metals (2025-03-31)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ 4, 8, 20, 24 ], + "deprecated": true, + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "title": "Afghani", + "x-country-name": "AFGHANISTAN", + "x-withdrawal-date": "2003-01", + "const": 4 + }, + { + "title": "Old Lek", + "x-country-name": "ALBANIA", + "x-withdrawal-date": "1989-12", + "const": 8 + }, + { + "title": "Andorran Peseta", + "x-country-name": "ANDORRA", + "x-withdrawal-date": "2003-07", + "const": 20 + }, + { + "title": "New Kwanza", + "x-country-name": "ANGOLA", + "x-withdrawal-date": "2000-02", + "const": 24 + }, + { + "title": "Azerbaijanian Manat", + "x-country-name": "AZERBAIJAN", + "x-withdrawal-date": "2005-12", + "const": 31 + }, + { + "title": "Peso", + "x-country-name": "ARGENTINA", + "x-withdrawal-date": "1989 to 1990", + "const": 32 + }, + { + "title": "Schilling", + "x-country-name": "AUSTRIA", + "x-withdrawal-date": "2002-03", + "const": 40 + }, + { + "title": "Belgian Franc", + "x-country-name": "BELGIUM", + "x-withdrawal-date": "2002-03", + "const": 56 + }, + { + "title": "Peso boliviano", + "x-country-name": "BOLIVIA", + "x-withdrawal-date": "1987-02", + "const": 68 + }, + { + "title": "Dinar", + "x-country-name": "BOSNIA AND HERZEGOVINA", + "x-withdrawal-date": "1998-07", + "const": 70 + }, + { + "title": "New Cruzado", + "x-country-name": "BRAZIL", + "x-withdrawal-date": "1990-03", + "const": 76 + }, + { + "title": "Lev", + "x-country-name": "BULGARIA", + "x-withdrawal-date": "2003-11", + "const": 100 + }, + { + "title": "Kyat", + "x-country-name": "BURMA", + "x-withdrawal-date": "1990-02", + "const": 104 + }, + { + "title": "Belarusian Ruble", + "x-country-name": "BELARUS", + "x-withdrawal-date": "2001-01", + "const": 112 + }, + { + "title": "Zaire", + "x-country-name": "ZAIRE", + "x-withdrawal-date": "1994-02", + "const": 180 + }, + { + "title": "Kuna", + "x-country-name": "CROATIA", + "x-withdrawal-date": "2023-01", + "const": 191 + }, + { + "title": "Cyprus Pound", + "x-country-name": "CYPRUS", + "x-withdrawal-date": "2008-01", + "const": 196 + }, + { + "title": "Koruna", + "x-country-name": "CZECHOSLOVAKIA", + "x-withdrawal-date": "1993-03", + "const": 200 + }, + { + "title": "Krona A/53", + "x-country-name": "CZECHOSLOVAKIA", + "x-withdrawal-date": "1989 to 1990", + "const": 203 + }, + { + "title": "Sucre", + "x-country-name": "ECUADOR", + "x-withdrawal-date": "2000-09", + "const": 218 + }, + { + "title": "Ekwele", + "x-country-name": "EQUATORIAL GUINEA", + "x-withdrawal-date": "1986-06", + "const": 226 + }, + { + "title": "Kroon", + "x-country-name": "ESTONIA", + "x-withdrawal-date": "2011-01", + "const": 233 + }, + { + "title": "Markka", + "x-country-name": "FINLAND", + "x-withdrawal-date": "2002-03", + "const": 246 + }, + { + "title": "French Franc", + "x-country-name": "SAINT-BARTHÉLEMY", + "x-withdrawal-date": "1999-01", + "const": 250 + }, + { + "title": "Georgian Coupon", + "x-country-name": "GEORGIA", + "x-withdrawal-date": "1995-10", + "const": 268 + }, + { + "title": "Deutsche Mark", + "x-country-name": "GERMANY", + "x-withdrawal-date": "2002-03", + "const": 276 + }, + { + "title": "Mark der DDR", + "x-country-name": "GERMAN DEMOCRATIC REPUBLIC", + "x-withdrawal-date": "1990-07 to 1990-09", + "const": 278 + }, + { + "title": "Cedi", + "x-country-name": "GHANA", + "x-withdrawal-date": "2008-01", + "const": 288 + }, + { + "title": "Drachma", + "x-country-name": "GREECE", + "x-withdrawal-date": "2002-03", + "const": 300 + }, + { + "title": "Syli", + "x-country-name": "GUINEA", + "x-withdrawal-date": "1986-02", + "const": 324 + }, + { + "title": "Old Krona", + "x-country-name": "ICELAND", + "x-withdrawal-date": "1989 to 1990", + "const": 352 + }, + { + "title": "Rupiah", + "x-country-name": "TIMOR-LESTE", + "x-withdrawal-date": "2002-07", + "const": 360 + }, + { + "title": "Irish Pound", + "x-country-name": "IRELAND", + "x-withdrawal-date": "2002-03", + "const": 372 + }, + { + "title": "Old Shekel", + "x-country-name": "ISRAEL", + "x-withdrawal-date": "1989 to 1990", + "const": 376 + }, + { + "title": "Italian Lira", + "x-country-name": "SAN MARINO", + "x-withdrawal-date": "2002-03", + "const": 380 + }, + { + "title": "Pathet Lao Kip", + "x-country-name": "LAO", + "x-withdrawal-date": "1979-12", + "const": 418 + }, + { + "title": "Loti", + "x-country-name": "LESOTHO", + "x-withdrawal-date": "1985-05", + "const": 426 + }, + { + "title": "Latvian Ruble", + "x-country-name": "LATVIA", + "x-withdrawal-date": "1994-12", + "const": 428 + }, + { + "title": "Talonas", + "x-country-name": "LITHUANIA", + "x-withdrawal-date": "1993-07", + "const": 440 + }, + { + "title": "Luxembourg Franc", + "x-country-name": "LUXEMBOURG", + "x-withdrawal-date": "2002-03", + "const": 442 + }, + { + "title": "Malagasy Franc", + "x-country-name": "MADAGASCAR", + "x-withdrawal-date": "2004-12", + "const": 450 + }, + { + "title": "Kwacha", + "x-country-name": "MALAWI", + "x-withdrawal-date": "2016-02", + "const": 454 + }, + { + "title": "Maldive Rupee", + "x-country-name": "MALDIVES", + "x-withdrawal-date": "1989-12", + "const": 462 + }, + { + "title": "Mali Franc", + "x-country-name": "MALI", + "x-withdrawal-date": "1984-11", + "const": 466 + }, + { + "title": "Maltese Pound", + "x-country-name": "MALTA", + "x-withdrawal-date": "1983-06", + "const": 470 + }, + { + "title": "Ouguiya", + "x-country-name": "MAURITANIA", + "x-withdrawal-date": "2017-12", + "const": 478 + }, + { + "title": "Mexican Peso", + "x-country-name": "MEXICO", + "x-withdrawal-date": "1993-01", + "const": 484 + }, + { + "title": "Mozambique Metical", + "x-country-name": "MOZAMBIQUE", + "x-withdrawal-date": "2006-06", + "const": 508 + }, + { + "title": "Netherlands Guilder", + "x-country-name": "NETHERLANDS", + "x-withdrawal-date": "2002-03", + "const": 528 + }, + { + "title": "Netherlands Antillean Guilder", + "x-country-name": "SINT MAARTEN (DUTCH PART)", + "x-withdrawal-date": "2025-03", + "const": 532 + }, + { + "title": "Cordoba", + "x-country-name": "NICARAGUA", + "x-withdrawal-date": "1990-10", + "const": 558 + }, + { + "title": "Sol", + "x-country-name": "PERU", + "x-withdrawal-date": "1986-02", + "const": 604 + }, + { + "title": "Zloty", + "x-country-name": "POLAND", + "x-withdrawal-date": "1997-01", + "const": 616 + }, + { + "title": "Portuguese Escudo", + "x-country-name": "PORTUGAL", + "x-withdrawal-date": "2002-03", + "const": 620 + }, + { + "title": "Guinea-Bissau Peso", + "x-country-name": "GUINEA-BISSAU", + "x-withdrawal-date": "1997-05", + "const": 624 + }, + { + "title": "Timor Escudo", + "x-country-name": "TIMOR-LESTE", + "x-withdrawal-date": "2002-11", + "const": 626 + }, + { + "title": "Old Leu", + "x-country-name": "ROMANIA", + "x-withdrawal-date": "2005-06", + "const": 642 + }, + { + "title": "Dobra", + "x-country-name": "SAO TOME AND PRINCIPE", + "x-withdrawal-date": "2017-12", + "const": 678 + }, + { + "title": "Leone", + "x-country-name": "SIERRA LEONE", + "x-withdrawal-date": "2023-12", + "const": 694 + }, + { + "title": "Slovak Koruna", + "x-country-name": "SLOVAKIA", + "x-withdrawal-date": "2009-01", + "const": 703 + }, + { + "title": "Old Dong", + "x-country-name": "VIETNAM", + "x-withdrawal-date": "1989-1990", + "const": 704 + }, + { + "title": "Tolar", + "x-country-name": "SLOVENIA", + "x-withdrawal-date": "2007-01", + "const": 705 + }, + { + "title": "Zimbabwe Dollar", + "x-country-name": "ZIMBABWE", + "x-withdrawal-date": "2008-08", + "const": 716 + }, + { + "title": "Yemeni Dinar", + "x-country-name": "YEMEN, DEMOCRATIC", + "x-withdrawal-date": "1991-09", + "const": 720 + }, + { + "title": "Spanish Peseta", + "x-country-name": "SPAIN", + "x-withdrawal-date": "2002-03", + "const": 724 + }, + { + "title": "Sudanese Pound", + "x-country-name": "SUDAN", + "x-withdrawal-date": "1998-06", + "const": 736 + }, + { + "title": "Surinam Guilder", + "x-country-name": "SURINAME", + "x-withdrawal-date": "2003-12", + "const": 740 + }, + { + "title": "Lilangeni", + "x-country-name": "SWAZILAND", + "x-withdrawal-date": "2018-08", + "const": 748 + }, + { + "title": "Tajik Ruble", + "x-country-name": "TAJIKISTAN", + "x-withdrawal-date": "2001-04", + "const": 762 + }, + { + "title": "Old Turkish Lira", + "x-country-name": "TURKEY", + "x-withdrawal-date": "2005-12", + "const": 792 + }, + { + "title": "Turkmenistan Manat", + "x-country-name": "TURKMENISTAN", + "x-withdrawal-date": "2009-01", + "const": 795 + }, + { + "title": "Old Shilling", + "x-country-name": "UGANDA", + "x-withdrawal-date": "1989 to 1990", + "const": 800 + }, + { + "title": "Karbovanet", + "x-country-name": "UKRAINE", + "x-withdrawal-date": "1996-09", + "const": 804 + }, + { + "title": "Russian Ruble", + "x-country-name": "UZBEKISTAN", + "x-withdrawal-date": "1994-07", + "const": 810 + }, + { + "title": "Uruguayan Peso", + "x-country-name": "URUGUAY", + "x-withdrawal-date": "1993-03", + "const": 858 + }, + { + "title": "Bolivar", + "x-country-name": "VENEZUELA", + "x-withdrawal-date": "2008-01", + "const": 862 + }, + { + "title": "Yugoslavian Dinar", + "x-country-name": "YUGOSLAVIA", + "x-withdrawal-date": "1995-11", + "const": 890 + }, + { + "title": "New Dinar", + "x-country-name": "YUGOSLAVIA", + "x-withdrawal-date": "2003-07", + "const": 891 + }, + { + "title": "Zambian Kwacha", + "x-country-name": "ZAMBIA", + "x-withdrawal-date": "2012-12", + "const": 894 + }, + { + "title": "Peso Convertible", + "x-country-name": "CUBA", + "x-withdrawal-date": "2021-06", + "const": 931 + }, + { + "title": "Zimbabwe Dollar", + "x-country-name": "ZIMBABWE", + "x-withdrawal-date": "2024-09", + "const": 932 + }, + { + "title": "Zimbabwe Dollar", + "x-country-name": "ZIMBABWE", + "x-withdrawal-date": "2009-06", + "const": 935 + }, + { + "title": "Bolívar", + "x-country-name": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "x-withdrawal-date": "2018-08", + "const": 937 + }, + { + "title": "Sudanese Pound", + "x-country-name": "SOUTH SUDAN", + "x-withdrawal-date": "2012-09", + "const": 938 + }, + { + "title": "Ghana Cedi", + "x-country-name": "GHANA", + "x-withdrawal-date": "2007-06", + "const": 939 + }, + { + "title": "Zimbabwe Dollar (new)", + "x-country-name": "ZIMBABWE", + "x-withdrawal-date": "2006-09", + "const": 942 + }, + { + "title": "Azerbaijan Manat", + "x-country-name": "AZERBAIJAN", + "x-withdrawal-date": "2005-10", + "const": 945 + }, + { + "title": "New Romanian Leu", + "x-country-name": "ROMANIA", + "x-withdrawal-date": "2015-06", + "const": 946 + }, + { + "title": "WIR Franc (for electronic)", + "x-country-name": "SWITZERLAND", + "x-withdrawal-date": "2004-11", + "const": 948 + }, + { + "title": "New Turkish Lira", + "x-country-name": "TURKEY", + "x-withdrawal-date": "2009-01", + "const": 949 + }, + { + "title": "European Currency Unit (E.C.U)", + "x-country-name": "EUROPEAN MONETARY CO-OPERATION FUND (EMCF)", + "x-withdrawal-date": "1999-01", + "const": 954 + }, + { + "title": "Belarusian Ruble", + "x-country-name": "BELARUS", + "x-withdrawal-date": "2017-01", + "const": 974 + }, + { + "title": "Euro", + "x-country-name": "SERBIA AND MONTENEGRO", + "x-withdrawal-date": "2006-10", + "const": 978 + }, + { + "title": "Kwanza Reajustado", + "x-country-name": "ANGOLA", + "x-withdrawal-date": "2000-02", + "const": 982 + }, + { + "title": "Unidad de Valor Constante (UVC)", + "x-country-name": "ECUADOR", + "x-withdrawal-date": "2000-09", + "const": 983 + }, + { + "title": "Cruzeiro Real", + "x-country-name": "BRAZIL", + "x-withdrawal-date": "1994-07", + "const": 987 + }, + { + "title": "Luxembourg Financial Franc", + "x-country-name": "LUXEMBOURG", + "x-withdrawal-date": "1990-03", + "const": 988 + }, + { + "title": "Luxembourg Convertible Franc", + "x-country-name": "LUXEMBOURG", + "x-withdrawal-date": "1990-03", + "const": 989 + }, + { + "title": "Financial Rand", + "x-country-name": "SOUTH AFRICA", + "x-withdrawal-date": "1995-03", + "const": 991 + }, + { + "title": "Financial Franc", + "x-country-name": "BELGIUM", + "x-withdrawal-date": "1990-03", + "const": 992 + }, + { + "title": "Convertible Franc", + "x-country-name": "BELGIUM", + "x-withdrawal-date": "1990-03", + "const": 993 + }, + { + "title": "\"A\" Account (convertible Peseta Account)", + "x-country-name": "SPAIN", + "x-withdrawal-date": "1994-12", + "const": 995 + }, + { + "title": "Spanish Peseta", + "x-country-name": "SPAIN", + "x-withdrawal-date": "1978 to 1981", + "const": 996 + }, + { + "title": "US Dollar (Same day)", + "x-country-name": "UNITED STATES", + "x-withdrawal-date": "2014-03", + "const": 998 + } + ] +} diff --git a/schemas/iso/currency/numeric-code-additional.json b/schemas/iso/currency/numeric-code-additional.json new file mode 100644 index 00000000..df9ef3c1 --- /dev/null +++ b/schemas/iso/currency/numeric-code-additional.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Additional Currency Code", + "description": "User-assigned numeric codes in the range 900-998", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ 900, 950, 998 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "type": "integer", + "maximum": 998, + "minimum": 900 +} diff --git a/schemas/iso/currency/numeric-code.json b/schemas/iso/currency/numeric-code.json new file mode 100644 index 00000000..5923f199 --- /dev/null +++ b/schemas/iso/currency/numeric-code.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Currency, Fund, and Precious Metal Code", + "description": "A three-digit numeric code including currencies, funds, and precious metals (2025-05-12)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ 8, 12, 32, 36, 940, 959 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "$ref": "numeric-currency.json" + }, + { + "$ref": "numeric-fund.json" + }, + { + "$ref": "numeric-precious-metal.json" + } + ] +} diff --git a/schemas/iso/currency/numeric-currency.json b/schemas/iso/currency/numeric-currency.json new file mode 100644 index 00000000..ca846ffb --- /dev/null +++ b/schemas/iso/currency/numeric-currency.json @@ -0,0 +1,1000 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Currency Code", + "description": "A three-digit numeric currency code, excluding funds and precious metals (2025-05-12)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ 8, 12, 32, 36 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "title": "Lek", + "x-country-name": "ALBANIA", + "x-minor-unit": 2, + "const": 8 + }, + { + "title": "Algerian Dinar", + "x-country-name": "ALGERIA", + "x-minor-unit": 2, + "const": 12 + }, + { + "title": "Argentine Peso", + "x-country-name": "ARGENTINA", + "x-minor-unit": 2, + "const": 32 + }, + { + "title": "Australian Dollar", + "x-country-name": "TUVALU", + "x-minor-unit": 2, + "const": 36 + }, + { + "title": "Bahamian Dollar", + "x-country-name": "BAHAMAS (THE)", + "x-minor-unit": 2, + "const": 44 + }, + { + "title": "Bahraini Dinar", + "x-country-name": "BAHRAIN", + "x-minor-unit": 3, + "const": 48 + }, + { + "title": "Taka", + "x-country-name": "BANGLADESH", + "x-minor-unit": 2, + "const": 50 + }, + { + "title": "Armenian Dram", + "x-country-name": "ARMENIA", + "x-minor-unit": 2, + "const": 51 + }, + { + "title": "Barbados Dollar", + "x-country-name": "BARBADOS", + "x-minor-unit": 2, + "const": 52 + }, + { + "title": "Bermudian Dollar", + "x-country-name": "BERMUDA", + "x-minor-unit": 2, + "const": 60 + }, + { + "title": "Ngultrum", + "x-country-name": "BHUTAN", + "x-minor-unit": 2, + "const": 64 + }, + { + "title": "Boliviano", + "x-country-name": "BOLIVIA (PLURINATIONAL STATE OF)", + "x-minor-unit": 2, + "const": 68 + }, + { + "title": "Pula", + "x-country-name": "BOTSWANA", + "x-minor-unit": 2, + "const": 72 + }, + { + "title": "Belize Dollar", + "x-country-name": "BELIZE", + "x-minor-unit": 2, + "const": 84 + }, + { + "title": "Solomon Islands Dollar", + "x-country-name": "SOLOMON ISLANDS", + "x-minor-unit": 2, + "const": 90 + }, + { + "title": "Brunei Dollar", + "x-country-name": "BRUNEI DARUSSALAM", + "x-minor-unit": 2, + "const": 96 + }, + { + "title": "Kyat", + "x-country-name": "MYANMAR", + "x-minor-unit": 2, + "const": 104 + }, + { + "title": "Burundi Franc", + "x-country-name": "BURUNDI", + "x-minor-unit": 0, + "const": 108 + }, + { + "title": "Riel", + "x-country-name": "CAMBODIA", + "x-minor-unit": 2, + "const": 116 + }, + { + "title": "Canadian Dollar", + "x-country-name": "CANADA", + "x-minor-unit": 2, + "const": 124 + }, + { + "title": "Cabo Verde Escudo", + "x-country-name": "CABO VERDE", + "x-minor-unit": 2, + "const": 132 + }, + { + "title": "Cayman Islands Dollar", + "x-country-name": "CAYMAN ISLANDS (THE)", + "x-minor-unit": 2, + "const": 136 + }, + { + "title": "Sri Lanka Rupee", + "x-country-name": "SRI LANKA", + "x-minor-unit": 2, + "const": 144 + }, + { + "title": "Chilean Peso", + "x-country-name": "CHILE", + "x-minor-unit": 0, + "const": 152 + }, + { + "title": "Yuan Renminbi", + "x-country-name": "CHINA", + "x-minor-unit": 2, + "const": 156 + }, + { + "title": "Colombian Peso", + "x-country-name": "COLOMBIA", + "x-minor-unit": 2, + "const": 170 + }, + { + "title": "Comorian Franc", + "x-country-name": "COMOROS (THE)", + "x-minor-unit": 0, + "const": 174 + }, + { + "title": "Costa Rican Colon", + "x-country-name": "COSTA RICA", + "x-minor-unit": 2, + "const": 188 + }, + { + "title": "Cuban Peso", + "x-country-name": "CUBA", + "x-minor-unit": 2, + "const": 192 + }, + { + "title": "Czech Koruna", + "x-country-name": "CZECHIA", + "x-minor-unit": 2, + "const": 203 + }, + { + "title": "Danish Krone", + "x-country-name": "GREENLAND", + "x-minor-unit": 2, + "const": 208 + }, + { + "title": "Dominican Peso", + "x-country-name": "DOMINICAN REPUBLIC (THE)", + "x-minor-unit": 2, + "const": 214 + }, + { + "title": "El Salvador Colon", + "x-country-name": "EL SALVADOR", + "x-minor-unit": 2, + "const": 222 + }, + { + "title": "Ethiopian Birr", + "x-country-name": "ETHIOPIA", + "x-minor-unit": 2, + "const": 230 + }, + { + "title": "Nakfa", + "x-country-name": "ERITREA", + "x-minor-unit": 2, + "const": 232 + }, + { + "title": "Falkland Islands Pound", + "x-country-name": "FALKLAND ISLANDS (THE) [MALVINAS]", + "x-minor-unit": 2, + "const": 238 + }, + { + "title": "Fiji Dollar", + "x-country-name": "FIJI", + "x-minor-unit": 2, + "const": 242 + }, + { + "title": "Djibouti Franc", + "x-country-name": "DJIBOUTI", + "x-minor-unit": 0, + "const": 262 + }, + { + "title": "Dalasi", + "x-country-name": "GAMBIA (THE)", + "x-minor-unit": 2, + "const": 270 + }, + { + "title": "Gibraltar Pound", + "x-country-name": "GIBRALTAR", + "x-minor-unit": 2, + "const": 292 + }, + { + "title": "Quetzal", + "x-country-name": "GUATEMALA", + "x-minor-unit": 2, + "const": 320 + }, + { + "title": "Guinean Franc", + "x-country-name": "GUINEA", + "x-minor-unit": 0, + "const": 324 + }, + { + "title": "Guyana Dollar", + "x-country-name": "GUYANA", + "x-minor-unit": 2, + "const": 328 + }, + { + "title": "Gourde", + "x-country-name": "HAITI", + "x-minor-unit": 2, + "const": 332 + }, + { + "title": "Lempira", + "x-country-name": "HONDURAS", + "x-minor-unit": 2, + "const": 340 + }, + { + "title": "Hong Kong Dollar", + "x-country-name": "HONG KONG", + "x-minor-unit": 2, + "const": 344 + }, + { + "title": "Forint", + "x-country-name": "HUNGARY", + "x-minor-unit": 2, + "const": 348 + }, + { + "title": "Iceland Krona", + "x-country-name": "ICELAND", + "x-minor-unit": 0, + "const": 352 + }, + { + "title": "Indian Rupee", + "x-country-name": "INDIA", + "x-minor-unit": 2, + "const": 356 + }, + { + "title": "Rupiah", + "x-country-name": "INDONESIA", + "x-minor-unit": 2, + "const": 360 + }, + { + "title": "Iranian Rial", + "x-country-name": "IRAN (ISLAMIC REPUBLIC OF)", + "x-minor-unit": 2, + "const": 364 + }, + { + "title": "Iraqi Dinar", + "x-country-name": "IRAQ", + "x-minor-unit": 3, + "const": 368 + }, + { + "title": "New Israeli Sheqel", + "x-country-name": "ISRAEL", + "x-minor-unit": 2, + "const": 376 + }, + { + "title": "Jamaican Dollar", + "x-country-name": "JAMAICA", + "x-minor-unit": 2, + "const": 388 + }, + { + "title": "Yen", + "x-country-name": "JAPAN", + "x-minor-unit": 0, + "const": 392 + }, + { + "title": "Arab Accounting Dinar", + "x-country-name": "ARAB MONETARY FUND", + "x-minor-unit": 2, + "const": 396 + }, + { + "title": "Tenge", + "x-country-name": "KAZAKHSTAN", + "x-minor-unit": 2, + "const": 398 + }, + { + "title": "Jordanian Dinar", + "x-country-name": "JORDAN", + "x-minor-unit": 3, + "const": 400 + }, + { + "title": "Kenyan Shilling", + "x-country-name": "KENYA", + "x-minor-unit": 2, + "const": 404 + }, + { + "title": "North Korean Won", + "x-country-name": "KOREA (THE DEMOCRATIC PEOPLE’S REPUBLIC OF)", + "x-minor-unit": 2, + "const": 408 + }, + { + "title": "Won", + "x-country-name": "KOREA (THE REPUBLIC OF)", + "x-minor-unit": 0, + "const": 410 + }, + { + "title": "Kuwaiti Dinar", + "x-country-name": "KUWAIT", + "x-minor-unit": 3, + "const": 414 + }, + { + "title": "Som", + "x-country-name": "KYRGYZSTAN", + "x-minor-unit": 2, + "const": 417 + }, + { + "title": "Lao Kip", + "x-country-name": "LAO PEOPLE’S DEMOCRATIC REPUBLIC (THE)", + "x-minor-unit": 2, + "const": 418 + }, + { + "title": "Lebanese Pound", + "x-country-name": "LEBANON", + "x-minor-unit": 2, + "const": 422 + }, + { + "title": "Loti", + "x-country-name": "LESOTHO", + "x-minor-unit": 2, + "const": 426 + }, + { + "title": "Liberian Dollar", + "x-country-name": "LIBERIA", + "x-minor-unit": 2, + "const": 430 + }, + { + "title": "Libyan Dinar", + "x-country-name": "LIBYA", + "x-minor-unit": 3, + "const": 434 + }, + { + "title": "Pataca", + "x-country-name": "MACAO", + "x-minor-unit": 2, + "const": 446 + }, + { + "title": "Malawi Kwacha", + "x-country-name": "MALAWI", + "x-minor-unit": 2, + "const": 454 + }, + { + "title": "Malaysian Ringgit", + "x-country-name": "MALAYSIA", + "x-minor-unit": 2, + "const": 458 + }, + { + "title": "Rufiyaa", + "x-country-name": "MALDIVES", + "x-minor-unit": 2, + "const": 462 + }, + { + "title": "Mauritius Rupee", + "x-country-name": "MAURITIUS", + "x-minor-unit": 2, + "const": 480 + }, + { + "title": "Mexican Peso", + "x-country-name": "MEXICO", + "x-minor-unit": 2, + "const": 484 + }, + { + "title": "Tugrik", + "x-country-name": "MONGOLIA", + "x-minor-unit": 2, + "const": 496 + }, + { + "title": "Moldovan Leu", + "x-country-name": "MOLDOVA (THE REPUBLIC OF)", + "x-minor-unit": 2, + "const": 498 + }, + { + "title": "Moroccan Dirham", + "x-country-name": "WESTERN SAHARA", + "x-minor-unit": 2, + "const": 504 + }, + { + "title": "Rial Omani", + "x-country-name": "OMAN", + "x-minor-unit": 3, + "const": 512 + }, + { + "title": "Namibia Dollar", + "x-country-name": "NAMIBIA", + "x-minor-unit": 2, + "const": 516 + }, + { + "title": "Nepalese Rupee", + "x-country-name": "NEPAL", + "x-minor-unit": 2, + "const": 524 + }, + { + "title": "Caribbean Guilder", + "x-country-name": "SINT MAARTEN (DUTCH PART)", + "x-minor-unit": 2, + "const": 532 + }, + { + "title": "Aruban Florin", + "x-country-name": "ARUBA", + "x-minor-unit": 2, + "const": 533 + }, + { + "title": "Vatu", + "x-country-name": "VANUATU", + "x-minor-unit": 0, + "const": 548 + }, + { + "title": "New Zealand Dollar", + "x-country-name": "TOKELAU", + "x-minor-unit": 2, + "const": 554 + }, + { + "title": "Cordoba Oro", + "x-country-name": "NICARAGUA", + "x-minor-unit": 2, + "const": 558 + }, + { + "title": "Naira", + "x-country-name": "NIGERIA", + "x-minor-unit": 2, + "const": 566 + }, + { + "title": "Norwegian Krone", + "x-country-name": "SVALBARD AND JAN MAYEN", + "x-minor-unit": 2, + "const": 578 + }, + { + "title": "Pakistan Rupee", + "x-country-name": "PAKISTAN", + "x-minor-unit": 2, + "const": 586 + }, + { + "title": "Balboa", + "x-country-name": "PANAMA", + "x-minor-unit": 2, + "const": 590 + }, + { + "title": "Kina", + "x-country-name": "PAPUA NEW GUINEA", + "x-minor-unit": 2, + "const": 598 + }, + { + "title": "Guarani", + "x-country-name": "PARAGUAY", + "x-minor-unit": 0, + "const": 600 + }, + { + "title": "Sol", + "x-country-name": "PERU", + "x-minor-unit": 2, + "const": 604 + }, + { + "title": "Philippine Peso", + "x-country-name": "PHILIPPINES (THE)", + "x-minor-unit": 2, + "const": 608 + }, + { + "title": "Qatari Rial", + "x-country-name": "QATAR", + "x-minor-unit": 2, + "const": 634 + }, + { + "title": "Russian Ruble", + "x-country-name": "RUSSIAN FEDERATION (THE)", + "x-minor-unit": 2, + "const": 643 + }, + { + "title": "Rwanda Franc", + "x-country-name": "RWANDA", + "x-minor-unit": 0, + "const": 646 + }, + { + "title": "Saint Helena Pound", + "x-country-name": "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA", + "x-minor-unit": 2, + "const": 654 + }, + { + "title": "Saudi Riyal", + "x-country-name": "SAUDI ARABIA", + "x-minor-unit": 2, + "const": 682 + }, + { + "title": "Seychelles Rupee", + "x-country-name": "SEYCHELLES", + "x-minor-unit": 2, + "const": 690 + }, + { + "title": "Singapore Dollar", + "x-country-name": "SINGAPORE", + "x-minor-unit": 2, + "const": 702 + }, + { + "title": "Dong", + "x-country-name": "VIET NAM", + "x-minor-unit": 0, + "const": 704 + }, + { + "title": "Somali Shilling", + "x-country-name": "SOMALIA", + "x-minor-unit": 2, + "const": 706 + }, + { + "title": "Rand", + "x-country-name": "SOUTH AFRICA", + "x-minor-unit": 2, + "const": 710 + }, + { + "title": "South Sudanese Pound", + "x-country-name": "SOUTH SUDAN", + "x-minor-unit": 2, + "const": 728 + }, + { + "title": "Lilangeni", + "x-country-name": "ESWATINI", + "x-minor-unit": 2, + "const": 748 + }, + { + "title": "Swedish Krona", + "x-country-name": "SWEDEN", + "x-minor-unit": 2, + "const": 752 + }, + { + "title": "Swiss Franc", + "x-country-name": "SWITZERLAND", + "x-minor-unit": 2, + "const": 756 + }, + { + "title": "Syrian Pound", + "x-country-name": "SYRIAN ARAB REPUBLIC", + "x-minor-unit": 2, + "const": 760 + }, + { + "title": "Baht", + "x-country-name": "THAILAND", + "x-minor-unit": 2, + "const": 764 + }, + { + "title": "Pa’anga", + "x-country-name": "TONGA", + "x-minor-unit": 2, + "const": 776 + }, + { + "title": "Trinidad and Tobago Dollar", + "x-country-name": "TRINIDAD AND TOBAGO", + "x-minor-unit": 2, + "const": 780 + }, + { + "title": "UAE Dirham", + "x-country-name": "UNITED ARAB EMIRATES (THE)", + "x-minor-unit": 2, + "const": 784 + }, + { + "title": "Tunisian Dinar", + "x-country-name": "TUNISIA", + "x-minor-unit": 3, + "const": 788 + }, + { + "title": "Uganda Shilling", + "x-country-name": "UGANDA", + "x-minor-unit": 0, + "const": 800 + }, + { + "title": "Denar", + "x-country-name": "NORTH MACEDONIA", + "x-minor-unit": 2, + "const": 807 + }, + { + "title": "Egyptian Pound", + "x-country-name": "EGYPT", + "x-minor-unit": 2, + "const": 818 + }, + { + "title": "Pound Sterling", + "x-country-name": "UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND (THE)", + "x-minor-unit": 2, + "const": 826 + }, + { + "title": "Tanzanian Shilling", + "x-country-name": "TANZANIA, UNITED REPUBLIC OF", + "x-minor-unit": 2, + "const": 834 + }, + { + "title": "US Dollar", + "x-country-name": "VIRGIN ISLANDS (U.S.)", + "x-minor-unit": 2, + "const": 840 + }, + { + "title": "Peso Uruguayo", + "x-country-name": "URUGUAY", + "x-minor-unit": 2, + "const": 858 + }, + { + "title": "Uzbekistan Sum", + "x-country-name": "UZBEKISTAN", + "x-minor-unit": 2, + "const": 860 + }, + { + "title": "Tala", + "x-country-name": "SAMOA", + "x-minor-unit": 2, + "const": 882 + }, + { + "title": "Yemeni Rial", + "x-country-name": "YEMEN", + "x-minor-unit": 2, + "const": 886 + }, + { + "title": "New Taiwan Dollar", + "x-country-name": "TAIWAN (PROVINCE OF CHINA)", + "x-minor-unit": 2, + "const": 901 + }, + { + "title": "Zimbabwe Gold", + "x-country-name": "ZIMBABWE", + "x-minor-unit": 2, + "const": 924 + }, + { + "title": "Leone", + "x-country-name": "SIERRA LEONE", + "x-minor-unit": 2, + "const": 925 + }, + { + "title": "Bolívar Soberano", + "x-country-name": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "x-minor-unit": 2, + "const": 926 + }, + { + "title": "Unidad Previsional", + "x-country-name": "URUGUAY", + "x-minor-unit": 4, + "const": 927 + }, + { + "title": "Bolívar Soberano", + "x-country-name": "VENEZUELA (BOLIVARIAN REPUBLIC OF)", + "x-minor-unit": 2, + "const": 928 + }, + { + "title": "Ouguiya", + "x-country-name": "MAURITANIA", + "x-minor-unit": 2, + "const": 929 + }, + { + "title": "Dobra", + "x-country-name": "SAO TOME AND PRINCIPE", + "x-minor-unit": 2, + "const": 930 + }, + { + "title": "Belarusian Ruble", + "x-country-name": "BELARUS", + "x-minor-unit": 2, + "const": 933 + }, + { + "title": "Turkmenistan New Manat", + "x-country-name": "TURKMENISTAN", + "x-minor-unit": 2, + "const": 934 + }, + { + "title": "Ghana Cedi", + "x-country-name": "GHANA", + "x-minor-unit": 2, + "const": 936 + }, + { + "title": "Sudanese Pound", + "x-country-name": "SUDAN (THE)", + "x-minor-unit": 2, + "const": 938 + }, + { + "title": "Serbian Dinar", + "x-country-name": "SERBIA", + "x-minor-unit": 2, + "const": 941 + }, + { + "title": "Mozambique Metical", + "x-country-name": "MOZAMBIQUE", + "x-minor-unit": 2, + "const": 943 + }, + { + "title": "Azerbaijan Manat", + "x-country-name": "AZERBAIJAN", + "x-minor-unit": 2, + "const": 944 + }, + { + "title": "Romanian Leu", + "x-country-name": "ROMANIA", + "x-minor-unit": 2, + "const": 946 + }, + { + "title": "Turkish Lira", + "x-country-name": "TÜRKİYE", + "x-minor-unit": 2, + "const": 949 + }, + { + "title": "CFA Franc BEAC", + "x-country-name": "GABON", + "x-minor-unit": 0, + "const": 950 + }, + { + "title": "East Caribbean Dollar", + "x-country-name": "SAINT VINCENT AND THE GRENADINES", + "x-minor-unit": 2, + "const": 951 + }, + { + "title": "CFA Franc BCEAO", + "x-country-name": "TOGO", + "x-minor-unit": 0, + "const": 952 + }, + { + "title": "CFP Franc", + "x-country-name": "WALLIS AND FUTUNA", + "x-minor-unit": 0, + "const": 953 + }, + { + "title": "Bond Markets Unit European Composite Unit (EURCO)", + "x-country-name": "ZZ01_Bond Markets Unit European_EURCO", + "x-minor-unit": null, + "const": 955 + }, + { + "title": "Bond Markets Unit European Monetary Unit (E.M.U.-6)", + "x-country-name": "ZZ02_Bond Markets Unit European_EMU-6", + "x-minor-unit": null, + "const": 956 + }, + { + "title": "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)", + "x-country-name": "ZZ03_Bond Markets Unit European_EUA-9", + "x-minor-unit": null, + "const": 957 + }, + { + "title": "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)", + "x-country-name": "ZZ04_Bond Markets Unit European_EUA-17", + "x-minor-unit": null, + "const": 958 + }, + { + "title": "SDR (Special Drawing Right)", + "x-country-name": "INTERNATIONAL MONETARY FUND (IMF)", + "x-minor-unit": null, + "const": 960 + }, + { + "title": "ADB Unit of Account", + "x-country-name": "MEMBER COUNTRIES OF THE AFRICAN DEVELOPMENT BANK GROUP", + "x-minor-unit": null, + "const": 965 + }, + { + "title": "Zambian Kwacha", + "x-country-name": "ZAMBIA", + "x-minor-unit": 2, + "const": 967 + }, + { + "title": "Surinam Dollar", + "x-country-name": "SURINAME", + "x-minor-unit": 2, + "const": 968 + }, + { + "title": "Malagasy Ariary", + "x-country-name": "MADAGASCAR", + "x-minor-unit": 2, + "const": 969 + }, + { + "title": "Afghani", + "x-country-name": "AFGHANISTAN", + "x-minor-unit": 2, + "const": 971 + }, + { + "title": "Somoni", + "x-country-name": "TAJIKISTAN", + "x-minor-unit": 2, + "const": 972 + }, + { + "title": "Kwanza", + "x-country-name": "ANGOLA", + "x-minor-unit": 2, + "const": 973 + }, + { + "title": "Bulgarian Lev", + "x-country-name": "BULGARIA", + "x-minor-unit": 2, + "const": 975 + }, + { + "title": "Congolese Franc", + "x-country-name": "CONGO (THE DEMOCRATIC REPUBLIC OF THE)", + "x-minor-unit": 2, + "const": 976 + }, + { + "title": "Convertible Mark", + "x-country-name": "BOSNIA AND HERZEGOVINA", + "x-minor-unit": 2, + "const": 977 + }, + { + "title": "Euro", + "x-country-name": "SPAIN", + "x-minor-unit": 2, + "const": 978 + }, + { + "title": "Hryvnia", + "x-country-name": "UKRAINE", + "x-minor-unit": 2, + "const": 980 + }, + { + "title": "Lari", + "x-country-name": "GEORGIA", + "x-minor-unit": 2, + "const": 981 + }, + { + "title": "Zloty", + "x-country-name": "POLAND", + "x-minor-unit": 2, + "const": 985 + }, + { + "title": "Brazilian Real", + "x-country-name": "BRAZIL", + "x-minor-unit": 2, + "const": 986 + }, + { + "title": "Sucre", + "x-country-name": "SISTEMA UNITARIO DE COMPENSACION REGIONAL DE PAGOS \"SUCRE\"", + "x-minor-unit": null, + "const": 994 + } + ] +} diff --git a/schemas/iso/currency/numeric-fund.json b/schemas/iso/currency/numeric-fund.json new file mode 100644 index 00000000..402ddfb7 --- /dev/null +++ b/schemas/iso/currency/numeric-fund.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Fund Code", + "description": "A three-digit numeric fund code (2025-05-12)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ 940, 947, 948, 970 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "title": "Uruguay Peso en Unidades Indexadas (UI)", + "x-country-name": "URUGUAY", + "x-minor-unit": 0, + "const": 940 + }, + { + "title": "WIR Euro", + "x-country-name": "SWITZERLAND", + "x-minor-unit": 2, + "const": 947 + }, + { + "title": "WIR Franc", + "x-country-name": "SWITZERLAND", + "x-minor-unit": 2, + "const": 948 + }, + { + "title": "Unidad de Valor Real", + "x-country-name": "COLOMBIA", + "x-minor-unit": 2, + "const": 970 + }, + { + "title": "Mexican Unidad de Inversion (UDI)", + "x-country-name": "MEXICO", + "x-minor-unit": 2, + "const": 979 + }, + { + "title": "Mvdol", + "x-country-name": "BOLIVIA (PLURINATIONAL STATE OF)", + "x-minor-unit": 2, + "const": 984 + }, + { + "title": "Unidad de Fomento", + "x-country-name": "CHILE", + "x-minor-unit": 4, + "const": 990 + }, + { + "title": "US Dollar (Next day)", + "x-country-name": "UNITED STATES OF AMERICA (THE)", + "x-minor-unit": 2, + "const": 997 + } + ] +} diff --git a/schemas/iso/currency/numeric-precious-metal.json b/schemas/iso/currency/numeric-precious-metal.json new file mode 100644 index 00000000..076b65fa --- /dev/null +++ b/schemas/iso/currency/numeric-precious-metal.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Precious Metal Code", + "description": "A three-digit numeric code for precious metals (2025-05-12)", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ 959, 961, 962, 964 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "title": "Gold", + "const": 959 + }, + { + "title": "Silver", + "const": 961 + }, + { + "title": "Platinum", + "const": 962 + }, + { + "title": "Palladium", + "const": 964 + } + ] +} diff --git a/schemas/iso/currency/numeric-test.json b/schemas/iso/currency/numeric-test.json new file mode 100644 index 00000000..8d82f37f --- /dev/null +++ b/schemas/iso/currency/numeric-test.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Test Currency Code", + "description": "The numeric code specifically reserved for testing purposes", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ 963 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "const": 963 +} diff --git a/schemas/iso/currency/numeric-unknown.json b/schemas/iso/currency/numeric-unknown.json new file mode 100644 index 00000000..0b8ad362 --- /dev/null +++ b/schemas/iso/currency/numeric-unknown.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Unknown Currency Code", + "description": "The numeric code for transactions where no currency is involved", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [ 999 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "const": 999 +} diff --git a/scripts/fetch-xml.py b/scripts/fetch-xml.py new file mode 100644 index 00000000..31c43087 --- /dev/null +++ b/scripts/fetch-xml.py @@ -0,0 +1,60 @@ +import sys +import urllib.request +import xml.etree.ElementTree as ET +import json + + +def xml_to_dict(element): + result = {} + + if element.attrib: + result['@attributes'] = element.attrib + + children = list(element) + if children: + child_dict = {} + for child in children: + child_data = xml_to_dict(child) + if child.tag in child_dict: + if not isinstance(child_dict[child.tag], list): + child_dict[child.tag] = [child_dict[child.tag]] + child_dict[child.tag].append(child_data) + else: + child_dict[child.tag] = child_data + result.update(child_dict) + + if element.text and element.text.strip(): + if result: + result['@text'] = element.text.strip() + else: + return element.text.strip() + + return result if result else None + + +def main(): + if len(sys.argv) != 2: + print("Usage: fetch-xml ", file=sys.stderr) + sys.exit(1) + + url = sys.argv[1] + + try: + with urllib.request.urlopen(url) as response: + xml_data = response.read() + + root = ET.fromstring(xml_data) + + result = { + root.tag: xml_to_dict(root) + } + + print(json.dumps(result, indent=2)) + + except Exception as error: + print(f"Error: {error}", file=sys.stderr) + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/scripts/generate-iso-currency.py b/scripts/generate-iso-currency.py new file mode 100755 index 00000000..29528357 --- /dev/null +++ b/scripts/generate-iso-currency.py @@ -0,0 +1,383 @@ +#!/usr/bin/env python3 + +import json +import os +import sys + + +def is_fund(entry): + if "CcyNm" not in entry: + return False + currency_name = entry["CcyNm"] + if isinstance(currency_name, dict): + attributes = currency_name.get("@attributes", {}) + return attributes.get("IsFund") == "true" + return False + + +def get_currency_name(entry): + currency_name = entry.get("CcyNm", "") + if isinstance(currency_name, dict): + return currency_name.get("@text", "") + return currency_name + + +def get_country_name(entry): + return entry.get("CtryNm", "") + + +def get_minor_units(entry): + minor_units = entry.get("CcyMnrUnts", "") + if minor_units == "N.A.": + return None + try: + return int(minor_units) + except (ValueError, TypeError): + return None + + +def get_withdrawal_date(entry): + return entry.get("WthdrwlDt", "") + + +def generate_schemas(currency_entries, published_date, output_dir, is_historical=False): + # Historical schemas go in historical/ subdirectory without suffix + if is_historical: + output_dir = os.path.join(output_dir, "historical") + os.makedirs(output_dir, exist_ok=True) + suffix = "" + + currency_alpha_codes = {} + fund_alpha_codes = {} + precious_metal_alpha_codes = {} + currency_numeric_codes = {} + fund_numeric_codes = {} + precious_metal_numeric_codes = {} + special_codes = { + "XXX": "unknown", + "XTS": "test" + } + precious_metals = {"XAU", "XAG", "XPT", "XPD"} + + for entry in currency_entries: + if "Ccy" in entry and "CcyNbr" in entry: + alpha_code = entry["Ccy"] + numeric_code = int(entry["CcyNbr"]) + if isinstance(alpha_code, str) and len(alpha_code) == 3 and alpha_code.isupper(): + if alpha_code in special_codes: + continue + name = get_currency_name(entry) + country_name = get_country_name(entry) + minor_units = get_minor_units(entry) + withdrawal_date = get_withdrawal_date(entry) if is_historical else None + + metadata = { + "name": name, + "country": country_name, + "minor_units": minor_units, + "withdrawal_date": withdrawal_date + } + + if alpha_code in precious_metals: + precious_metal_alpha_codes[alpha_code] = metadata + precious_metal_numeric_codes[numeric_code] = metadata + elif is_fund(entry): + fund_alpha_codes[alpha_code] = metadata + fund_numeric_codes[numeric_code] = metadata + else: + currency_alpha_codes[alpha_code] = metadata + currency_numeric_codes[numeric_code] = metadata + + all_alpha_codes = sorted(set(currency_alpha_codes.keys()) | set(fund_alpha_codes.keys())) + all_numeric_codes = sorted(set(currency_numeric_codes.keys()) | set(fund_numeric_codes.keys())) + + # Build base schema fields + def build_base_schema(): + base = {"$schema": "https://json-schema.org/draft/2020-12/schema"} + if is_historical: + base["deprecated"] = True + return base + + # Build alpha-code schema references only for non-empty categories + alpha_code_refs = [] + if len(currency_alpha_codes) > 0: + alpha_code_refs.append({"$ref": f"alpha-currency{suffix}.json"}) + if len(fund_alpha_codes) > 0: + alpha_code_refs.append({"$ref": f"alpha-fund{suffix}.json"}) + if len(precious_metal_alpha_codes) > 0: + alpha_code_refs.append({"$ref": f"alpha-precious-metal{suffix}.json"}) + + # Build examples from actual codes + alpha_code_examples = [] + alpha_code_examples.extend(sorted(currency_alpha_codes.keys())[:4]) + alpha_code_examples.extend(sorted(fund_alpha_codes.keys())[:2]) + alpha_code_examples.extend(sorted(precious_metal_alpha_codes.keys())[:1]) + + alpha_code_schema = build_base_schema() + alpha_code_schema.update({ + "title": f"ISO 4217 Alphabetic Currency, Fund, and Precious Metal Code{' (Historical)' if is_historical else ''}", + "description": f"A three-letter alphabetic code including {'withdrawn ' if is_historical else ''}currencies, funds, and precious metals ({published_date})", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": alpha_code_examples, + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": alpha_code_refs + }) + + alpha_currency_schema = build_base_schema() + alpha_currency_schema.update({ + "title": f"ISO 4217 Alphabetic Currency Code{' (Historical)' if is_historical else ''}", + "description": f"A three-letter alphabetic {'withdrawn ' if is_historical else ''}currency code, excluding funds and precious metals ({published_date})", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": sorted(currency_alpha_codes.keys())[:4], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "const": code, + "title": metadata["name"], + "x-country-name": metadata["country"], + **({"x-minor-unit": metadata["minor_units"]} if not is_historical else {}), + **({"x-withdrawal-date": metadata["withdrawal_date"]} if is_historical else {}) + } + for code, metadata in sorted(currency_alpha_codes.items()) + ] + }) + + alpha_fund_schema = build_base_schema() + alpha_fund_schema.update({ + "title": f"ISO 4217 Alphabetic Fund Code{' (Historical)' if is_historical else ''}", + "description": f"A three-letter alphabetic {'withdrawn ' if is_historical else ''}fund code ({published_date})", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": sorted(fund_alpha_codes.keys())[:4], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "const": code, + "title": metadata["name"], + "x-country-name": metadata["country"], + **({"x-minor-unit": metadata["minor_units"]} if not is_historical else {}), + **({"x-withdrawal-date": metadata["withdrawal_date"]} if is_historical else {}) + } + for code, metadata in sorted(fund_alpha_codes.items()) + ] + }) + + alpha_precious_metal_schema = build_base_schema() + alpha_precious_metal_schema.update({ + "title": f"ISO 4217 Alphabetic Precious Metal Code{' (Historical)' if is_historical else ''}", + "description": f"A three-letter alphabetic code for {'withdrawn ' if is_historical else ''}precious metals ({published_date})", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": ["XAU", "XAG", "XPT", "XPD"], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "const": code, + "title": metadata["name"], + **({"x-withdrawal-date": metadata["withdrawal_date"]} if is_historical else {}) + } + for code, metadata in sorted(precious_metal_alpha_codes.items()) + ] + }) + + # Build numeric-code schema references only for non-empty categories + numeric_code_refs = [] + if len(currency_numeric_codes) > 0: + numeric_code_refs.append({"$ref": f"numeric-currency{suffix}.json"}) + if len(fund_numeric_codes) > 0: + numeric_code_refs.append({"$ref": f"numeric-fund{suffix}.json"}) + if len(precious_metal_numeric_codes) > 0: + numeric_code_refs.append({"$ref": f"numeric-precious-metal{suffix}.json"}) + + # Build examples from actual numeric codes + numeric_code_examples = [] + numeric_code_examples.extend(sorted(currency_numeric_codes.keys())[:4]) + numeric_code_examples.extend(sorted(fund_numeric_codes.keys())[:1]) + numeric_code_examples.extend(sorted(precious_metal_numeric_codes.keys())[:1]) + + numeric_code_schema = build_base_schema() + numeric_code_schema.update({ + "title": f"ISO 4217 Numeric Currency, Fund, and Precious Metal Code{' (Historical)' if is_historical else ''}", + "description": f"A three-digit numeric code including {'withdrawn ' if is_historical else ''}currencies, funds, and precious metals ({published_date})", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": numeric_code_examples, + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": numeric_code_refs + }) + + numeric_currency_schema = build_base_schema() + numeric_currency_schema.update({ + "title": f"ISO 4217 Numeric Currency Code{' (Historical)' if is_historical else ''}", + "description": f"A three-digit numeric {'withdrawn ' if is_historical else ''}currency code, excluding funds and precious metals ({published_date})", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": sorted(currency_numeric_codes.keys())[:4], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "const": code, + "title": metadata["name"], + "x-country-name": metadata["country"], + **({"x-minor-unit": metadata["minor_units"]} if not is_historical else {}), + **({"x-withdrawal-date": metadata["withdrawal_date"]} if is_historical else {}) + } + for code, metadata in sorted(currency_numeric_codes.items()) + ] + }) + + numeric_fund_schema = build_base_schema() + numeric_fund_schema.update({ + "title": f"ISO 4217 Numeric Fund Code{' (Historical)' if is_historical else ''}", + "description": f"A three-digit numeric {'withdrawn ' if is_historical else ''}fund code ({published_date})", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": sorted(fund_numeric_codes.keys())[:4], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "const": code, + "title": metadata["name"], + "x-country-name": metadata["country"], + **({"x-minor-unit": metadata["minor_units"]} if not is_historical else {}), + **({"x-withdrawal-date": metadata["withdrawal_date"]} if is_historical else {}) + } + for code, metadata in sorted(fund_numeric_codes.items()) + ] + }) + + numeric_precious_metal_schema = build_base_schema() + numeric_precious_metal_schema.update({ + "title": f"ISO 4217 Numeric Precious Metal Code{' (Historical)' if is_historical else ''}", + "description": f"A three-digit numeric code for {'withdrawn ' if is_historical else ''}precious metals ({published_date})", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [959, 961, 962, 964], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "anyOf": [ + { + "const": code, + "title": metadata["name"], + **({"x-withdrawal-date": metadata["withdrawal_date"]} if is_historical else {}) + } + for code, metadata in sorted(precious_metal_numeric_codes.items()) + ] + }) + + os.makedirs(output_dir, exist_ok=True) + + files_to_write = [ + (os.path.join(output_dir, f"alpha-code{suffix}.json"), alpha_code_schema, len(all_alpha_codes), f"alphabetic codes{' (historical)' if is_historical else ''}"), + (os.path.join(output_dir, f"alpha-currency{suffix}.json"), alpha_currency_schema, len(currency_alpha_codes), f"alphabetic currency codes{' (historical)' if is_historical else ''}"), + (os.path.join(output_dir, f"alpha-fund{suffix}.json"), alpha_fund_schema, len(fund_alpha_codes), f"alphabetic fund codes{' (historical)' if is_historical else ''}"), + (os.path.join(output_dir, f"alpha-precious-metal{suffix}.json"), alpha_precious_metal_schema, len(precious_metal_alpha_codes), f"alphabetic precious metal codes{' (historical)' if is_historical else ''}"), + (os.path.join(output_dir, f"numeric-code{suffix}.json"), numeric_code_schema, len(all_numeric_codes), f"numeric codes{' (historical)' if is_historical else ''}"), + (os.path.join(output_dir, f"numeric-currency{suffix}.json"), numeric_currency_schema, len(currency_numeric_codes), f"numeric currency codes{' (historical)' if is_historical else ''}"), + (os.path.join(output_dir, f"numeric-fund{suffix}.json"), numeric_fund_schema, len(fund_numeric_codes), f"numeric fund codes{' (historical)' if is_historical else ''}"), + (os.path.join(output_dir, f"numeric-precious-metal{suffix}.json"), numeric_precious_metal_schema, len(precious_metal_numeric_codes), f"numeric precious metal codes{' (historical)' if is_historical else ''}"), + ] + + # Only write non-historical specific schemas for current data + if not is_historical: + numeric_code_additional_schema = { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Additional Currency Code", + "description": "User-assigned numeric codes in the range 900-998", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [900, 950, 998], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "type": "integer", + "minimum": 900, + "maximum": 998 + } + + alpha_unknown_schema = { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Unknown Currency Code", + "description": "The alphabetic code for transactions where no currency is involved", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": ["XXX"], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "const": "XXX" + } + + numeric_unknown_schema = { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Unknown Currency Code", + "description": "The numeric code for transactions where no currency is involved", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [999], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "const": 999 + } + + alpha_test_schema = { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Alphabetic Test Currency Code", + "description": "The alphabetic code specifically reserved for testing purposes", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": ["XTS"], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "const": "XTS" + } + + numeric_test_schema = { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 4217 Numeric Test Currency Code", + "description": "The numeric code specifically reserved for testing purposes", + "$comment": "https://www.iso.org/iso-4217-currency-codes.html", + "examples": [963], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "const": 963 + } + + files_to_write.extend([ + (os.path.join(output_dir, "alpha-unknown.json"), alpha_unknown_schema, 1, "alphabetic unknown code"), + (os.path.join(output_dir, "alpha-test.json"), alpha_test_schema, 1, "alphabetic test code"), + (os.path.join(output_dir, "numeric-code-additional.json"), numeric_code_additional_schema, 99, "numeric additional codes (900-998)"), + (os.path.join(output_dir, "numeric-unknown.json"), numeric_unknown_schema, 1, "numeric unknown code"), + (os.path.join(output_dir, "numeric-test.json"), numeric_test_schema, 1, "numeric test code"), + ]) + + for file_path, schema, count, description in files_to_write: + # Skip generating schemas with empty anyOf arrays + if "anyOf" in schema and len(schema["anyOf"]) == 0: + print(f"Skipped {file_path} - no {description}") + continue + with open(file_path, "w") as file: + json.dump(schema, file, indent=2) + file.write("\n") + print(f"Generated {file_path} with {count} {description}") + + +def main(): + script_dir = os.path.dirname(os.path.abspath(__file__)) + project_root = os.path.dirname(script_dir) + current_data_file = os.path.join(project_root, "data", "six-group-iso-currency.json") + historical_data_file = os.path.join(project_root, "data", "six-group-iso-currency-historical.json") + output_dir = os.path.join(project_root, "schemas", "iso", "currency") + + # Generate current schemas + if not os.path.exists(current_data_file): + print(f"Error: Data file not found: {current_data_file}", file=sys.stderr) + print("Run 'make fetch' first to download the ISO 4217 data", file=sys.stderr) + sys.exit(1) + + with open(current_data_file, "r") as file: + data = json.load(file) + + published_date = data["ISO_4217"]["@attributes"]["Pblshd"] + currency_entries = data["ISO_4217"]["CcyTbl"]["CcyNtry"] + + generate_schemas(currency_entries, published_date, output_dir, is_historical=False) + + # Generate historical schemas + if os.path.exists(historical_data_file): + with open(historical_data_file, "r") as file: + historical_data = json.load(file) + + historical_published_date = historical_data["ISO_4217"]["@attributes"]["Pblshd"] + historical_currency_entries = historical_data["ISO_4217"]["HstrcCcyTbl"]["HstrcCcyNtry"] + + generate_schemas(historical_currency_entries, historical_published_date, output_dir, is_historical=True) + else: + print(f"Warning: Historical data file not found: {historical_data_file}", file=sys.stderr) + print("Skipping historical schema generation", file=sys.stderr) + + +if __name__ == "__main__": + main() diff --git a/tests/iso/currency/alpha-code.test.json b/tests/iso/currency/alpha-code.test.json new file mode 100644 index 00000000..b8f8adbe --- /dev/null +++ b/tests/iso/currency/alpha-code.test.json @@ -0,0 +1,96 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/alpha-code.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 840, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - US Dollar", + "data": "USD", + "valid": true + }, + { + "description": "Valid - Euro", + "data": "EUR", + "valid": true + }, + { + "description": "Valid - Japanese Yen", + "data": "JPY", + "valid": true + }, + { + "description": "Valid - British Pound", + "data": "GBP", + "valid": true + }, + { + "description": "Valid - Swiss Franc", + "data": "CHF", + "valid": true + }, + { + "description": "Valid - fund code (Mvdol)", + "data": "BOV", + "valid": true + }, + { + "description": "Valid - fund code (Unidad de Fomento)", + "data": "CLF", + "valid": true + }, + { + "description": "Valid - fund code (Mexican UDI)", + "data": "MXV", + "valid": true + }, + { + "description": "Valid - fund code (WIR Euro)", + "data": "CHE", + "valid": true + }, + { + "description": "Invalid - unknown code (XXX)", + "data": "XXX", + "valid": false + }, + { + "description": "Invalid - lowercase", + "data": "usd", + "valid": false + }, + { + "description": "Invalid - mixed case", + "data": "UsD", + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": "XXY", + "valid": false + } + ] +} diff --git a/tests/iso/currency/alpha-currency.test.json b/tests/iso/currency/alpha-currency.test.json new file mode 100644 index 00000000..595bef6c --- /dev/null +++ b/tests/iso/currency/alpha-currency.test.json @@ -0,0 +1,141 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/alpha-currency.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 840, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - US Dollar", + "data": "USD", + "valid": true + }, + { + "description": "Valid - Euro", + "data": "EUR", + "valid": true + }, + { + "description": "Valid - Japanese Yen", + "data": "JPY", + "valid": true + }, + { + "description": "Valid - British Pound", + "data": "GBP", + "valid": true + }, + { + "description": "Valid - Swiss Franc", + "data": "CHF", + "valid": true + }, + { + "description": "Valid - Canadian Dollar", + "data": "CAD", + "valid": true + }, + { + "description": "Valid - Australian Dollar", + "data": "AUD", + "valid": true + }, + { + "description": "Valid - Chinese Yuan", + "data": "CNY", + "valid": true + }, + { + "description": "Valid - Indian Rupee", + "data": "INR", + "valid": true + }, + { + "description": "Invalid - lowercase", + "data": "usd", + "valid": false + }, + { + "description": "Invalid - mixed case", + "data": "UsD", + "valid": false + }, + { + "description": "Invalid - too short", + "data": "US", + "valid": false + }, + { + "description": "Invalid - too long", + "data": "USDD", + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": "XXY", + "valid": false + }, + { + "description": "Invalid - contains numbers", + "data": "US1", + "valid": false + }, + { + "description": "Invalid - contains special characters", + "data": "US$", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - spaces", + "data": "U S", + "valid": false + }, + { + "description": "Invalid - fund code (Mvdol)", + "data": "BOV", + "valid": false + }, + { + "description": "Invalid - fund code (Unidad de Fomento)", + "data": "CLF", + "valid": false + }, + { + "description": "Invalid - fund code (Mexican UDI)", + "data": "MXV", + "valid": false + }, + { + "description": "Invalid - fund code (WIR Euro)", + "data": "CHE", + "valid": false + } + ] +} diff --git a/tests/iso/currency/alpha-fund.test.json b/tests/iso/currency/alpha-fund.test.json new file mode 100644 index 00000000..e5a37d35 --- /dev/null +++ b/tests/iso/currency/alpha-fund.test.json @@ -0,0 +1,51 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/alpha-fund.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 840, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - Mvdol (Bolivia)", + "data": "BOV", + "valid": true + }, + { + "description": "Valid - Unidad de Fomento (Chile)", + "data": "CLF", + "valid": true + }, + { + "description": "Valid - WIR Euro (Switzerland)", + "data": "CHE", + "valid": true + }, + { + "description": "Invalid - regular currency (US Dollar)", + "data": "USD", + "valid": false + }, + { + "description": "Invalid - unknown code (XXX)", + "data": "XXX", + "valid": false + }, + { + "description": "Invalid - lowercase", + "data": "bov", + "valid": false + } + ] +} diff --git a/tests/iso/currency/alpha-precious-metal.test.json b/tests/iso/currency/alpha-precious-metal.test.json new file mode 100644 index 00000000..6abf451e --- /dev/null +++ b/tests/iso/currency/alpha-precious-metal.test.json @@ -0,0 +1,66 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/alpha-precious-metal.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 959, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - Gold", + "data": "XAU", + "valid": true + }, + { + "description": "Valid - Silver", + "data": "XAG", + "valid": true + }, + { + "description": "Valid - Platinum", + "data": "XPT", + "valid": true + }, + { + "description": "Valid - Palladium", + "data": "XPD", + "valid": true + }, + { + "description": "Invalid - Regular currency USD", + "data": "USD", + "valid": false + }, + { + "description": "Invalid - Unknown code XXX", + "data": "XXX", + "valid": false + }, + { + "description": "Invalid - Test code XTS", + "data": "XTS", + "valid": false + } + ] +} diff --git a/tests/iso/currency/alpha-test.test.json b/tests/iso/currency/alpha-test.test.json new file mode 100644 index 00000000..696e1240 --- /dev/null +++ b/tests/iso/currency/alpha-test.test.json @@ -0,0 +1,71 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/alpha-test.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 963, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - XTS (test code)", + "data": "XTS", + "valid": true + }, + { + "description": "Invalid - US Dollar", + "data": "USD", + "valid": false + }, + { + "description": "Invalid - Euro", + "data": "EUR", + "valid": false + }, + { + "description": "Invalid - fund code (Mvdol)", + "data": "BOV", + "valid": false + }, + { + "description": "Invalid - unknown code (XXX)", + "data": "XXX", + "valid": false + }, + { + "description": "Invalid - lowercase xts", + "data": "xts", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": "XTT", + "valid": false + } + ] +} diff --git a/tests/iso/currency/alpha-unknown.test.json b/tests/iso/currency/alpha-unknown.test.json new file mode 100644 index 00000000..5095f57c --- /dev/null +++ b/tests/iso/currency/alpha-unknown.test.json @@ -0,0 +1,66 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/alpha-unknown.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 999, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - XXX (no currency)", + "data": "XXX", + "valid": true + }, + { + "description": "Invalid - US Dollar", + "data": "USD", + "valid": false + }, + { + "description": "Invalid - Euro", + "data": "EUR", + "valid": false + }, + { + "description": "Invalid - fund code (Mvdol)", + "data": "BOV", + "valid": false + }, + { + "description": "Invalid - lowercase xxx", + "data": "xxx", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": "XXY", + "valid": false + } + ] +} diff --git a/tests/iso/currency/historical/alpha-code.test.json b/tests/iso/currency/historical/alpha-code.test.json new file mode 100644 index 00000000..d344eb4d --- /dev/null +++ b/tests/iso/currency/historical/alpha-code.test.json @@ -0,0 +1,66 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/iso/currency/historical/alpha-code.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 840, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - Andorran Peseta", + "data": "ADP", + "valid": true + }, + { + "description": "Valid - Afghani", + "data": "AFA", + "valid": true + }, + { + "description": "Invalid - current currency (USD)", + "data": "USD", + "valid": false + }, + { + "description": "Invalid - current currency (JPY)", + "data": "JPY", + "valid": false + }, + { + "description": "Invalid - lowercase", + "data": "adp", + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": "XXY", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + } + ] +} diff --git a/tests/iso/currency/historical/alpha-currency.test.json b/tests/iso/currency/historical/alpha-currency.test.json new file mode 100644 index 00000000..6eac8f47 --- /dev/null +++ b/tests/iso/currency/historical/alpha-currency.test.json @@ -0,0 +1,86 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/iso/currency/historical/alpha-currency.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 840, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - Andorran Peseta", + "data": "ADP", + "valid": true + }, + { + "description": "Valid - Afghani", + "data": "AFA", + "valid": true + }, + { + "description": "Valid - German Mark", + "data": "DEM", + "valid": true + }, + { + "description": "Valid - French Franc", + "data": "FRF", + "valid": true + }, + { + "description": "Invalid - current currency (USD)", + "data": "USD", + "valid": false + }, + { + "description": "Invalid - current currency (JPY)", + "data": "JPY", + "valid": false + }, + { + "description": "Invalid - lowercase", + "data": "adp", + "valid": false + }, + { + "description": "Invalid - too short", + "data": "AD", + "valid": false + }, + { + "description": "Invalid - too long", + "data": "ADPD", + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": "XXY", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + } + ] +} diff --git a/tests/iso/currency/historical/numeric-code.test.json b/tests/iso/currency/historical/numeric-code.test.json new file mode 100644 index 00000000..b32f1a6c --- /dev/null +++ b/tests/iso/currency/historical/numeric-code.test.json @@ -0,0 +1,61 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/iso/currency/historical/numeric-code.json", + "tests": [ + { + "description": "Invalid type - string", + "data": "840", + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - Afghani (4)", + "data": 4, + "valid": true + }, + { + "description": "Valid - Lek (8)", + "data": 8, + "valid": true + }, + { + "description": "Invalid - current currency (840 - USD)", + "data": 840, + "valid": false + }, + { + "description": "Invalid - current currency (392 - JPY)", + "data": 392, + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": 1, + "valid": false + }, + { + "description": "Invalid - negative", + "data": -1, + "valid": false + } + ] +} diff --git a/tests/iso/currency/historical/numeric-currency.test.json b/tests/iso/currency/historical/numeric-currency.test.json new file mode 100644 index 00000000..07732e92 --- /dev/null +++ b/tests/iso/currency/historical/numeric-currency.test.json @@ -0,0 +1,71 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/iso/currency/historical/numeric-currency.json", + "tests": [ + { + "description": "Invalid type - string", + "data": "840", + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - Afghani (4)", + "data": 4, + "valid": true + }, + { + "description": "Valid - Lek (8)", + "data": 8, + "valid": true + }, + { + "description": "Valid - Andorran Peseta (20)", + "data": 20, + "valid": true + }, + { + "description": "Invalid - current currency (840 - USD)", + "data": 840, + "valid": false + }, + { + "description": "Invalid - current currency (392 - JPY)", + "data": 392, + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": 1, + "valid": false + }, + { + "description": "Invalid - negative", + "data": -1, + "valid": false + }, + { + "description": "Invalid - decimal", + "data": 4.5, + "valid": false + } + ] +} diff --git a/tests/iso/currency/numeric-code-additional.test.json b/tests/iso/currency/numeric-code-additional.test.json new file mode 100644 index 00000000..7c872e1c --- /dev/null +++ b/tests/iso/currency/numeric-code-additional.test.json @@ -0,0 +1,66 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/numeric-code-additional.json", + "tests": [ + { + "description": "Invalid type - string", + "data": "900", + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - minimum value 900", + "data": 900, + "valid": true + }, + { + "description": "Valid - middle value 950", + "data": 950, + "valid": true + }, + { + "description": "Valid - maximum value 998", + "data": 998, + "valid": true + }, + { + "description": "Invalid - below minimum (899)", + "data": 899, + "valid": false + }, + { + "description": "Invalid - above maximum (999)", + "data": 999, + "valid": false + }, + { + "description": "Invalid - test code (963)", + "data": 963, + "valid": true + }, + { + "description": "Invalid - precious metal Gold (959)", + "data": 959, + "valid": true + } + ] +} diff --git a/tests/iso/currency/numeric-code.test.json b/tests/iso/currency/numeric-code.test.json new file mode 100644 index 00000000..deb0acf0 --- /dev/null +++ b/tests/iso/currency/numeric-code.test.json @@ -0,0 +1,86 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/numeric-code.json", + "tests": [ + { + "description": "Invalid type - string", + "data": "840", + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - US Dollar (840)", + "data": 840, + "valid": true + }, + { + "description": "Valid - Euro (978)", + "data": 978, + "valid": true + }, + { + "description": "Valid - Japanese Yen (392)", + "data": 392, + "valid": true + }, + { + "description": "Valid - British Pound (826)", + "data": 826, + "valid": true + }, + { + "description": "Valid - Swiss Franc (756)", + "data": 756, + "valid": true + }, + { + "description": "Valid - fund code (984 - Mvdol)", + "data": 984, + "valid": true + }, + { + "description": "Valid - fund code (990 - Unidad de Fomento)", + "data": 990, + "valid": true + }, + { + "description": "Valid - fund code (979 - Mexican UDI)", + "data": 979, + "valid": true + }, + { + "description": "Valid - fund code (947 - WIR Euro)", + "data": 947, + "valid": true + }, + { + "description": "Invalid - unknown code (999)", + "data": 999, + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": 123, + "valid": false + } + ] +} diff --git a/tests/iso/currency/numeric-currency.test.json b/tests/iso/currency/numeric-currency.test.json new file mode 100644 index 00000000..eceb8ea3 --- /dev/null +++ b/tests/iso/currency/numeric-currency.test.json @@ -0,0 +1,101 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/numeric-currency.json", + "tests": [ + { + "description": "Invalid type - string", + "data": "840", + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - US Dollar (840)", + "data": 840, + "valid": true + }, + { + "description": "Valid - Euro (978)", + "data": 978, + "valid": true + }, + { + "description": "Valid - Japanese Yen (392)", + "data": 392, + "valid": true + }, + { + "description": "Valid - British Pound (826)", + "data": 826, + "valid": true + }, + { + "description": "Valid - Swiss Franc (756)", + "data": 756, + "valid": true + }, + { + "description": "Valid - Canadian Dollar (124)", + "data": 124, + "valid": true + }, + { + "description": "Valid - Australian Dollar (36)", + "data": 36, + "valid": true + }, + { + "description": "Valid - Chinese Yuan (156)", + "data": 156, + "valid": true + }, + { + "description": "Valid - Indian Rupee (356)", + "data": 356, + "valid": true + }, + { + "description": "Invalid - non-existent code", + "data": 123, + "valid": false + }, + { + "description": "Invalid - fund code (984 - Mvdol)", + "data": 984, + "valid": false + }, + { + "description": "Invalid - fund code (990 - Unidad de Fomento)", + "data": 990, + "valid": false + }, + { + "description": "Invalid - fund code (979 - Mexican UDI)", + "data": 979, + "valid": false + }, + { + "description": "Invalid - fund code (947 - WIR Euro)", + "data": 947, + "valid": false + } + ] +} diff --git a/tests/iso/currency/numeric-fund.test.json b/tests/iso/currency/numeric-fund.test.json new file mode 100644 index 00000000..49af4448 --- /dev/null +++ b/tests/iso/currency/numeric-fund.test.json @@ -0,0 +1,51 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/numeric-fund.json", + "tests": [ + { + "description": "Invalid type - string", + "data": "984", + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - Mvdol (984 - Bolivia)", + "data": 984, + "valid": true + }, + { + "description": "Valid - Unidad de Fomento (990 - Chile)", + "data": 990, + "valid": true + }, + { + "description": "Valid - WIR Euro (947 - Switzerland)", + "data": 947, + "valid": true + }, + { + "description": "Invalid - regular currency (840 - US Dollar)", + "data": 840, + "valid": false + }, + { + "description": "Invalid - unknown code (999)", + "data": 999, + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": 123, + "valid": false + } + ] +} diff --git a/tests/iso/currency/numeric-precious-metal.test.json b/tests/iso/currency/numeric-precious-metal.test.json new file mode 100644 index 00000000..da882d06 --- /dev/null +++ b/tests/iso/currency/numeric-precious-metal.test.json @@ -0,0 +1,66 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/numeric-precious-metal.json", + "tests": [ + { + "description": "Invalid type - string", + "data": "XAU", + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - Gold (959)", + "data": 959, + "valid": true + }, + { + "description": "Valid - Silver (961)", + "data": 961, + "valid": true + }, + { + "description": "Valid - Platinum (962)", + "data": 962, + "valid": true + }, + { + "description": "Valid - Palladium (964)", + "data": 964, + "valid": true + }, + { + "description": "Invalid - Regular currency USD (840)", + "data": 840, + "valid": false + }, + { + "description": "Invalid - Unknown code (999)", + "data": 999, + "valid": false + }, + { + "description": "Invalid - Test code (963)", + "data": 963, + "valid": false + } + ] +} diff --git a/tests/iso/currency/numeric-test.test.json b/tests/iso/currency/numeric-test.test.json new file mode 100644 index 00000000..bd758398 --- /dev/null +++ b/tests/iso/currency/numeric-test.test.json @@ -0,0 +1,61 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/numeric-test.json", + "tests": [ + { + "description": "Invalid type - string", + "data": "963", + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - 963 (test code)", + "data": 963, + "valid": true + }, + { + "description": "Invalid - US Dollar (840)", + "data": 840, + "valid": false + }, + { + "description": "Invalid - Euro (978)", + "data": 978, + "valid": false + }, + { + "description": "Invalid - fund code (984 - Mvdol)", + "data": 984, + "valid": false + }, + { + "description": "Invalid - unknown code (999)", + "data": 999, + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": 123, + "valid": false + } + ] +} diff --git a/tests/iso/currency/numeric-unknown.test.json b/tests/iso/currency/numeric-unknown.test.json new file mode 100644 index 00000000..9276c9e7 --- /dev/null +++ b/tests/iso/currency/numeric-unknown.test.json @@ -0,0 +1,56 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../schemas/iso/currency/numeric-unknown.json", + "tests": [ + { + "description": "Invalid type - string", + "data": "999", + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - 999 (no currency)", + "data": 999, + "valid": true + }, + { + "description": "Invalid - US Dollar (840)", + "data": 840, + "valid": false + }, + { + "description": "Invalid - Euro (978)", + "data": 978, + "valid": false + }, + { + "description": "Invalid - fund code (984 - Mvdol)", + "data": 984, + "valid": false + }, + { + "description": "Invalid - non-existent code", + "data": 123, + "valid": false + } + ] +}