Skip to content

Free to use API for the current unofficial dollar rate to LBP from the black market in Lebanon.

Notifications You must be signed in to change notification settings

Murf-y/LBP-DollarRate-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dollar Rate API 📈

A FASTAPI that returns the current unofficial dollar rate from the black market. It uses FASTAPI server hosted on render.





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.

About

Free to use API for the current unofficial dollar rate to LBP from the black market in Lebanon.

Topics

Resources

Stars

Watchers

Forks

Languages