Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch data from the Tiingo API with a getSymbols.tiingo() method. #220

Merged
merged 3 commits into from
Apr 9, 2018

Commits on Apr 9, 2018

  1. Add getSymbols.tiingo() method

    This enables package users to download historical OHLC, Adjusted OHLC,
    Dividend, and Split information from the Tiingo API. Tiingo's free
    offering allows access to 60K global securities for 30+ years. Tiingo
    provides daily, weekly, monthly, and annual frequencies.
    
    Details of the service can be found at the following links
    https://www.tiingo.com/pricing
    https://api.tiingo.com/docs/tiingo/daily
    
    Tiingo also provides fundamentals and a 5 minute delay quote system,
    though this implementation includes no provision for downloading them.
    SteveBronder authored and joshuaulrich committed Apr 9, 2018
    Configuration menu
    Copy the full SHA
    8eab43a View commit details
    Browse the repository at this point in the history
  2. Select columns and add adjust argument

    Tiingo added a new 'columns' argument to the API that allows the user
    to request only specific columns. This allows us to pull only raw or
    adjusted data.
    
    Add 'adjust' argument to allow user to specify either raw or adjusted
    data.
    SteveBronder authored and joshuaulrich committed Apr 9, 2018
    Configuration menu
    Copy the full SHA
    be80ad9 View commit details
    Browse the repository at this point in the history
  3. Check for rate-limit error

    The Tiingo JSON API responds with a HTTP 429 status when a user goes
    over the rate limit and download.file() throws an error. The CSV API
    responds with a HTTP 200 (OK) status even if a user goes over the rate
    limit. In both cases, the temporary file contains the error message.
    
    Use curl_fetch_disk() to avoid any error while processing the server
    response. Check that the temporary file contains a header with the
    columns requested, and throw an error if it doesn't.
    joshuaulrich committed Apr 9, 2018
    Configuration menu
    Copy the full SHA
    283d01b View commit details
    Browse the repository at this point in the history