king101-bit / Stock_teller

This code get the exchange rate for USD and GBP and converts it to NGN using openexchangerates.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Currency Converter

This Python script fetches the exchange rates for USD and GBP from Open Exchange Rates and converts them to Nigerian Naira (NGN).

Prerequisites
To run this code, you will need:

Python 3.x installed on your machine An API key from Open Exchange Rates. You can sign up for a free account to get an API key. Setup Clone this repository to your local machine.

Open a terminal window and navigate to the repository directory.

Install the required dependencies by running the following command:

```python
pip install requests
```

Create a file called .env in the project directory and add the following line, replacing YOUR_API_KEY with your Open Exchange Rates API key:

```python
OER_API_KEY=YOUR_API_KEY
```

OER_API_KEY=YOUR_API_KEY Usage To run the code, simply execute the following command in your terminal:

```python
python main.py
```

About

This code get the exchange rate for USD and GBP and converts it to NGN using openexchangerates.org

License:MIT License


Languages

Language:Python 100.0%