A FASTAPI that returns the current unofficial
dollar rate from the black market.
It uses FASTAPI server hosted on render.
Send a GET
request to the following URL to get the current dollar rate:
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.
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.
For the Packages:
pip install -r requirements.txt
To run the server:
uvicorn main:app
For any issues or suggestions, please open an issue on this Github repository. Contributors are welcome!
This project is licensed under the MIT license. See the LICENSE file for more information.