Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rust library, CLI, and HTTP server for querying financial data.
Hosted API
Free hosted version at finance-query.com:
# Get a quote
# Real-time streaming
What's in This Repository
- Library (
finance-query) - Rust crate for programmatic access to Yahoo Finance - CLI (
finance-query-cli) - Command-line tool for market data, technical analysis, and backtesting - Server (
finance-query-server) - HTTP REST API and WebSocket server - Derive Macros (
finance-query-derive) - Procedural macros for Polars DataFrame integration
Quick Start
Library
Add to your Cargo.toml:
[]
= "2.0"
# Or with DataFrame support (Polars integration)
= { = "2.0", = ["dataframe"] }
Basic usage:
use Ticker;
async
CLI
Install fq (the command-line tool):
# Pre-built binary (Linux/macOS)
|
# Or from crates.io
Quick examples:
See finance-query-cli/README.md for full documentation.
Server
Run the server locally (requires Rust):
Or run both v1 and v2 with Docker Compose:
The v2 server provides REST endpoints at /v2/* and WebSocket streaming at /v2/stream.
Documentation
Package guides:
- CLI - Command-line tool with examples, installation, and features
- Server - REST API and WebSocket server setup and endpoints
- Derive Macros - Procedural macros for Polars DataFrame support
Full documentation at verdenroz.github.io/finance-query:
API Documentation:
- Rust Docs - Library API on docs.rs
- Crates.io - Published library
- CLI on Crates.io - Published CLI
Legacy Python Version (v1)
The original Python implementation is available in the v1/ directory. It is no longer actively maintained but remains available for reference.
Contributing
We welcome contributions! See the Contributing Guide for setup instructions and development workflow.
Acknowledgements
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.
License
MIT License - see LICENSE for details.