Giter VIP home page Giter VIP logo

pytiingo's Introduction

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 [email protected]: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 (Premium Endpoint)

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

pytiingo's People

Contributors

philipk19238 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jamesd000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.