https://github.com/murf-y/lbp-dollarrate-api
Free to use API for the current unofficial dollar rate to LBP from the black market in Lebanon.
https://github.com/murf-y/lbp-dollarrate-api
api fastapi python3
Last synced: about 1 year ago
JSON representation
Free to use API for the current unofficial dollar rate to LBP from the black market in Lebanon.
- Host: GitHub
- URL: https://github.com/murf-y/lbp-dollarrate-api
- Owner: Murf-y
- License: mit
- Created: 2022-05-22T10:38:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-07T07:13:07.000Z (almost 4 years ago)
- Last Synced: 2025-03-26T05:33:25.434Z (about 1 year ago)
- Topics: api, fastapi, python3
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dollar Rate API 📈
A FASTAPI that returns the current ```unofficial``` dollar rate from the black market.
It uses [FASTAPI](https://fastapi.tiangolo.com/) server hosted on [render](https://render.com).
# How to use 🔍️
Send a ```GET``` request to the following URL to get the current dollar rate:
https://rate.onrender.com/api/v1/dollarRate
The format of the response is JSON, as follows:
```
{
"buy_rate":"number",
"sell_rate":"number"
}
```
Currently their is only one endpoint ```/api/v1/dollarRate```, but there will be more in the future, for sayrfa rate and other currencies.
# How it works ✨
The API uses a web scraper ```BeautifulSoup``` to get the current dollar rate from the black market. The scrapper runs on every request, it scrapes the data from: ```https://lbprate.com/``` and returns the data, then the API returns the scraped data.
# How to run 🚀
For the Packages:
```
pip install -r requirements.txt
```
To run the server:
```
uvicorn main:app
```
# Contributing 💡
For any issues or suggestions, please open an issue on this Github repository. Contributors are welcome!
# License 📄
This project is licensed under the MIT license. See the LICENSE file for more information.