The unofficial Python library for accessing the Finage REST API. Though a work in progress, this package can already fetch data on stocks, forex, and fundamentals.
The package can be installed directly from PyPI with pip
:
pip install finage
You need an API key to use this product.
Once you have that key, there are a couple options. You can either
save it as and environment variable (export FINAGE_KEY=<api_key>
), or you can pass it directly to the
client class Finage
as is done in the below example:
from finage import Finage
api_key = "FAKE_KEY"
client = Finage(api_key)
resp = client.get_stock_last("AMZN")
resp.json()