Usage¶
To use Tiingo Python in a project:
import tiingo
Next, initialize your client object. It is recommended to use an environment variable to initialize your client object for convenience.
from tiingo import TiingoClient
# Set TIINGO_API_KEY in your environment variables in your .bash_profile, OR
# pass a dictionary with 'api_key' as a key into the TiingoClient.
client = TiingoClient()
Alternately, you may use a dictionary to customize/authorize your client.
Now you can use TiingoClient
to make your API calls. (Other parameters are available for each endpoint beyond what has been written below, see the Tiingo website for full details).
Further Docs¶
- Official Tiingo Documentation: https://api.tiingo.com
- Tiingo-Python Documentation (Under Construction): https://tiingo-python.readthedocs.io.