A comprehensive API wrapper for the vnstock Python library that provides both REST and GraphQL APIs for accessing Vietnamese stock market data.
This project aims to create a robust API service that exposes the functionality of the vnstock Python library through standardized REST and GraphQL interfaces. It includes authentication via API keys, rate limiting, and comprehensive documentation.
- REST API: Access all vnstock library functions through RESTful endpoints
- GraphQL API: Flexible data querying with GraphQL
- API Key Authentication: Track usage and implement rate limiting
- Caching: Redis-based caching for frequently accessed data
- Data Persistence: Historical data stored in Supabase/PostgreSQL
- Documentation: Comprehensive OpenAPI documentation and GraphQL Explorer
- High Test Coverage: Maintaining >85% code coverage
- Serverless Deployment: Optimized for serverless environments with external managed services
- Implementation of REST API endpoints exposing vnstock functionality
- OpenAPI documentation and interactive UI
- Testing with >85% code coverage
- GraphQL API implementation
- Schema design and resolvers
- GraphQL Explorer for interactive queries
- GraphQL documentation
- External Redis service integration for caching frequently accessed data
- Supabase/PostgreSQL for historical data persistence
- Query optimization
- MCP server integration for LLM interaction with the API
- AI-powered analytics and insights
- API key management system
- User registration and management
- Usage tracking and analytics
- Rate limiting and throttling
- Python: Core programming language (Python 3.12 required)
- Poetry: Dependency management
- FastAPI: API framework
- Strawberry GraphQL: GraphQL implementation
- Supabase/PostgreSQL: Database-as-a-service for persistence
- Redis Cloud: Cache-as-a-service
- Pytest: Testing framework
- Makefile: Command management
- Serverless Framework/AWS Lambda: Serverless deployment
- Python 3.12+
- Poetry
- Docker (optional, for local development)
# Clone the repository
git clone https://github.com/yourusername/vnstock-api.git
cd vnstock-api
# Install dependencies
make install
# Run development server
make devAPI documentation is available at:
- REST API:
/docs(Swagger UI) or/redoc(ReDoc) when the server is running - GraphQL API:
/graphqlfor GraphQL Explorer interface