Skip to main content

Python SDK for Tiingo Financial Markets API

Project description

Pytiingo

Pytiingo is a Python SDK written for the Tiingo Financial Markets API. Tiingo delivers performant access to data from financial markets such as equities, cyrptocurrencies, and forex. They also support queryable fundamentals and news data spanning 20+ years.

Use Pytiingo to query Tiingo's REST endpoints and receive data in JSON or Pandas format. Pytiingo will support real time streaming of financial data in the coming future. This library requires a free API key, which can be retrieved by making a free account on their website. You can also look at all the available functionality in their API Documentation.

Install

Install the latest package using pip:

pip install pytiingo

To install from the source, clone the directory using:

git clone git@github.com:philipk19238/pytiingo.git

Navigate to the project directory and run:

python setup.py --install

REST Usage

Documentation below interfaces with Tiingo's REST endpoints

Initialize the Client

The REST Client can be initialized as follows:

from pytiingo import RESTClient 

client = RESTClient(token='YOUR_API_TOKEN') 

If you want your data in a Pandas format, use:

from pytiingo import RESTClient 

client = RESTClient(token='YOUR_API_TOKEN', output_format='pandas') 

Sample API Calls

EOD Equities

from pytiingo import RESTClient 

client = RESTClient(token='YOUR_API_TOKEN') 
price = client.eod.get_prices('GOOG')

Cryptocurrencies

from pytiingo import RESTClient

client = RESTClient(token='YOUR_API_TOKEN')
prices = client.crypto.get_prices(tickers='BTCUSD',
                                  startDate='2019-01-02',
                                  resampleFreq='5min')

Forex

from pytiingo import RESTClient

client = RESTClient(token='YOUR_API_TOKEN')
prices = client.forex.get_prices('AUDUSD')

Real Time Equities

from pytiingo import RESTClient

client = RESTClient(token='YOUR_API_TOKEN')
prices = client.iex.get_prices('GOOG')

Fundamentals

from pytiingo import RESTClient

client = RESTClient(token='YOUR_API_TOKEN')
metrics = client.fundamentals.get_daily_metrics('GOOG')

News

from pytiingo import RESTClient

client = RESTClient(token='YOUR_API_TOKEN')
news = client.news.get_news(tickers=['AAPL', 'GOOG'],
                            tags=['election', 'argentina'])

Contributing

All contributors are welcome! Just make a pull request :)

TODOS:

  • Finish WebsocketClient for data streaming
  • Add Unit Tests
  • Integrate CI Pipeline
  • Add Integration Tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytiingo-0.0.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytiingo-0.0.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file pytiingo-0.0.1.tar.gz.

File metadata

  • Download URL: pytiingo-0.0.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pytiingo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 873aea1e65550777dba6a761f1cff18607cd1affbb0d95de046f513387792f9a
MD5 39987766c93ee55a86687bdf51c34b77
BLAKE2b-256 37b58cb19b4b9d1edb75d614b9300e92c92e28ced63336301210483112b20a02

See more details on using hashes here.

File details

Details for the file pytiingo-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pytiingo-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pytiingo-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 936a07566a8ad124971cfd2521b31f2fea37745f196cd4a93877503d53181df4
MD5 2fd27ee85b78f113c4605c5a7825affe
BLAKE2b-256 cf2aa4ac0711a722cf0a1be035c67897c5fce8128e49653de7af084b4e425d04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page