| Crates.io | finance-query |
| lib.rs | finance-query |
| version | 2.1.0 |
| created_at | 2025-12-31 00:10:46.453745+00 |
| updated_at | 2026-01-12 23:06:02.833907+00 |
| description | A Rust library for querying financial data |
| homepage | https://github.com/Verdenroz/finance-query |
| repository | https://github.com/Verdenroz/finance-query |
| max_upload_size | |
| id | 2013663 |
| size | 1,371,391 |
Rust library, CLI, and HTTP server for querying financial data.
Free hosted version at finance-query.com:
# Get a quote
curl "https://finance-query.com/v2/quote/AAPL"
# Real-time streaming
wscat -c "wss://finance-query.com/v2/stream"
finance-query) - Rust crate for programmatic access to Yahoo Financefinance-query-cli) - Command-line tool for market data, technical analysis, and backtestingfinance-query-server) - HTTP REST API and WebSocket serverfinance-query-derive) - Procedural macros for Polars DataFrame integrationAdd to your Cargo.toml:
[dependencies]
finance-query = "2.0"
# Or with DataFrame support (Polars integration)
finance-query = { version = "2.0", features = ["dataframe"] }
Basic usage:
use finance_query::Ticker;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let ticker = Ticker::new("AAPL").await?;
let quote = ticker.quote(true).await?;
println!("{}: ${}", quote.short_name, quote.regular_market_price);
Ok(())
}
Install fq (the command-line tool):
# Pre-built binary (Linux/macOS)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Verdenroz/finance-query/releases/latest/download/finance-query-cli-installer.sh | sh
# Or from crates.io
cargo install finance-query-cli
Quick examples:
fq quote AAPL MSFT GOOGL # Get quotes
fq stream AAPL TSLA NVDA # Live prices
fq chart AAPL -r 6mo # Interactive price chart
fq indicator AAPL --indicator rsi:14 # Technical indicators
fq backtest AAPL --preset swing # Strategy backtesting
fq dashboard # Market dashboard
fq alerts add AAPL price-above:200 # Price alerts with notifications
See finance-query-cli/README.md for full documentation.
Run the server locally (requires Rust):
git clone https://github.com/Verdenroz/finance-query.git
cd finance-query
make serve # Compiles and runs v2 server
Or run both v1 and v2 with Docker Compose:
make docker-compose # Starts v1 (port 8002), v2 (port 8001), Redis, and Nginx
The v2 server provides REST endpoints at /v2/* and WebSocket streaming at /v2/stream.
Package guides:
Full documentation at verdenroz.github.io/finance-query:
API Documentation:
The original Python implementation is available in the v1/ directory. It is no longer actively maintained but remains available for reference.
We welcome contributions! See the Contributing Guide for setup instructions and development workflow.
make install-dev # Set up development environment
make test-fast # Run tests
make fix # Auto-fix formatting and linting
This project relies on Yahoo Finance's publicly available data. We are grateful to Yahoo for providing this data.
Special thanks to yfinance, the popular Python library that inspired this project. Many of the API patterns and data structures are adapted from yfinance's excellent work.
MIT License - see LICENSE for details.