Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
1443 lines (1427 sloc) 57.5 KB
(in-package :cies)
(defvar *currency-data* (make-hash-table :test #'equalp))
(defclass currency-data ()
((country :initarg :country :reader ccy-country)
(name :initarg :name :type 'string :reader ccy-name)
(acode :initarg :acode :type 'string :reader ccy-acode)
(ncode :initarg :ncode :type 'string :reader ccy-ncode)
(ddigits :initarg :ddigits :type 'string :reader ccy-ddigits)))
;;(defun build-currency-data-hash ()
;;(with-open-file (sm "currency-info.lisp" :direction :input)
(progn
(loop for val in '(((:COUNTRY "AFGHANISTAN")
(:NAME "Afghani")
(:ACODE "AFN")
(:NCODE "971")
(:DDIGITS "2"))
((:COUNTRY "AALAND ISLANDS")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "ALBANIA")
(:NAME "Lek")
(:ACODE "ALL")
(:NCODE "008")
(:DDIGITS "2"))
((:COUNTRY "ALGERIA")
(:NAME "Algerian Dinar")
(:ACODE "DZD")
(:NCODE "012")
(:DDIGITS "2"))
((:COUNTRY "AMERICAN SAMOA")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "ANDORRA")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "ANGOLA")
(:NAME "Kwanza")
(:ACODE "AOA")
(:NCODE "973")
(:DDIGITS "2"))
((:COUNTRY "ANGUILLA")
(:NAME "East Caribbean Dollar")
(:ACODE "XCD")
(:NCODE "951")
(:DDIGITS "2"))
((:COUNTRY "ANTIGUA AND BARBUDA")
(:NAME "East Caribbean Dollar")
(:ACODE "XCD")
(:NCODE "951")
(:DDIGITS "2"))
((:COUNTRY "ARGENTINA")
(:NAME "Argentine Peso")
(:ACODE "ARS")
(:NCODE "032")
(:DDIGITS "2"))
((:COUNTRY "ARMENIA")
(:NAME "Armenian Dram")
(:ACODE "AMD")
(:NCODE "051")
(:DDIGITS "2"))
((:COUNTRY "ARUBA")
(:NAME "Aruban Florin")
(:ACODE "AWG")
(:NCODE "533")
(:DDIGITS "2"))
((:COUNTRY "AUSTRALIA")
(:NAME "Australian Dollar")
(:ACODE "AUD")
(:NCODE "036")
(:DDIGITS "2"))
((:COUNTRY "AUSTRIA")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "AZERBAIJAN")
(:NAME "Azerbaijanian Manat")
(:ACODE "AZN")
(:NCODE "944")
(:DDIGITS "2"))
((:COUNTRY "BAHAMAS")
(:NAME "Bahamian Dollar")
(:ACODE "BSD")
(:NCODE "044")
(:DDIGITS "2"))
((:COUNTRY "BAHRAIN")
(:NAME "Bahraini Dinar")
(:ACODE "BHD")
(:NCODE "048")
(:DDIGITS "3"))
((:COUNTRY "BANGLADESH")
(:NAME "Taka")
(:ACODE "BDT")
(:NCODE "050")
(:DDIGITS "2"))
((:COUNTRY "BARBADOS")
(:NAME "Barbados Dollar")
(:ACODE "BBD")
(:NCODE "052")
(:DDIGITS "2"))
((:COUNTRY "BELARUS")
(:NAME "Belarussian Ruble")
(:ACODE "BYR")
(:NCODE "974")
(:DDIGITS "0"))
((:COUNTRY "BELGIUM")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "BELIZE")
(:NAME "Belize Dollar")
(:ACODE "BZD")
(:NCODE "084")
(:DDIGITS "2"))
((:COUNTRY "BENIN")
(:NAME "CFA Franc BCEAO")
(:ACODE "XOF")
(:NCODE "952")
(:DDIGITS "0"))
((:COUNTRY "BERMUDA")
(:NAME "Bermudian Dollar")
(:ACODE "BMD")
(:NCODE "060")
(:DDIGITS "2"))
((:COUNTRY "BHUTAN")
(:NAME "Ngultrum")
(:ACODE "BTN")
(:NCODE "064")
(:DDIGITS "2"))
((:COUNTRY "BHUTAN")
(:NAME "Indian Rupee")
(:ACODE "INR")
(:NCODE "356")
(:DDIGITS "2"))
((:COUNTRY "BOLIVIA, PLURINATIONAL STATE OF")
(:NAME "Boliviano")
(:ACODE "BOB")
(:NCODE "068")
(:DDIGITS "2"))
((:COUNTRY "BOLIVIA, PLURINATIONAL STATE OF")
(:NAME "Mvdol")
(:ACODE "BOV")
(:NCODE "984")
(:DDIGITS "2"))
((:COUNTRY "BONAIRE, SINT EUSTATIUS AND SABA")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "BOSNIA AND HERZEGOVINA")
(:NAME "Convertible Mark")
(:ACODE "BAM")
(:NCODE "977")
(:DDIGITS "2"))
((:COUNTRY "BOTSWANA")
(:NAME "Pula")
(:ACODE "BWP")
(:NCODE "072")
(:DDIGITS "2"))
((:COUNTRY "BOUVET ISLAND")
(:NAME "Norwegian Krone")
(:ACODE "NOK")
(:NCODE "578")
(:DDIGITS "2"))
((:COUNTRY "BRAZIL")
(:NAME "Brazilian Real")
(:ACODE "BRL")
(:NCODE "986")
(:DDIGITS "2"))
((:COUNTRY "BRITISH INDIAN OCEAN TERRITORY")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "BRUNEI DARUSSALAM")
(:NAME "Brunei Dollar")
(:ACODE "BND")
(:NCODE "096")
(:DDIGITS "2"))
((:COUNTRY "BULGARIA")
(:NAME "Bulgarian Lev")
(:ACODE "BGN")
(:NCODE "975")
(:DDIGITS "2"))
((:COUNTRY "BURKINA FASO")
(:NAME "CFA Franc BCEAO")
(:ACODE "XOF")
(:NCODE "952")
(:DDIGITS "0"))
((:COUNTRY "BURUNDI")
(:NAME "Burundi Franc")
(:ACODE "BIF")
(:NCODE "108")
(:DDIGITS "0"))
((:COUNTRY "CAMBODIA")
(:NAME "Riel")
(:ACODE "KHR")
(:NCODE "116")
(:DDIGITS "2"))
((:COUNTRY "CAMEROON")
(:NAME "CFA Franc BEAC")
(:ACODE "XAF")
(:NCODE "950")
(:DDIGITS "0"))
((:COUNTRY "CANADA")
(:NAME "Canadian Dollar")
(:ACODE "CAD")
(:NCODE "124")
(:DDIGITS "2"))
((:COUNTRY "CAPE VERDE")
(:NAME "Cape Verde Escudo")
(:ACODE "CVE")
(:NCODE "132")
(:DDIGITS "2"))
((:COUNTRY "CAYMAN ISLANDS")
(:NAME "Cayman Islands Dollar")
(:ACODE "KYD")
(:NCODE "136")
(:DDIGITS "2"))
((:COUNTRY "CENTRAL AFRICAN REPUBLIC")
(:NAME "CFA Franc BEAC")
(:ACODE "XAF")
(:NCODE "950")
(:DDIGITS "0"))
((:COUNTRY "CHAD")
(:NAME "CFA Franc BEAC")
(:ACODE "XAF")
(:NCODE "950")
(:DDIGITS "0"))
((:COUNTRY "CHILE")
(:NAME "Unidades de fomento")
(:ACODE "CLF")
(:NCODE "990")
(:DDIGITS "0"))
((:COUNTRY "CHILE")
(:NAME "Chilean Peso")
(:ACODE "CLP")
(:NCODE "152")
(:DDIGITS "0"))
((:COUNTRY "CHINA")
(:NAME "Yuan Renminbi")
(:ACODE "CNY")
(:NCODE "156")
(:DDIGITS "2"))
((:COUNTRY "CHRISTMAS ISLAND")
(:NAME "Australian Dollar")
(:ACODE "AUD")
(:NCODE "036")
(:DDIGITS "2"))
((:COUNTRY "COCOS (KEELING) ISLANDS")
(:NAME "Australian Dollar")
(:ACODE "AUD")
(:NCODE "036")
(:DDIGITS "2"))
((:COUNTRY "COLOMBIA")
(:NAME "Colombian Peso")
(:ACODE "COP")
(:NCODE "170")
(:DDIGITS "2"))
((:COUNTRY "COLOMBIA")
(:NAME "Unidad de Valor Real")
(:ACODE "COU")
(:NCODE "970")
(:DDIGITS "2"))
((:COUNTRY "COMOROS")
(:NAME "Comoro Franc")
(:ACODE "KMF")
(:NCODE "174")
(:DDIGITS "0"))
((:COUNTRY "CONGO")
(:NAME "CFA Franc BEAC")
(:ACODE "XAF")
(:NCODE "950")
(:DDIGITS "0"))
((:COUNTRY "CONGO, THE DEMOCRATIC REPUBLIC OF")
(:NAME "Congolese Franc")
(:ACODE "CDF")
(:NCODE "976")
(:DDIGITS "2"))
((:COUNTRY "COOK ISLANDS")
(:NAME "New Zealand Dollar")
(:ACODE "NZD")
(:NCODE "554")
(:DDIGITS "2"))
((:COUNTRY "COSTA RICA")
(:NAME "Costa Rican Colon")
(:ACODE "CRC")
(:NCODE "188")
(:DDIGITS "2"))
((:COUNTRY "COTE D'IVOIRE")
(:NAME "CFA Franc BCEAO")
(:ACODE "XOF")
(:NCODE "952")
(:DDIGITS "0"))
((:COUNTRY "CROATIA")
(:NAME "Croatian Kuna")
(:ACODE "HRK")
(:NCODE "191")
(:DDIGITS "2"))
((:COUNTRY "CUBA")
(:NAME "Peso Convertible")
(:ACODE "CUC")
(:NCODE "931")
(:DDIGITS "2"))
((:COUNTRY "CUBA")
(:NAME "Cuban Peso")
(:ACODE "CUP")
(:NCODE "192")
(:DDIGITS "2"))
((:COUNTRY "CURACAO")
(:NAME "Netherlands Antillean Guilder")
(:ACODE "ANG")
(:NCODE "532")
(:DDIGITS "2"))
((:COUNTRY "CYPRUS")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "CZECH REPUBLIC")
(:NAME "Czech Koruna")
(:ACODE "CZK")
(:NCODE "203")
(:DDIGITS "2"))
((:COUNTRY "DENMARK")
(:NAME "Danish Krone")
(:ACODE "DKK")
(:NCODE "208")
(:DDIGITS "2"))
((:COUNTRY "DJIBOUTI")
(:NAME "Djibouti Franc")
(:ACODE "DJF")
(:NCODE "262")
(:DDIGITS "0"))
((:COUNTRY "DOMINICA")
(:NAME "East Caribbean Dollar")
(:ACODE "XCD")
(:NCODE "951")
(:DDIGITS "2"))
((:COUNTRY "DOMINICAN REPUBLIC")
(:NAME "Dominican Peso")
(:ACODE "DOP")
(:NCODE "214")
(:DDIGITS "2"))
((:COUNTRY "ECUADOR")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "EGYPT")
(:NAME "Egyptian Pound")
(:ACODE "EGP")
(:NCODE "818")
(:DDIGITS "2"))
((:COUNTRY "EL SALVADOR")
(:NAME "El Salvador Colon")
(:ACODE "SVC")
(:NCODE "222")
(:DDIGITS "2"))
((:COUNTRY "EL SALVADOR")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "EQUATORIAL GUINEA")
(:NAME "CFA Franc BEAC")
(:ACODE "XAF")
(:NCODE "950")
(:DDIGITS "0"))
((:COUNTRY "ERITREA")
(:NAME "Nakfa")
(:ACODE "ERN")
(:NCODE "232")
(:DDIGITS "2"))
((:COUNTRY "ESTONIA")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "ETHIOPIA")
(:NAME "Ethiopian Birr")
(:ACODE "ETB")
(:NCODE "230")
(:DDIGITS "2"))
((:COUNTRY "EUROPEAN UNION")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "FALKLAND ISLANDS (MALVINAS)")
(:NAME "Falkland Islands Pound")
(:ACODE "FKP")
(:NCODE "238")
(:DDIGITS "2"))
((:COUNTRY "FAROE ISLANDS")
(:NAME "Danish Krone")
(:ACODE "DKK")
(:NCODE "208")
(:DDIGITS "2"))
((:COUNTRY "FIJI")
(:NAME "Fiji Dollar")
(:ACODE "FJD")
(:NCODE "242")
(:DDIGITS "2"))
((:COUNTRY "FINLAND")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "FRANCE")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "FRENCH GUIANA")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "FRENCH POLYNESIA")
(:NAME "CFP Franc")
(:ACODE "XPF")
(:NCODE "953")
(:DDIGITS "0"))
((:COUNTRY "FRENCH SOUTHERN TERRITORIES")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "GABON")
(:NAME "CFA Franc BEAC")
(:ACODE "XAF")
(:NCODE "950")
(:DDIGITS "0"))
((:COUNTRY "GAMBIA")
(:NAME "Dalasi")
(:ACODE "GMD")
(:NCODE "270")
(:DDIGITS "2"))
((:COUNTRY "GEORGIA")
(:NAME "Lari")
(:ACODE "GEL")
(:NCODE "981")
(:DDIGITS "2"))
((:COUNTRY "GERMANY")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "GHANA")
(:NAME "Ghana Cedi")
(:ACODE "GHS")
(:NCODE "936")
(:DDIGITS "2"))
((:COUNTRY "GIBRALTAR")
(:NAME "Gibraltar Pound")
(:ACODE "GIP")
(:NCODE "292")
(:DDIGITS "2"))
((:COUNTRY "GREECE")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "GREENLAND")
(:NAME "Danish Krone")
(:ACODE "DKK")
(:NCODE "208")
(:DDIGITS "2"))
((:COUNTRY "GRENADA")
(:NAME "East Caribbean Dollar")
(:ACODE "XCD")
(:NCODE "951")
(:DDIGITS "2"))
((:COUNTRY "GUADELOUPE")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "GUAM")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "GUATEMALA")
(:NAME "Quetzal")
(:ACODE "GTQ")
(:NCODE "320")
(:DDIGITS "2"))
((:COUNTRY "GUERNSEY")
(:NAME "Pound Sterling")
(:ACODE "GBP")
(:NCODE "826")
(:DDIGITS "2"))
((:COUNTRY "GUINEA")
(:NAME "Guinea Franc")
(:ACODE "GNF")
(:NCODE "324")
(:DDIGITS "0"))
((:COUNTRY "GUINEA-BISSAU")
(:NAME "CFA Franc BCEAO")
(:ACODE "XOF")
(:NCODE "952")
(:DDIGITS "0"))
((:COUNTRY "GUYANA")
(:NAME "Guyana Dollar")
(:ACODE "GYD")
(:NCODE "328")
(:DDIGITS "2"))
((:COUNTRY "HAITI")
(:NAME "Gourde")
(:ACODE "HTG")
(:NCODE "332")
(:DDIGITS "2"))
((:COUNTRY "HAITI")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "HEARD ISLAND AND McDONALD ISLANDS")
(:NAME "Australian Dollar")
(:ACODE "AUD")
(:NCODE "036")
(:DDIGITS "2"))
((:COUNTRY "HOLY SEE (VATICAN CITY STATE)")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "HONDURAS")
(:NAME "Lempira")
(:ACODE "HNL")
(:NCODE "340")
(:DDIGITS "2"))
((:COUNTRY "HONG KONG")
(:NAME "Hong Kong Dollar")
(:ACODE "HKD")
(:NCODE "344")
(:DDIGITS "2"))
((:COUNTRY "HUNGARY")
(:NAME "Forint")
(:ACODE "HUF")
(:NCODE "348")
(:DDIGITS "2"))
((:COUNTRY "ICELAND")
(:NAME "Iceland Krona")
(:ACODE "ISK")
(:NCODE "352")
(:DDIGITS "0"))
((:COUNTRY "INDIA")
(:NAME "Indian Rupee")
(:ACODE "INR")
(:NCODE "356")
(:DDIGITS "2"))
((:COUNTRY "INDONESIA")
(:NAME "Rupiah")
(:ACODE "IDR")
(:NCODE "360")
(:DDIGITS "2"))
((:COUNTRY "INTERNATIONAL MONETARY FUND (IMF)")
(:NAME "SDR (Special Drawing Right)")
(:ACODE "XDR")
(:NCODE "960")
(:DDIGITS "N.A."))
((:COUNTRY "IRAN, ISLAMIC REPUBLIC OF")
(:NAME "Iranian Rial")
(:ACODE "IRR")
(:NCODE "364")
(:DDIGITS "2"))
((:COUNTRY "IRAQ")
(:NAME "Iraqi Dinar")
(:ACODE "IQD")
(:NCODE "368")
(:DDIGITS "3"))
((:COUNTRY "IRELAND")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "ISLE OF MAN")
(:NAME "Pound Sterling")
(:ACODE "GBP")
(:NCODE "826")
(:DDIGITS "2"))
((:COUNTRY "ISRAEL")
(:NAME "New Israeli Sheqel")
(:ACODE "ILS")
(:NCODE "376")
(:DDIGITS "2"))
((:COUNTRY "ITALY")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "JAMAICA")
(:NAME "Jamaican Dollar")
(:ACODE "JMD")
(:NCODE "388")
(:DDIGITS "2"))
((:COUNTRY "JAPAN")
(:NAME "Yen")
(:ACODE "JPY")
(:NCODE "392")
(:DDIGITS "0"))
((:COUNTRY "JERSEY")
(:NAME "Pound Sterling")
(:ACODE "GBP")
(:NCODE "826")
(:DDIGITS "2"))
((:COUNTRY "JORDAN")
(:NAME "Jordanian Dinar")
(:ACODE "JOD")
(:NCODE "400")
(:DDIGITS "3"))
((:COUNTRY "KAZAKHSTAN")
(:NAME "Tenge")
(:ACODE "KZT")
(:NCODE "398")
(:DDIGITS "2"))
((:COUNTRY "KENYA")
(:NAME "Kenyan Shilling")
(:ACODE "KES")
(:NCODE "404")
(:DDIGITS "2"))
((:COUNTRY "KIRIBATI")
(:NAME "Australian Dollar")
(:ACODE "AUD")
(:NCODE "036")
(:DDIGITS "2"))
((:COUNTRY "KOREA, DEMOCRATIC PEOPLES REPUBLIC OF")
(:NAME "North Korean Won")
(:ACODE "KPW")
(:NCODE "408")
(:DDIGITS "2"))
((:COUNTRY "KOREA, REPUBLIC OF")
(:NAME "Won")
(:ACODE "KRW")
(:NCODE "410")
(:DDIGITS "0"))
((:COUNTRY "KUWAIT")
(:NAME "Kuwaiti Dinar")
(:ACODE "KWD")
(:NCODE "414")
(:DDIGITS "3"))
((:COUNTRY "KYRGYZSTAN")
(:NAME "Som")
(:ACODE "KGS")
(:NCODE "417")
(:DDIGITS "2"))
((:COUNTRY "LAO PEOPLES DEMOCRATIC REPUBLIC")
(:NAME "Kip")
(:ACODE "LAK")
(:NCODE "418")
(:DDIGITS "2"))
((:COUNTRY "LATVIA")
(:NAME "Latvian Lats")
(:ACODE "LVL")
(:NCODE "428")
(:DDIGITS "2"))
((:COUNTRY "LEBANON")
(:NAME "Lebanese Pound")
(:ACODE "LBP")
(:NCODE "422")
(:DDIGITS "2"))
((:COUNTRY "LESOTHO")
(:NAME "Loti")
(:ACODE "LSL")
(:NCODE "426")
(:DDIGITS "2"))
((:COUNTRY "LESOTHO")
(:NAME "Rand")
(:ACODE "ZAR")
(:NCODE "710")
(:DDIGITS "2"))
((:COUNTRY "LIBERIA")
(:NAME "Liberian Dollar")
(:ACODE "LRD")
(:NCODE "430")
(:DDIGITS "2"))
((:COUNTRY "LIBYA")
(:NAME "Libyan Dinar")
(:ACODE "LYD")
(:NCODE "434")
(:DDIGITS "3"))
((:COUNTRY "LIECHTENSTEIN")
(:NAME "Swiss Franc")
(:ACODE "CHF")
(:NCODE "756")
(:DDIGITS "2"))
((:COUNTRY "LITHUANIA")
(:NAME "Lithuanian Litas")
(:ACODE "LTL")
(:NCODE "440")
(:DDIGITS "2"))
((:COUNTRY "LUXEMBOURG")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "MACAO")
(:NAME "Pataca")
(:ACODE "MOP")
(:NCODE "446")
(:DDIGITS "2"))
((:COUNTRY "MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF")
(:NAME "Denar")
(:ACODE "MKD")
(:NCODE "807")
(:DDIGITS "2"))
((:COUNTRY "MADAGASCAR")
(:NAME "Malagasy Ariary")
(:ACODE "MGA")
(:NCODE "969")
(:DDIGITS "2"))
((:COUNTRY "MALAWI")
(:NAME "Kwacha")
(:ACODE "MWK")
(:NCODE "454")
(:DDIGITS "2"))
((:COUNTRY "MALAYSIA")
(:NAME "Malaysian Ringgit")
(:ACODE "MYR")
(:NCODE "458")
(:DDIGITS "2"))
((:COUNTRY "MALDIVES")
(:NAME "Rufiyaa")
(:ACODE "MVR")
(:NCODE "462")
(:DDIGITS "2"))
((:COUNTRY "MALI")
(:NAME "CFA Franc BCEAO")
(:ACODE "XOF")
(:NCODE "952")
(:DDIGITS "0"))
((:COUNTRY "MALTA")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "MARSHALL ISLANDS")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "MARTINIQUE")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "MAURITANIA")
(:NAME "Ouguiya")
(:ACODE "MRO")
(:NCODE "478")
(:DDIGITS "2"))
((:COUNTRY "MAURITIUS")
(:NAME "Mauritius Rupee")
(:ACODE "MUR")
(:NCODE "480")
(:DDIGITS "2"))
((:COUNTRY "MAYOTTE")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "MEMBER COUNTRIES OF THE AFRICAN DEVELOPMENT BANK GROUP")
(:NAME "ADB Unit of Account")
(:ACODE "XUA")
(:NCODE "965")
(:DDIGITS "N.A."))
((:COUNTRY "MEXICO")
(:NAME "Mexican Peso")
(:ACODE "MXN")
(:NCODE "484")
(:DDIGITS "2"))
((:COUNTRY "MEXICO")
(:NAME "Mexican Unidad de Inversion (UDI)")
(:ACODE "MXV")
(:NCODE "979")
(:DDIGITS "2"))
((:COUNTRY "MICRONESIA, FEDERATED STATES OF")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "MOLDOVA, REPUBLIC OF")
(:NAME "Moldovan Leu")
(:ACODE "MDL")
(:NCODE "498")
(:DDIGITS "2"))
((:COUNTRY "MONACO")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "MONGOLIA")
(:NAME "Tugrik")
(:ACODE "MNT")
(:NCODE "496")
(:DDIGITS "2"))
((:COUNTRY "MONTENEGRO")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "MONTSERRAT")
(:NAME "East Caribbean Dollar")
(:ACODE "XCD")
(:NCODE "951")
(:DDIGITS "2"))
((:COUNTRY "MOROCCO")
(:NAME "Moroccan Dirham")
(:ACODE "MAD")
(:NCODE "504")
(:DDIGITS "2"))
((:COUNTRY "MOZAMBIQUE")
(:NAME "Mozambique Metical")
(:ACODE "MZN")
(:NCODE "943")
(:DDIGITS "2"))
((:COUNTRY "MYANMAR")
(:NAME "Kyat")
(:ACODE "MMK")
(:NCODE "104")
(:DDIGITS "2"))
((:COUNTRY "NAMIBIA")
(:NAME "Namibia Dollar")
(:ACODE "NAD")
(:NCODE "516")
(:DDIGITS "2"))
((:COUNTRY "NAMIBIA")
(:NAME "Rand")
(:ACODE "ZAR")
(:NCODE "710")
(:DDIGITS "2"))
((:COUNTRY "NAURU")
(:NAME "Australian Dollar")
(:ACODE "AUD")
(:NCODE "036")
(:DDIGITS "2"))
((:COUNTRY "NEPAL")
(:NAME "Nepalese Rupee")
(:ACODE "NPR")
(:NCODE "524")
(:DDIGITS "2"))
((:COUNTRY "NETHERLANDS")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "NEW CALEDONIA")
(:NAME "CFP Franc")
(:ACODE "XPF")
(:NCODE "953")
(:DDIGITS "0"))
((:COUNTRY "NEW ZEALAND")
(:NAME "New Zealand Dollar")
(:ACODE "NZD")
(:NCODE "554")
(:DDIGITS "2"))
((:COUNTRY "NICARAGUA")
(:NAME "Cordoba Oro")
(:ACODE "NIO")
(:NCODE "558")
(:DDIGITS "2"))
((:COUNTRY "NIGER")
(:NAME "CFA Franc BCEAO")
(:ACODE "XOF")
(:NCODE "952")
(:DDIGITS "0"))
((:COUNTRY "NIGERIA")
(:NAME "Naira")
(:ACODE "NGN")
(:NCODE "566")
(:DDIGITS "2"))
((:COUNTRY "NIUE")
(:NAME "New Zealand Dollar")
(:ACODE "NZD")
(:NCODE "554")
(:DDIGITS "2"))
((:COUNTRY "NORFOLK ISLAND")
(:NAME "Australian Dollar")
(:ACODE "AUD")
(:NCODE "036")
(:DDIGITS "2"))
((:COUNTRY "NORTHERN MARIANA ISLANDS")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "NORWAY")
(:NAME "Norwegian Krone")
(:ACODE "NOK")
(:NCODE "578")
(:DDIGITS "2"))
((:COUNTRY "OMAN")
(:NAME "Rial Omani")
(:ACODE "OMR")
(:NCODE "512")
(:DDIGITS "3"))
((:COUNTRY "PAKISTAN")
(:NAME "Pakistan Rupee")
(:ACODE "PKR")
(:NCODE "586")
(:DDIGITS "2"))
((:COUNTRY "PALAU")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "PANAMA")
(:NAME "Balboa")
(:ACODE "PAB")
(:NCODE "590")
(:DDIGITS "2"))
((:COUNTRY "PANAMA")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "PAPUA NEW GUINEA")
(:NAME "Kina")
(:ACODE "PGK")
(:NCODE "598")
(:DDIGITS "2"))
((:COUNTRY "PARAGUAY")
(:NAME "Guarani")
(:ACODE "PYG")
(:NCODE "600")
(:DDIGITS "0"))
((:COUNTRY "PERU")
(:NAME "Nuevo Sol")
(:ACODE "PEN")
(:NCODE "604")
(:DDIGITS "2"))
((:COUNTRY "PHILIPPINES")
(:NAME "Philippine Peso")
(:ACODE "PHP")
(:NCODE "608")
(:DDIGITS "2"))
((:COUNTRY "PITCAIRN")
(:NAME "New Zealand Dollar")
(:ACODE "NZD")
(:NCODE "554")
(:DDIGITS "2"))
((:COUNTRY "POLAND")
(:NAME "Zloty")
(:ACODE "PLN")
(:NCODE "985")
(:DDIGITS "2"))
((:COUNTRY "PORTUGAL")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "PUERTO RICO")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "QATAR")
(:NAME "Qatari Rial")
(:ACODE "QAR")
(:NCODE "634")
(:DDIGITS "2"))
((:COUNTRY "REUNION")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "ROMANIA")
(:NAME "New Romanian Leu")
(:ACODE "RON")
(:NCODE "946")
(:DDIGITS "2"))
((:COUNTRY "RUSSIAN FEDERATION")
(:NAME "Russian Ruble")
(:ACODE "RUB")
(:NCODE "643")
(:DDIGITS "2"))
((:COUNTRY "RWANDA")
(:NAME "Rwanda Franc")
(:ACODE "RWF")
(:NCODE "646")
(:DDIGITS "0"))
((:COUNTRY "SAINT BARTHELEMY")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA")
(:NAME "Saint Helena Pound")
(:ACODE "SHP")
(:NCODE "654")
(:DDIGITS "2"))
((:COUNTRY "SAINT KITTS AND NEVIS")
(:NAME "East Caribbean Dollar")
(:ACODE "XCD")
(:NCODE "951")
(:DDIGITS "2"))
((:COUNTRY "SAINT LUCIA")
(:NAME "East Caribbean Dollar")
(:ACODE "XCD")
(:NCODE "951")
(:DDIGITS "2"))
((:COUNTRY "SAINT MARTIN (FRENCH PART)")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "SAINT PIERRE AND MIQUELON")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "SAINT VINCENT AND THE GRENADINES")
(:NAME "East Caribbean Dollar")
(:ACODE "XCD")
(:NCODE "951")
(:DDIGITS "2"))
((:COUNTRY "SAMOA")
(:NAME "Tala")
(:ACODE "WST")
(:NCODE "882")
(:DDIGITS "2"))
((:COUNTRY "SAN MARINO")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "SAO TOME AND PRINCIPE")
(:NAME "Dobra")
(:ACODE "STD")
(:NCODE "678")
(:DDIGITS "2"))
((:COUNTRY "SAUDI ARABIA")
(:NAME "Saudi Riyal")
(:ACODE "SAR")
(:NCODE "682")
(:DDIGITS "2"))
((:COUNTRY "SENEGAL")
(:NAME "CFA Franc BCEAO")
(:ACODE "XOF")
(:NCODE "952")
(:DDIGITS "0"))
((:COUNTRY "SERBIA")
(:NAME "Serbian Dinar")
(:ACODE "RSD")
(:NCODE "941")
(:DDIGITS "2"))
((:COUNTRY "SEYCHELLES")
(:NAME "Seychelles Rupee")
(:ACODE "SCR")
(:NCODE "690")
(:DDIGITS "2"))
((:COUNTRY "SIERRA LEONE")
(:NAME "Leone")
(:ACODE "SLL")
(:NCODE "694")
(:DDIGITS "2"))
((:COUNTRY "SINGAPORE")
(:NAME "Singapore Dollar")
(:ACODE "SGD")
(:NCODE "702")
(:DDIGITS "2"))
((:COUNTRY "SINT MAARTEN (DUTCH PART)")
(:NAME "Netherlands Antillean Guilder")
(:ACODE "ANG")
(:NCODE "532")
(:DDIGITS "2"))
((:COUNTRY "SISTEMA UNITARIO DE COMPENSACION REGIONAL DE PAGOS \"SUCRE\"")
(:NAME "Sucre")
(:ACODE "XSU")
(:NCODE "994")
(:DDIGITS "N.A."))
((:COUNTRY "SLOVAKIA")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "SLOVENIA")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "SOLOMON ISLANDS")
(:NAME "Solomon Islands Dollar")
(:ACODE "SBD")
(:NCODE "090")
(:DDIGITS "2"))
((:COUNTRY "SOMALIA")
(:NAME "Somali Shilling")
(:ACODE "SOS")
(:NCODE "706")
(:DDIGITS "2"))
((:COUNTRY "SOUTH AFRICA")
(:NAME "Rand")
(:ACODE "ZAR")
(:NCODE "710")
(:DDIGITS "2"))
((:COUNTRY "SOUTH SUDAN")
(:NAME "South Sudanese Pound")
(:ACODE "SSP")
(:NCODE "728")
(:DDIGITS "2"))
((:COUNTRY "SPAIN")
(:NAME "Euro")
(:ACODE "EUR")
(:NCODE "978")
(:DDIGITS "2"))
((:COUNTRY "SRI LANKA")
(:NAME "Sri Lanka Rupee")
(:ACODE "LKR")
(:NCODE "144")
(:DDIGITS "2"))
((:COUNTRY "SUDAN")
(:NAME "Sudanese Pound")
(:ACODE "SDG")
(:NCODE "938")
(:DDIGITS "2"))
((:COUNTRY "SURINAME")
(:NAME "Surinam Dollar")
(:ACODE "SRD")
(:NCODE "968")
(:DDIGITS "2"))
((:COUNTRY "SVALBARD AND JAN MAYEN")
(:NAME "Norwegian Krone")
(:ACODE "NOK")
(:NCODE "578")
(:DDIGITS "2"))
((:COUNTRY "SWAZILAND")
(:NAME "Lilangeni")
(:ACODE "SZL")
(:NCODE "748")
(:DDIGITS "2"))
((:COUNTRY "SWEDEN")
(:NAME "Swedish Krona")
(:ACODE "SEK")
(:NCODE "752")
(:DDIGITS "2"))
((:COUNTRY "SWITZERLAND")
(:NAME "WIR Euro")
(:ACODE "CHE")
(:NCODE "947")
(:DDIGITS "2"))
((:COUNTRY "SWITZERLAND")
(:NAME "Swiss Franc")
(:ACODE "CHF")
(:NCODE "756")
(:DDIGITS "2"))
((:COUNTRY "SWITZERLAND")
(:NAME "WIR Franc")
(:ACODE "CHW")
(:NCODE "948")
(:DDIGITS "2"))
((:COUNTRY "SYRIAN ARAB REPUBLIC")
(:NAME "Syrian Pound")
(:ACODE "SYP")
(:NCODE "760")
(:DDIGITS "2"))
((:COUNTRY "TAIWAN, PROVINCE OF CHINA")
(:NAME "New Taiwan Dollar")
(:ACODE "TWD")
(:NCODE "901")
(:DDIGITS "2"))
((:COUNTRY "TAJIKISTAN")
(:NAME "Somoni")
(:ACODE "TJS")
(:NCODE "972")
(:DDIGITS "2"))
((:COUNTRY "TANZANIA, UNITED REPUBLIC OF")
(:NAME "Tanzanian Shilling")
(:ACODE "TZS")
(:NCODE "834")
(:DDIGITS "2"))
((:COUNTRY "THAILAND")
(:NAME "Baht")
(:ACODE "THB")
(:NCODE "764")
(:DDIGITS "2"))
((:COUNTRY "TIMOR-LESTE")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "TOGO")
(:NAME "CFA Franc BCEAO")
(:ACODE "XOF")
(:NCODE "952")
(:DDIGITS "0"))
((:COUNTRY "TOKELAU")
(:NAME "New Zealand Dollar")
(:ACODE "NZD")
(:NCODE "554")
(:DDIGITS "2"))
((:COUNTRY "TONGA")
(:NAME "Pa’anga")
(:ACODE "TOP")
(:NCODE "776")
(:DDIGITS "2"))
((:COUNTRY "TRINIDAD AND TOBAGO")
(:NAME "Trinidad and Tobago Dollar")
(:ACODE "TTD")
(:NCODE "780")
(:DDIGITS "2"))
((:COUNTRY "TUNISIA")
(:NAME "Tunisian Dinar")
(:ACODE "TND")
(:NCODE "788")
(:DDIGITS "3"))
((:COUNTRY "TURKEY")
(:NAME "Turkish Lira")
(:ACODE "TRY")
(:NCODE "949")
(:DDIGITS "2"))
((:COUNTRY "TURKMENISTAN")
(:NAME "Turkmenistan New Manat")
(:ACODE "TMT")
(:NCODE "934")
(:DDIGITS "2"))
((:COUNTRY "TURKS AND CAICOS ISLANDS")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "TUVALU")
(:NAME "Australian Dollar")
(:ACODE "AUD")
(:NCODE "036")
(:DDIGITS "2"))
((:COUNTRY "UGANDA")
(:NAME "Uganda Shilling")
(:ACODE "UGX")
(:NCODE "800")
(:DDIGITS "0"))
((:COUNTRY "UKRAINE")
(:NAME "Hryvnia")
(:ACODE "UAH")
(:NCODE "980")
(:DDIGITS "2"))
((:COUNTRY "UNITED ARAB EMIRATES")
(:NAME "UAE Dirham")
(:ACODE "AED")
(:NCODE "784")
(:DDIGITS "2"))
((:COUNTRY "UNITED KINGDOM")
(:NAME "Pound Sterling")
(:ACODE "GBP")
(:NCODE "826")
(:DDIGITS "2"))
((:COUNTRY "UNITED STATES")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "UNITED STATES")
(:NAME "US Dollar (Next day)")
(:ACODE "USN")
(:NCODE "997")
(:DDIGITS "2"))
((:COUNTRY "UNITED STATES")
(:NAME "US Dollar (Same day)")
(:ACODE "USS")
(:NCODE "998")
(:DDIGITS "2"))
((:COUNTRY "UNITED STATES MINOR OUTLYING ISLANDS")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "URUGUAY")
(:NAME "Uruguay Peso en Unidades Indexadas (URUIURUI)")
(:ACODE "UYI")
(:NCODE "940")
(:DDIGITS "0"))
((:COUNTRY "URUGUAY")
(:NAME "Peso Uruguayo")
(:ACODE "UYU")
(:NCODE "858")
(:DDIGITS "2"))
((:COUNTRY "UZBEKISTAN")
(:NAME "Uzbekistan Sum")
(:ACODE "UZS")
(:NCODE "860")
(:DDIGITS "2"))
((:COUNTRY "VANUATU")
(:NAME "Vatu")
(:ACODE "VUV")
(:NCODE "548")
(:DDIGITS "0"))
((:COUNTRY "VENEZUELA, BOLIVARIAN REPUBLIC OF")
(:NAME "Bolivar")
(:ACODE "VEF")
(:NCODE "937")
(:DDIGITS "2"))
((:COUNTRY "VIET NAM")
(:NAME "Dong")
(:ACODE "VND")
(:NCODE "704")
(:DDIGITS "0"))
((:COUNTRY "VIRGIN ISLANDS (BRITISH)")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "VIRGIN ISLANDS (US)")
(:NAME "US Dollar")
(:ACODE "USD")
(:NCODE "840")
(:DDIGITS "2"))
((:COUNTRY "WALLIS AND FUTUNA")
(:NAME "CFP Franc")
(:ACODE "XPF")
(:NCODE "953")
(:DDIGITS "0"))
((:COUNTRY "WESTERN SAHARA")
(:NAME "Moroccan Dirham")
(:ACODE "MAD")
(:NCODE "504")
(:DDIGITS "2"))
((:COUNTRY "YEMEN")
(:NAME "Yemeni Rial")
(:ACODE "YER")
(:NCODE "886")
(:DDIGITS "2"))
((:COUNTRY "ZAMBIA")
(:NAME "Zambian Kwacha")
(:ACODE "ZMW")
(:NCODE "967")
(:DDIGITS "2"))
((:COUNTRY "ZIMBABWE")
(:NAME "Zimbabwe Dollar")
(:ACODE "ZWL")
(:NCODE "932")
(:DDIGITS "2"))
((:COUNTRY "ZZ01_Bond Markets Unit European_EURCO")
(:NAME "Bond Markets Unit European Composite Unit (EURCO)")
(:ACODE "XBA")
(:NCODE "955")
(:DDIGITS "N.A."))
((:COUNTRY "ZZ02_Bond Markets Unit European_EMU-6")
(:NAME "Bond Markets Unit European Monetary Unit (E.M.U.-6)")
(:ACODE "XBB")
(:NCODE "956")
(:DDIGITS "N.A."))
((:COUNTRY "ZZ03_Bond Markets Unit European_EUA-9")
(:NAME "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)")
(:ACODE "XBC")
(:NCODE "957")
(:DDIGITS "N.A."))
((:COUNTRY "ZZ04_Bond Markets Unit European_EUA-17")
(:NAME "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)")
(:ACODE "XBD")
(:NCODE "958")
(:DDIGITS "N.A."))
((:COUNTRY "ZZ06_Testing_Code")
(:NAME "Codes specifically reserved for testing purposes")
(:ACODE "XTS")
(:NCODE "963")
(:DDIGITS "N.A."))
((:COUNTRY "ZZ07_No_Currency")
(:NAME "The codes assigned for transactions where no currency is involved")
(:ACODE "XXX")
(:NCODE "999")
(:DDIGITS "N.A."))
((:COUNTRY "ZZ08_Gold")
(:NAME "Gold")
(:ACODE "XAU")
(:NCODE "959")
(:DDIGITS "N.A."))
((:COUNTRY "ZZ09_Palladium")
(:NAME "Palladium")
(:ACODE "XPD")
(:NCODE "964")
(:DDIGITS "N.A."))
((:COUNTRY "ZZ10_Platinum")
(:NAME "Platinum")
(:ACODE "XPT")
(:NCODE "962")
(:DDIGITS "N.A."))
((:COUNTRY "ZZ11_Silver")
(:NAME "Silver")
(:ACODE "XAG")
(:NCODE "961")
(:DDIGITS "N.A.")))
do (destructuring-bind ((lab1 country)
(lab2 ccy-name)
(lab3 acode)
(lab4 ncode)
(lab5 ddigits))
val
(declare (ignore lab1 lab2 lab3 lab4 lab5))
(let ((cd (gethash acode *currency-data*)))
(if cd
(setf (slot-value cd 'country)
(cons country (ccy-country cd)))
(setf (gethash acode *currency-data*)
(make-instance 'currency-data
:country (list country)
:name ccy-name
:acode acode
:ncode ncode
:ddigits ddigits)))))))
(defgeneric lookup-currency (ccy))
(defmethod lookup-currency ((ccy string))
(gethash ccy *currency-data*))
(defmethod lookup-currency ((ccy symbol))
(gethash (normalize-currency-designator ccy) *currency-data*))
(defgeneric currency-data (ccy query))
(defmethod currency-data (ccy (query (eql :ddigits)))
(let ((cd (lookup-currency ccy)))
(when ccy (ccy-ddigits cd))))
(defmethod currency-data (ccy (query (eql :country)))
(let ((cd (lookup-currency ccy)))
(when ccy (ccy-country cd))))
(defmethod currency-data (ccy (query (eql :name)))
(let ((cd (lookup-currency ccy)))
(when ccy (ccy-name cd))))
(defmethod currency-data (ccy (query (eql :ncode)))
(let ((cd (lookup-currency ccy)))
(when ccy (ccy-ncode cd))))
Something went wrong with that request. Please try again.