diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..691304456
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,9 @@
+coverage
+initdb
+node_modules
+dist
+.build
+Dockerfile
+docker-compose.yml
+.git
+.gitignore
\ No newline at end of file
diff --git a/.editorconfig b/.editorconfig
index 65a74a7a4..be859fe4c 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -9,5 +9,5 @@ end_of_line = lf
insert_final_newline = false
charset = utf-8
indent_style = space
-indent_size = 4
+indent_size = 2
trim_trailing_whitespace = true
diff --git a/.env b/.env
new file mode 100644
index 000000000..8cbc0bb4c
--- /dev/null
+++ b/.env
@@ -0,0 +1,3 @@
+HTTP_SERVER_PORT=3000
+DATABASE_URL=postgres://postgres:123456@localhost:5432
+CURRENCYAPI_API_KEY=cur_live_cuO1rc3J9p5XJE9QYRgyadj3ERuP57GKFUdt9yOh
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..b43123061
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+coverage
+node_modules
+dist
+.DS_Store
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 000000000..bbcd12cfd
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,7 @@
+node_modules
+dist
+coverage
+README.md
+README.pt.md
+tsconfig.json
+yarn.lock
\ No newline at end of file
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 000000000..eba5a682d
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,7 @@
+{
+ "semi": true,
+ "singleQuote": true,
+ "trailingComma": "es5",
+ "printWidth": 80,
+ "tabWidth": 2
+}
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..5290fc800
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+FROM node:20.14.0
+
+WORKDIR /usr/src/app
+
+COPY package.json yarn.lock ./
+
+RUN yarn install
+
+COPY . .
+
+EXPOSE 3000
+
+CMD ["yarn", "start"]
\ No newline at end of file
diff --git a/README.md b/README.md
index 22af01577..25bef45ee 100644
--- a/README.md
+++ b/README.md
@@ -1,82 +1,239 @@
# Bravo Challenge
-[[English](README.md) | [Portuguese](README.pt.md)]
+## Descrição
+
+Esta é uma API para conversão monetária. Ela suporta conversões entre diversas moedas, incluindo moedas fiduciárias, criptomoedas e moedas fictícias. A moeda de lastro utilizada é o USD, e as cotações foram obtidas de APIs públicas para garantir que sejam reais e atuais.
+
+A solução foi desenvolvida utilizando, TDD, DDD, Ports & Adapters, Clean Architecture, design-patterns e outras estratégias arquiteturais. Sei que essa arquitetura pode ser considerada demasiadamente robusta para um projeto tão pequeno, mas o intuito é mostrar o que tenho em minha "caixa de ferramentas" e também dar a vocês material de análise de minha forma de codificar. No dia a dia gosto de dimensionar a solução de software para alcançar o melhor proveito no negócio.
+
+## Tecnologias Utilizadas
+
+- Node.js
+- TypeScript
+- Express
+- Hapi
+- Swagger UI
+- PostgreSQL
+- Docker
+- Jest
+
+## Endpoints
+
+Indico fortemente a utilização do swagger para consultar a documentação da API e também para executar as requests. Essa documentação pode ser acessada no endereço `http://locahost:3000/api-docs`, mas caso queira ou precise testar utilizando uma ferramenta de requisições http como Postman, o endereço base para as requisições é o `http://localhost:3000/api/v1`.
+
+### Lista Paginada de Moedas
+
+Este endpoint não foi solicitado no desafio mas decidi fazer para ter um bom exemplo da utilização de CQRS. Eu fiz a _query_ do _[ GET ] /currencies/{code}_ também mas ela sozinha não realça as vantagens da separação de comandos e consultas. É importante também mencionar que este endpoint apenas estará disponível se o projeto for inicializado com `yarn start` ou `yarn dev`. O único objetivo desse comportamento é mostrar que as rotas também são configuráveis sem afetar a aplicação.
+
+`[ GET ] /currencies`
+
+```json
+// query
+{
+ "currencies": [], // Código das moedas a serem filtradas
+ "page": 1, // Página corrente
+ "perPage": 10, // Quantidade de registros por página
+ "sortBy": "name", // Campo pelo qual a consulta será ordenada
+ "sortOrder": "asc", // Direção da ordenação
+}
+```
+
+```json
+// response schema
+{
+ "meta": {
+ "page": 0,
+ "perPage": 0,
+ "pageCount": 0,
+ "totalCount": 0
+ },
+ "data": [
+ {
+ "id": "string",
+ "name": "string",
+ "code": "string",
+ "symbol": "string",
+ "decimalDigits": 0,
+ "rate": 0.1
+ }
+ ]
+}
+```
+
+### Adiciona uma nova moeda
+
+O desafio não define ou esclarece quem utilizará essa API, então pensando em praticidade, ao invés de pedir o _rate_ (valor proporcional de uma moeda em relação à moeda de lastro), que resultaria em um cadastro simples, eu preferi solicitar o valor da nova moeda bem como de uma moeda equivalente. Podemos inclusive seguir o exemplo citado no desafio do cadastro de uma moeda fictícia do GTA onde \$ 1.250.000,00 no jogo custam R$ 83,50 no mundo real. Com isso calculamos o valor proporcional da moeda em dólar.
+
+`[ POST ] /currencies`
+
+```json
+// body
+{
+ "name": "Grand Theft Auto Dollar",
+ "code": "GTA",
+ "symbol": "GTA$",
+ "baseAmount": 1250000.00,
+ "equivalentCurrencyAmount": 83.50,
+ "equivalentCurrencyCode": "BRL"
+}
+```
+
+```json
+// response schema
+{
+ "currencyId": "string"
+}
+```
+
+### Converte uma moeda em outra
+
+A descrição do desafio propõe a API de conversão de moeda mas não diz como deve ser seu retorno. Por isso tomei a liberdade de devolver um objeto com algumas informações que julguei serem uteis em uma API real de conversão.
+
+`[ POST ] /currencies/convert`
+
+```json
+// query
+{
+ "from": "string",
+ "to": "string",
+ "amount": 0.1,
+}
+```
+
+```json
+// response schema
+{
+ "from": "string",
+ "to": "string",
+ "givenAmount": 0.1,
+ "convertedAmount": 0.1,
+ "convertedAmountFormatted": "string",
+ "decimalDigits": 0,
+ "symbol": "string"
+}
+```
+
+### Recupera uma moeda específica
+
+Esse endpoint também não foi solicitado no desafio mas ele é super importante nos testes automatizado garantido que as moedas criadas na aplicação foram criadas corretamente.
+
+`[ GET ] /currencies/{code}`
+
+```json
+// param
+{
+ "code": "string",
+}
+```
+
+```json
+// response schema
+{
+ "id": "string",
+ "name": "string",
+ "code": "string",
+ "symbol": "string",
+ "decimalDigits": 0,
+ "rate": 0.1
+}
+```
+
+### Exclui uma moeda do repositório
+
+`[ DELETE ] /currencies/{code}`
+
+Todas as configurações dessa aplicação (veja mais [aqui](#ancora1)) oferecem a possibilidade de criar e remover moedas, mas no caso das configurações que utilizam o gateway externo, apenas as novas moedas podem ser removidas.
+
+```json
+// param
+{
+ "code": "string",
+}
+```
-Build an API, which responds to JSON, for currency conversion. It must have a backing currency (USD) and make conversions between different currencies with **real and live values**.
+```json
+// response schema
+{
+ "message": "string",
+}
+```
-The API must convert between the following currencies:
-- USD
-- BRL
-- EUR
-- BTC
-- ETH
+## Como Executar
-Other coins could be added as usage.
+### Pré-requisitos
-Ex: USD to BRL, USD to BTC, ETH to BRL, etc...
+- Docker & Docker Compose (caso queira rodar com o banco de dados postgres)
+- Node
+- Yarn (opcional)
-The request must receive as parameters: The source currency, the amount to be converted and the final currency.
+### Preparação do repositório
-Ex: `?from=BTC&to=EUR&amount=123.45`
+1. Clone o repositório:
-Also build an endpoint to add and remove API supported currencies using HTTP verbs.
+```shell
+$ git clone https://github.com/hurbcom/challenge-bravo.git
+```
-The API must support conversion between FIAT, crypto and fictitious. Example: BRL->HURB, HURB->ETH
+2. Navegue até o diretório do projeto:
-"Currency is the means by which monetary transactions are effected." (Wikipedia, 2021).
+```shell
+$ cd challenge-bravo
+```
-Therefore, it is possible to imagine that new coins come into existence or cease to exist, it is also possible to imagine fictitious coins such as Dungeons & Dragons coins being used in these transactions, such as how much is a Gold Piece (Dungeons & Dragons) in Real or how much is the GTA$1 in Real.
+3. Acesse a branch que criei com a solução do desafio:
-Let's consider the PSN quote where GTA$1,250,000.00 cost R$83.50 we clearly have a relationship between the currencies, so it is possible to create a quote. (Playstation Store, 2021).
+```shell
+$ git checkout 'leandro/challenge-implementation'
+```
-Ref:
-Wikipedia [Institutional Website]. Available at: . Accessed on: 28 April 2021.
-Playstation Store [Virtual Store]. Available at: . Accessed on: 28 April 2021.
+### Passos para rodar a aplicação no Docker
-You can use any programming language for the challenge. Below is the list of languages that we here at Hurb have more affinity:
+1. Construa e inicie os containers Docker:
-- JavaScript (NodeJS)
-- Python
-- Go
-- Ruby
-- C++
-- PHP
+```shell
+$ docker-compose build
+...
+$ docker-compose up
+```
-## Requirements
+* _Para parar a aplicação execute ctrl+D no terminal_
+* _Para parar o container execute `docker-compose down`_
-- Fork this challenge and create your project (or workspace) using your version of that repository, as soon as you finish the challenge, submit a _pull request_.
- - If you have any reason not to submit a _pull request_, create a private repository on Github, do every challenge on the **main** branch and don't forget to fill in the `pull-request.txt` file. As soon as you finish your development, add the user `automator-hurb` to your repository as a contributor and make it available for at least 30 days. **Do not add the `automator-hurb` until development is complete.**
- - If you have any problem creating the private repository, at the end of the challenge fill in the file called `pull-request.txt`, compress the project folder - including the `.git` folder - and send it to us by email.
-- The code needs to run on macOS or Ubuntu (preferably as a Docker container)
-- To run your code, all you need to do is run the following commands:
- - git clone \$your-fork
- - cd \$your-fork
- - command to install dependencies
- - command to run the application
-- The API can be written with or without the help of _frameworks_
- - If you choose to use a _framework_ that results in _boilerplate code_, mark in the README which piece of code was written by you. The more code you make, the more content we will have to rate.
-- The API needs to support a volume of 1000 requests per second in a stress test.
-- The API needs to include real and current quotes through integration with public currency quote APIs
+### Passos para rodar a aplicação localmente
-## Evaluation criteria
+1. Instale as dependências
-- **Organization of code**: Separation of modules, view and model, back-end and front-end
-- **Clarity**: Does the README explain briefly what the problem is and how can I run the application?
-- **Assertiveness**: Is the application doing what is expected? If something is missing, does the README explain why?
-- **Code readability** (including comments)
-- **Security**: Are there any clear vulnerabilities?
-- **Test coverage** (We don't expect full coverage)
-- **History of commits** (structure and quality)
-- **UX**: Is the interface user-friendly and self-explanatory? Is the API intuitive?
-- **Technical choices**: Is the choice of libraries, database, architecture, etc. the best choice for the application?
+```sh
+$ yarn install
+```
-## Doubts
+2. Inicie o banco de dados via docker-compose
-Any questions you may have, check the [_issues_](https://github.com/HurbCom/challenge-bravo/issues) to see if someone hasn't already and if you can't find your answer, open one yourself. new issue!
+```sh
+$ docker-compose up db
+```
-Godspeed! ;)
+1. Inicie a aplicação
-
-
-
+```sh
+$ yarn start
+```
+
+* _Para parar a aplicação execute ctrl+D no terminal_
+
+
+
+> Há ainda outros scripts de inicialização que podem ser utilizados. Cada um sobe o servidor com uma configuração diferente:
+> - `start` ou `dev`: Inicia o servidor express com swagger UI e repositório postgres que roda no docker;
+> - `dev:express+fake`: Iniciar o servidor express com swagger UI e Repositório em memória;
+> - `dev:hapi+fake`: Inicia o servidor hapi com repositório em memória;
+> - `dev:express+gw-on`: Inicia o servidor express com swagger UI e o repositório utiliza o gateway currencyapi.com para ter a contação do dia de forma online.
+> - `dev:express+gw-off`: Inicia o servidor express com swagger UI e simula a requisição para o gatewayapi.com (para fins de testes sem fazer requisições reais pois são liberadas apenas 300 requisições/mês)
+
+### Executar testes
+
+```sh
+$ yarn test
+```
+- Também pode ser utilizado o `yarn test:watch` que roda os testes com a flag `--watch`.
\ No newline at end of file
diff --git a/challenge-README.md b/challenge-README.md
new file mode 100644
index 000000000..22af01577
--- /dev/null
+++ b/challenge-README.md
@@ -0,0 +1,82 @@
+# Bravo Challenge
+
+[[English](README.md) | [Portuguese](README.pt.md)]
+
+Build an API, which responds to JSON, for currency conversion. It must have a backing currency (USD) and make conversions between different currencies with **real and live values**.
+
+The API must convert between the following currencies:
+
+- USD
+- BRL
+- EUR
+- BTC
+- ETH
+
+Other coins could be added as usage.
+
+Ex: USD to BRL, USD to BTC, ETH to BRL, etc...
+
+The request must receive as parameters: The source currency, the amount to be converted and the final currency.
+
+Ex: `?from=BTC&to=EUR&amount=123.45`
+
+Also build an endpoint to add and remove API supported currencies using HTTP verbs.
+
+The API must support conversion between FIAT, crypto and fictitious. Example: BRL->HURB, HURB->ETH
+
+"Currency is the means by which monetary transactions are effected." (Wikipedia, 2021).
+
+Therefore, it is possible to imagine that new coins come into existence or cease to exist, it is also possible to imagine fictitious coins such as Dungeons & Dragons coins being used in these transactions, such as how much is a Gold Piece (Dungeons & Dragons) in Real or how much is the GTA$1 in Real.
+
+Let's consider the PSN quote where GTA$1,250,000.00 cost R$83.50 we clearly have a relationship between the currencies, so it is possible to create a quote. (Playstation Store, 2021).
+
+Ref:
+Wikipedia [Institutional Website]. Available at: . Accessed on: 28 April 2021.
+Playstation Store [Virtual Store]. Available at: . Accessed on: 28 April 2021.
+
+You can use any programming language for the challenge. Below is the list of languages that we here at Hurb have more affinity:
+
+- JavaScript (NodeJS)
+- Python
+- Go
+- Ruby
+- C++
+- PHP
+
+## Requirements
+
+- Fork this challenge and create your project (or workspace) using your version of that repository, as soon as you finish the challenge, submit a _pull request_.
+ - If you have any reason not to submit a _pull request_, create a private repository on Github, do every challenge on the **main** branch and don't forget to fill in the `pull-request.txt` file. As soon as you finish your development, add the user `automator-hurb` to your repository as a contributor and make it available for at least 30 days. **Do not add the `automator-hurb` until development is complete.**
+ - If you have any problem creating the private repository, at the end of the challenge fill in the file called `pull-request.txt`, compress the project folder - including the `.git` folder - and send it to us by email.
+- The code needs to run on macOS or Ubuntu (preferably as a Docker container)
+- To run your code, all you need to do is run the following commands:
+ - git clone \$your-fork
+ - cd \$your-fork
+ - command to install dependencies
+ - command to run the application
+- The API can be written with or without the help of _frameworks_
+ - If you choose to use a _framework_ that results in _boilerplate code_, mark in the README which piece of code was written by you. The more code you make, the more content we will have to rate.
+- The API needs to support a volume of 1000 requests per second in a stress test.
+- The API needs to include real and current quotes through integration with public currency quote APIs
+
+## Evaluation criteria
+
+- **Organization of code**: Separation of modules, view and model, back-end and front-end
+- **Clarity**: Does the README explain briefly what the problem is and how can I run the application?
+- **Assertiveness**: Is the application doing what is expected? If something is missing, does the README explain why?
+- **Code readability** (including comments)
+- **Security**: Are there any clear vulnerabilities?
+- **Test coverage** (We don't expect full coverage)
+- **History of commits** (structure and quality)
+- **UX**: Is the interface user-friendly and self-explanatory? Is the API intuitive?
+- **Technical choices**: Is the choice of libraries, database, architecture, etc. the best choice for the application?
+
+## Doubts
+
+Any questions you may have, check the [_issues_](https://github.com/HurbCom/challenge-bravo/issues) to see if someone hasn't already and if you can't find your answer, open one yourself. new issue!
+
+Godspeed! ;)
+
+
+
+
diff --git a/README.pt.md b/challenge-README.pt.md
similarity index 100%
rename from README.pt.md
rename to challenge-README.pt.md
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 000000000..a1d80f216
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,28 @@
+version: '3.9'
+
+services:
+ app:
+ build: .
+ ports:
+ - '3000:3000'
+ environment:
+ NODE_ENV: development
+ HTTP_SERVER_PORT: 3000
+ DATABASE_URL: postgres://postgres:123456@db:5432
+ CURRENCYAPI_API_KEY: cur_live_cuO1rc3J9p5XJE9QYRgyadj3ERuP57GKFUdt9yOh
+ volumes:
+ - .:/usr/src/app
+ - /usr/src/app/node_modules
+ command: yarn dev
+ depends_on:
+ - db
+
+ db:
+ image: postgres
+ ports:
+ - '5432:5432'
+ environment:
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: 123456
+ volumes:
+ - ./initdb:/docker-entrypoint-initdb.d
diff --git a/eslint.config.mjs b/eslint.config.mjs
new file mode 100644
index 000000000..cc55f42f4
--- /dev/null
+++ b/eslint.config.mjs
@@ -0,0 +1,14 @@
+import pluginJs from '@eslint/js';
+import eslintConfigPrettier from 'eslint-config-prettier';
+import tseslint from 'typescript-eslint';
+
+export default [
+ pluginJs.configs.recommended,
+ ...tseslint.configs.recommended,
+ eslintConfigPrettier,
+ {
+ rules: {
+ '@typescript-eslint/no-explicit-any': 'off',
+ },
+ },
+];
diff --git a/initdb/init.sql b/initdb/init.sql
new file mode 100644
index 000000000..f75150455
--- /dev/null
+++ b/initdb/init.sql
@@ -0,0 +1,402 @@
+-- Drop the rate table if it exists to apply new configuration
+-- DROP TABLE IF EXISTS currency;
+-- DROP TABLE IF EXISTS rate;
+
+-- Create the currency table if it does not exist
+CREATE TABLE IF NOT EXISTS currency (
+ id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
+ code VARCHAR(10) NOT NULL UNIQUE,
+ name VARCHAR(50) NOT NULL,
+ symbol VARCHAR(10) NOT NULL,
+ decimal_digits INTEGER NOT NULL
+);
+
+-- Create the rate table if it does not exist
+CREATE TABLE IF NOT EXISTS rate (
+ id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
+ currency_id UUID NOT NULL REFERENCES currency(id) ON DELETE CASCADE,
+ rate NUMERIC(18, 10) NOT NULL,
+ updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
+ UNIQUE(currency_id, updated_at)
+);
+
+-- Insert currencies into the currency table
+-- These inserts will not execute if the currency code already exists
+
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('AED', 'United Arab Emirates Dirham', 'AED', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('AFN', 'Afghan Afghani', 'Af', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ALL', 'Albanian Lek', 'ALL', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('AMD', 'Armenian Dram', 'AMD', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ANG', 'NL Antillean Guilder', 'ƒ', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('AOA', 'Angolan Kwanza', 'Kz', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ARS', 'Argentine Peso', 'AR$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('AUD', 'Australian Dollar', 'AU$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('AWG', 'Aruban Florin', 'Afl.', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('AZN', 'Azerbaijani Manat', 'man.', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BAM', 'Bosnia-Herzegovina Convertible Mark', 'KM', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BBD', 'Barbadian Dollar', 'Bds$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BDT', 'Bangladeshi Taka', 'Tk', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BGN', 'Bulgarian Lev', 'BGN', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BHD', 'Bahraini Dinar', 'BD',3) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BIF', 'Burundian Franc', 'FBu', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BMD', 'Bermudan Dollar', 'BD$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BND', 'Brunei Dollar', 'BN$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BOB', 'Bolivian Boliviano', 'Bs', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BRL', 'Brazilian Real', 'R$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BSD', 'Bahamian Dollar', 'B$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BTN', 'Bhutanese Ngultrum', 'Nu.', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BWP', 'Botswanan Pula', 'BWP', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BYN', 'Belarusian ruble', 'Br', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BYR', 'Belarusian Ruble', 'BYR', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BZD', 'Belize Dollar', 'BZ$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CAD', 'Canadian Dollar', 'CA$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CDF', 'Congolese Franc', 'CDF', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CHF', 'Swiss Franc', 'CHF', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CLF', 'Unidad de Fomento', 'UF', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CLP', 'Chilean Peso', 'CL$', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CNY', 'Chinese Yuan', 'CN¥', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('COP', 'Coombian Peso', 'CO$', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CRC', 'Costa Rican Colón', '₡', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CUC', 'Cuban Convertible Peso', 'CUC$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CUP', 'Cuban Peso', '$MN', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CVE', 'Cape Verdean Escudo', 'CV$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('CZK', 'Czech Republic Koruna', 'Kč', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('DJF', 'Djiboutian Franc', 'Fdj', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('DKK', 'Danish Krone', 'Dkr', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('DOP', 'Dominican Peso', 'RD$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('DZD', 'Algerian Dinar', 'DA', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('EGP', 'Egyptian Pound', 'EGP', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ERN', 'Eritrean Nakfa', 'Nfk', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ETB', 'Ethiopian Birr', 'Br', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('EUR', 'Euro', '€', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('FJD', 'Fijian Dollar', 'FJ$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('FKP', 'Falkland Islands Pound', 'FK£', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('GBP', 'British Pound Sterling', '£', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('GEL', 'Georgian Lari', 'GEL', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('GGP', 'Guernsey pound', '£', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('GHS', 'Ghanaian Cedi', 'GH₵', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('GIP', 'Gibraltar Pound', '£', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('GMD', 'Gambian Dalasi', 'D', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('GNF', 'Guinean Franc', 'FG', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('GTQ', 'Guatemalan Quetzal', 'GTQ', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('GYD', 'Guyanaese Dollar', 'G$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('HKD', 'Hong Kong Dollar', 'HK$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('HNL', 'Honduran Lempira', 'HNL', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('HRK', 'Croatian Kuna', 'kn', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('HTG', 'Haitian Gourde', 'G', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('HUF', 'Hungarian Forint', 'Ft', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('IDR', 'Indonesian Rupiah', 'Rp', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ILS', 'Israeli New Sheqel', '₪', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('IMP', 'Manx pound', '£', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('INR', 'Indian Rupee', 'Rs', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('IQD', 'Iraqi Dinar', 'IQD', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('IRR', 'Iranian Rial', 'IRR', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ISK', 'Icelandic Króna', 'Ikr', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('JEP', 'Jersey pound', '£', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('JMD', 'Jamaican Dollar', 'J$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('JOD', 'Jordanian Dinar', 'JD',3) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('JPY', 'Japanese Yen', '¥', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('KES', 'Kenyan Shilling', 'Ksh', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('KGS', 'Kyrgystani Som', 'KGS', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('KHR', 'Cambodian Riel', 'KHR', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('KMF', 'Comorian Franc', 'CF', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('KPW', 'North Korean Won', '₩', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('KRW', 'South Korean Won', '₩', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('KWD', 'Kuwaiti Dinar', 'KD',3) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('KYD', 'Cayman Islands Dollar', 'CI$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('KZT', 'Kazakhstani Tenge', 'KZT', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('LAK', 'Laotian Kip', '₭N', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('LBP', 'Lebanese Pound', 'LB£', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('LKR', 'Sri Lankan Rupee', 'SLRs', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('LRD', 'Liberian Dollar', 'LD$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('LSL', 'Lesotho Loti', 'L', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('LTL', 'Lithuanian Litas', 'Lt', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('LVL', 'Latvian Lats', 'Ls', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('LYD', 'Libyan Dinar', 'LD',3) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MAD', 'Moroccan Dirham', 'MAD', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MDL', 'Moldovan Leu', 'MDL', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MGA', 'Malagasy Ariary', 'MGA', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MKD', 'Macedonian Denar', 'MKD', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MMK', 'Myanma Kyat', 'MMK', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MNT', 'Mongolian Tugrik', '₮', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MOP', 'Macanese Pataca', 'MOP$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MRO', 'Mauritanian ouguiya', 'UM', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MUR', 'Mauritian Rupee', 'MURs', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MVR', 'Maldivian Rufiyaa', 'MRf', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MWK', 'Malawian Kwacha', 'MK', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MXN', 'Mexican Peso', 'MX$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MYR', 'Malaysian Ringgit', 'RM', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MZN', 'Mozambican Metical', 'MTn', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('NAD', 'Namibian Dollar', 'N$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('NGN', 'Nigerian Naira', '₦', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('NIO', 'Nicaraguan Córdoba', 'C$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('NOK', 'Norwegian Krone', 'Nkr', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('NPR', 'Nepalese Rupee', 'NPRs', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('NZD', 'New Zealand Dollar', 'NZ$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('OMR', 'Omani Rial', 'OMR',3) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('PAB', 'Panamanian Balboa', 'B/.', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('PEN', 'Peruvian Nuevo Sol', 'S/.', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('PGK', 'Papua New Guinean Kina', 'K', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('PHP', 'Philippine Peso', '₱', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('PKR', 'Pakistani Rupee', 'PKRs', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('PLN', 'Polish Zloty', 'zł', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('PYG', 'Paraguayan Guarani', '₲', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('QAR', 'Qatari Rial', 'QR', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('RON', 'Romanian Leu', 'RON', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('RSD', 'Serbian Dinar', 'din.', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('RUB', 'Russian Ruble', 'RUB', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('RWF', 'Rwandan Franc', 'RWF', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SAR', 'Saudi Riyal', 'SR', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SBD', 'Solomon Islands Dollar', 'SI$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SCR', 'Seychellois Rupee', 'SRe', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SDG', 'Sudanese Pound', 'SDG', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SEK', 'Swedish Krona', 'Skr', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SGD', 'Singapore Dollar', 'S$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SHP', 'Saint Helena Pound', '£', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SLL', 'Sierra Leonean Leone', 'Le', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SOS', 'Somali Shilling', 'Ssh', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SRD', 'Surinamese Dollar', '$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('STD', 'São Tomé and Príncipe dobra', 'Db', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SVC', 'Salvadoran Colón', '₡', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SYP', 'Syrian Pound', 'SY£', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SZL', 'Swazi Lilangeni', 'L', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('THB', 'Thai Baht', '฿', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('TJS', 'Tajikistani Somoni', 'TJS', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('TMT', 'Turkmenistani Manat', 'T', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('TND', 'Tunisian Dinar', 'DT',3) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('TOP', 'Tongan Paʻanga', 'T$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('TRY', 'Turkish Lira', 'TL', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('TTD', 'Trinidad and Tobago Dollar', 'TT$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('TWD', 'New Taiwan Dollar', 'NT$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('TZS', 'Tanzanian Shilling', 'TSh', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('UAH', 'Ukrainian Hryvnia', '₴', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('UGX', 'Ugandan Shilling', 'USh', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('USD', 'US Dollar', '$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('UYU', 'Uruguayan Peso', '$U', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('UZS', 'Uzbekistan Som', 'UZS', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('VEF', 'Venezuelan Bolívar', 'Bs.F.', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('VND', 'Vietnamese Dong', '₫', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('VUV', 'Vanuatu Vatu', 'VUV', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('WST', 'Samoan Tala', 'WS$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XAF', 'CFA Franc BEAC', 'FCFA', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XAG', 'Silver Ounce', 'XAG', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XAU', 'Gold Ounce', 'XAU', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XCD', 'East Caribbean Dollar', 'EC$', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XDR', 'Special drawing rights', 'SDR', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XOF', 'CFA Franc BCEAO', 'CFA', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XPF', 'CFP Franc', 'CFP', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('YER', 'Yemeni Rial', 'YR', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ZAR', 'South African Rand', 'R', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ZMK', 'Zambian Kwacha', 'ZK', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ZMW', 'Zambian Kwacha', 'ZK', 0) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ZWL', 'Zimbabwean dollar', 'ZWL', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XPT', 'Platinum Ounce', 'XPT',6) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XPD', 'Palladium Ounce', 'XPD',6) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BTC', 'Bitcoin', '₿',8) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ETH', 'Ethereum', 'Ξ',18) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('BNB', 'Binance', 'BNB',8) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('XRP', 'Ripple', 'XRP',6) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('SOL', 'Solana', 'SOL',9) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('DOT', 'Polkadot', 'DOT',10) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('AVAX', 'Avalanche', 'AVAX',18) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MATIC', 'Matic Token', 'MATIC',18) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('LTC', 'Litecoin', 'Ł',8) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ADA', 'Cardano', 'ADA',6) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('USDT', 'Tether', 'USDT', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('USDC', 'USD Coin', 'USDC', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('DAI', 'Dai', 'DAI', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('ARB', 'Arbitrum', 'ARB',8) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('OP', 'Optimism', 'OP',8) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('VES', 'Venezuelan Bolívar', 'Bs.S.', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('STN', 'São Tomé and Príncipe dobra', 'STN', 2) ON CONFLICT (code) DO NOTHING;
+INSERT INTO currency (code, name, symbol, decimal_digits) VALUES ('MRU', 'Mauritanian ouguiya', 'MRU', 2) ON CONFLICT (code) DO NOTHING;
+
+-- Insert exchange rates into the rate table
+-- These inserts will not execute if the rate with the same currency_id already exists
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2.2679298487, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ADA' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.6718406559, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'AED' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 70.7904573332, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'AFN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 93.0320944204, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ALL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 387.0652417589, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'AMD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.787280302, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ANG' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 851.5743892967, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'AOA' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.0411768981, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ARB' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 901.9165772212, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ARS' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.5132802995, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'AUD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.0309532227, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'AVAX' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.79, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'AWG' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.7, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'AZN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.8167003404, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BAM' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BBD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 117.5903174764, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BDT' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.812830352, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BGN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.376, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BHD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2874.4080899246, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BIF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BMD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.0015946085, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BNB' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.3515501742, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BND' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 6.9369912102, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BOB' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 5.3570006385, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BRL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BSD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.43517e-5, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BTC' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 83.5026750681, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BTN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 13.7488325074, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BWP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.2699770637, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BYN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 32699.762594218, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BYR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'BZD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.3758702027, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CAD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2813.442771238, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CDF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.8965300987, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CHF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.0242000032, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CLF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 921.0413972452, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CLP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 7.2501309285, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CNY' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3937.3301467823, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'COP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 530.3078152726, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CRC' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CUC' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 24, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CUP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 102.4397237684, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CVE' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 22.8602433711, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'CZK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.9992989749, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'DAI' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 177.721, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'DJF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 6.9279413087, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'DKK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 59.4084267105, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'DOP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.1535316848, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'DOT' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 134.9637578508, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'DZD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 47.718617933, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'EGP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 15, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ERN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 56.9702884224, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ETB' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.0002724481, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ETH' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.9290801473, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'EUR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2.2394803828, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'FJD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.7857969946, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'FKP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.7857400856, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'GBP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2.8200704628, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'GEL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.7857970595, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'GGP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 14.9096017346, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'GHS' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.7857973594, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'GIP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 58.2027859377, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'GMD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 8587.8742589067, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'GNF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 7.758281421, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'GTQ' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 209.1970978965, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'GYD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 7.8103013923, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'HKD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 24.7146626422, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'HNL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 6.6516508793, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'HRK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 134.7838194535, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'HTG' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 364.8563849752, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'HUF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 16267.59254452, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'IDR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.7498404871, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ILS' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.78579737, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'IMP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 83.5191700278, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'INR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1308.6456434348, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'IQD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 42019.979875943, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'IRR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 139.2122370989, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ISK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.7857974327, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'JEP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 155.2491448209, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'JMD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.71, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'JOD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 157.014696987, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'JPY' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 129.3930234152, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'KES' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 86.7532661567, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'KGS' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 4112.3295097742, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'KHR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 458.5398427806, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'KMF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 900.002639873, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'KPW' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1372.7226101559, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'KRW' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.3068600384, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'KWD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.83333, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'KYD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 448.5436886523, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'KZT' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 21719.745960039, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'LAK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 89589.77614652, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'LBP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 301.8763925636, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'LKR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 194.250797033, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'LRD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 18.740072297, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'LSL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.012540671, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'LTC' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.2079216576, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'LTL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.6529558367, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'LVL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 4.8691905541, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'LYD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 9.9428813366, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MAD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.5370217613, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MATIC' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 17.6269922085, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MDL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 4480.2747953954, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MGA' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 57.3124669066, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MKD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2095.624577851, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MMK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3399.6088715777, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MNT' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 8.0643411333, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MOP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 356.999828, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MRO' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 39.5001473678, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MRU' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 46.5937585965, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MUR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 15.4579725536, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MVR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1734.397497359, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MWK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 18.55754282, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MXN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 4.7216406039, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MYR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 63.6050485402, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'MZN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 18.6629134402, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'NAD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1465.9738916374, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'NGN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 36.7972487975, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'NIO' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 10.6432812966, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'NOK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 133.0858524888, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'NPR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.6312602969, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'NZD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.3842500724, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'OMR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.4569196376, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'OP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.9988701052, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'PAB' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.7826704942, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'PEN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.8124903888, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'PGK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 58.7150182203, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'PHP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 278.478689251, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'PKR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 4.0171006006, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'PLN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 7551.7849655727, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'PYG' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.6411907088, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'QAR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 4.6227706077, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'RON' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 108.3531882033, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'RSD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 88.8936112341, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'RUB' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1301.7783053399, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'RWF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.7456707423, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SAR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 8.3580865701, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SBD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 14.8189315961, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SCR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 601.5, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SDG' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 10.476081969, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SEK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1.3524701839, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SGD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.7857401163, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SHP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 22424.082202439, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SLL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.0062829578, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SOL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 571.0236810379, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SOS' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 31.4496958362, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SRD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 22799.367791132, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'STD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 22.7993551837, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'STN' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 8.75, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SVC' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 12994.621714013, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SYP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 18.6989824867, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'SZL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 36.7206552011, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'THB' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 10.7309711957, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'TJS' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.5, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'TMT' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3.1210104046, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'TND' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2.341250381, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'TOP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 32.3123541442, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'TRY' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 6.7413709853, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'TTD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 32.4375140234, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'TWD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2593.4598939473, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'TZS' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 40.3861148848, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'UAH' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3793.8622299526, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'UGX' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 1, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'USD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.9995108127, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'USDC' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.9993678097, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'USDT' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 38.8978562435, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'UYU' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 12668.129512123, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'UZS' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 3640407.7001116, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'VEF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 36.4040600039, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'VES' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 25421.433686036, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'VND' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 119.9011334188, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'VUV' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2.7389439335, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'WST' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 609.3574609173, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XAF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.033659259, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XAG' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.0004329255, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XAU' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2.7, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XCD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.7558400986, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XDR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 609.3574713759, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XOF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.0011018596, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XPD' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 110.7528319197, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XPF' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 0.001027921, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XPT' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 2.0094059521, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'XRP' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 249.9532931212, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'YER' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 18.7007830651, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ZAR' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 9001.2, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ZMK' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 26.4433644143, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ZMW' ON CONFLICT (currency_id, updated_at) DO NOTHING;
+INSERT INTO rate (currency_id, rate, updated_at) SELECT c.id, 13.541264135, '2024-06-10T23:59:59Z' FROM currency c WHERE c.code = 'ZWL' ON CONFLICT (currency_id, updated_at) DO NOTHING;
\ No newline at end of file
diff --git a/jest.config.ts b/jest.config.ts
new file mode 100644
index 000000000..79d1967cb
--- /dev/null
+++ b/jest.config.ts
@@ -0,0 +1,11 @@
+import type { Config } from 'jest';
+
+const config: Config = {
+ preset: 'ts-jest',
+ testEnvironment: 'node',
+ moduleNameMapper: {
+ '^@/(.*)$': '/src/$1',
+ },
+};
+
+export default config;
diff --git a/package.json b/package.json
new file mode 100644
index 000000000..af331312a
--- /dev/null
+++ b/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "challenge-bravo",
+ "version": "1.0.0",
+ "main": "src/index.js",
+ "repository": "https://github.com/hurbcom/challenge-bravo.git",
+ "author": "Leandro Reis ",
+ "license": "MIT",
+ "scripts": {
+ "start": "ts-node -r tsconfig-paths/register src/main/main.ts",
+ "dev": "ts-node-dev -r tsconfig-paths/register src/main/main.ts",
+ "dev:express+fake": "ts-node-dev -r tsconfig-paths/register src/main/main-express-with-fake.ts",
+ "dev:express+gw-off": "ts-node-dev -r tsconfig-paths/register src/main/main-express-gateway-offline.ts",
+ "dev:express+gw-on": "ts-node-dev -r tsconfig-paths/register src/main/main-express-gateway-online.ts",
+ "dev:hapi+fake": "ts-node-dev -r tsconfig-paths/register src/main/main-hapi-with-fake.ts",
+ "test": "jest --detectOpenHandles",
+ "test:watch": "jest --watch --detectOpenHandles"
+ },
+ "dependencies": {
+ "@hapi/hapi": "^21.3.9",
+ "axios": "^1.7.2",
+ "crypto": "^1.0.1",
+ "currency.js": "^2.0.4",
+ "dotenv": "^16.4.5",
+ "express": "^4.19.2",
+ "pg-promise": "^11.8.0",
+ "swagger-ui-express": "^5.0.1"
+ },
+ "devDependencies": {
+ "@eslint/js": "^9.4.0",
+ "@types/express": "^4.17.21",
+ "@types/jest": "^29.5.12",
+ "@types/swagger-ui-express": "^4.1.6",
+ "eslint": "9.x",
+ "eslint-config-prettier": "^9.1.0",
+ "jest": "^29.7.0",
+ "prettier": "3.3.2",
+ "ts-jest": "^29.1.4",
+ "ts-node": "^10.9.2",
+ "ts-node-dev": "^2.0.0",
+ "tsconfig-paths": "^4.2.0",
+ "typescript": "^5.4.5",
+ "typescript-eslint": "^7.13.0"
+ }
+}
diff --git a/pull-request.txt b/pull-request.txt
index 4eae37418..e4719f04e 100644
--- a/pull-request.txt
+++ b/pull-request.txt
@@ -1,3 +1,3 @@
-Your name: ___
-Your Github homepage: ___
-Original challenge URL: http://github.com/hurbcom/challenge-___
+Your name: Leandro Reis
+Your Github homepage: https://github.com/leandroepr
+Original challenge URL: https://github.com/hurbcom/challenge-bravo
diff --git a/src/application/query/get-currency-by-code-query.ts b/src/application/query/get-currency-by-code-query.ts
new file mode 100644
index 000000000..375217a59
--- /dev/null
+++ b/src/application/query/get-currency-by-code-query.ts
@@ -0,0 +1,44 @@
+import { CurrencyNotFoundError } from '@/domain/errors';
+import { DatabaseConnection } from '@/infra/database';
+
+export class GetCurrencyByCodeQuery {
+ constructor(private readonly connection: DatabaseConnection) {}
+
+ async execute({ code }: Input): Promise