kmantel / yfinance-api

A minimal API wrapper around yfinance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yfinance API

A (very) minimal wrapper around the yfinance library for use as a self-hosted API, using FastAPI. Currently, only querying the current market price is supported.

Basic request authentication consists of api key verification, where api keys are listed, delimited by ':' in the environment variable YFI_API_KEY on server startup.

Example

Server startup:

YFI_API_KEY='foo:bar' python server.py --cache-ttl 60

Query:

$ curl http://127.0.0.1:8080/quote/vti?token=foo
223.88

About

A minimal API wrapper around yfinance

License:GNU General Public License v3.0


Languages

Language:Python 94.7%Language:Dockerfile 5.3%