This API allows users to authenticate and retrieve historical data and forecasts for various financial symbols. It uses FastAPI and is designed to be scalable and secure.
- User authentication for secure access.
- Rate limiting to prevent abuse.
- Retrieval of historical financial market data.
- Generation of financial forecasts using the Prophet library.
- FastAPI
- Prophet for time series forecasting
- Pydantic for data validation
- JWT for authentication
- SlowAPI for request rate limiting
- Clone the repository:
git clone <repository-url>
- Install dependencies:
pip install -r requirements.txt
- Run the server:
uvicorn main:app --reload
To use the API, you first need to authenticate to obtain a token, and then you can make requests to retrieve data or forecasts:
POST /token
{
"username": "user",
"password": "password"
}
GET /api/data/{symbol}/{years}
GET /api/forecast/{symbol}/{years}/{forecast_years}
To contribute to the project, please send a pull request or open an issue to discuss proposed changes.