Finance Query Rust API

A high-performance financial data API built with Rust and Actix-Web

Finance Query Rust API

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.

Features

Quick Start

Prerequisites

Installation

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

API Endpoints

Health Checks

Stock Data

Market Data

Financial Data

News

WebSockets

Documentation

Environment Variables

All 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

Deployment

Railway

  1. Connect your GitHub repository to Railway
  2. Railway will auto-detect the Rust project
  3. Set environment variables in Railway dashboard:
    • REDIS_URL (if using Redis)
    • RATE_LIMIT_PER_DAY (optional)
    • RUST_LOG (optional)

The application will automatically build and deploy.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please see Contributing Guide for guidelines.

Support