A Rust library and HTTP/WebSocket server for fetching financial data from Yahoo Finance.
What's in This Repository
This repository mtaintains two services:
- Library (
finance-query) - Rust crate for programmatic access to Yahoo Finance data - Server (
finance-query-server) - HTTP REST API and WebSocket server built on the library
Quick Start
Library
Add to your Cargo.toml:
[]
= "2.0"
# Or with DataFrame support (Polars integration)
= { = "2.0", = ["dataframe"] }
Basic usage:
use Ticker;
async
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
Full documentation is available at verdenroz.github.io/finance-query
- Library Guide - Getting started with the Rust library
- REST API Reference - Interactive OpenAPI documentation
- WebSocket API Reference - Real-time streaming API
- Contributing - Development setup and guidelines
Additional resources:
- Rust API Docs - Detailed API documentation on docs.rs
- Crates.io - Published crate
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.