A high-performance financial data API built with Rust and Actix-Web
A high-performance financial data API built with Rust and Actix-Web, providing real-time stock quotes, historical data, financial statements, news, and more from Yahoo Finance.
1
2
3
4
5
6
7
8
9
10
# Clone the repository
git clone https://github.com/Verdenroz/finance-query-rust.git
cd finance-query-rust
# For development
# Run the script
./start.sh
# Checking for errors after making changes
cargo check
The API will be available at http://localhost:8080 in development
The API will be available at https://api.tradstry.com in production
GET /health - Comprehensive health checkGET /ping - Basic health checkGET /v1/quotes?symbols=AAPL,MSFT - Get stock quotesGET /v1/simple-quotes?symbols=AAPL - Simplified quotesGET /v1/historical/{symbol} - Historical price dataGET /v1/search?q=apple - Search for symbolsGET /v1/indices - Market indicesGET /v1/actives - Most active stocksGET /v1/gainers - Top gainersGET /v1/losers - Top losersGET /v1/sectors - Sector performanceGET /v1/financials/{symbol} - Financial statementsGET /v1/earnings/{symbol}/calls - Earnings callsGET /v1/earnings/{symbol}/transcript - Earnings transcriptsGET /v1/holders/{symbol}/major - Major holdersGET /v1/analysis/{symbol}/recommendations - Analyst recommendationsGET /v1/news - Financial newsWS /v1/ws/quotes - Real-time quotesWS /v1/ws/indices - Real-time indicesWS /v1/ws/movers - Real-time moversWS /v1/ws/news - Real-time newsWS /v1/ws/profile/{symbol} - Real-time profile updatesAll environment variables are optional. The application will run with sensible defaults if not provided.
| Variable | Description | Default |
|---|---|---|
REDIS_URL |
External Redis connection string (e.g., Sevalla Redis) | None |
RATE_LIMIT_PER_DAY |
Daily request limit per IP | 10000 |
PROXY_URL |
Proxy server URL for HTTP requests | None |
RUST_LOG |
Logging level (trace/debug/info/warn/error) | info |
REDIS_URL (if using Redis)RATE_LIMIT_PER_DAY (optional)RUST_LOG (optional)The application will automatically build and deploy.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please see Contributing Guide for guidelines.