Giter Site home page Giter Site logo

quandl's Introduction

Go Quandl

Build Status GoDoc


This library provides easy access to the Quandl API using the Go programming language.

The full documentation is at:
godoc.org/github.com/DannyBen/quandl


Install

$ go get github.com/DannyBen/quandl

Features

  • Supports 3 call types to Quandl: GetSymbol, GetList and GetSearch.
  • Returns either a native Go object, or a raw (CSV/JSON/XML) response.
  • Built in cache handling.

Usage

Basic usage looks like this:

quandl.APIKey = "YOUR KEY"
data, err := quandl.GetSymbol("WIKI/AAPL", nil)

and will return a native Go object. To use the data in the response, iterate through its Data property:

for i, item := range data.Data {
  fmt.Println(i, item[0], item[2])
}

To receive a raw response from Quandl (CSV, JSON, XML) you can use:

data, err := quandl.GetSymbolRaw("WIKI/AAPL", "csv", nil)

To pass options to the Quandl API, use something like this:

v := quandl.Options{}
v.Set("trim_start", "2014-01-01")
v.Set("trim_end", "2014-02-02")
data, err := quandl.GetSymbol("WIKI/AAPL", v)

More examples are in the quandl_test file or in the official godoc documentation

Development

Before running tests, set your API key in an environment variable.

$ export QUANDL_KEY=your_key_here
$ go test -v

quandl's People

Contributors

dannyben avatar greggroth avatar trey-jones avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

quandl's Issues

Update to Quandl API v3

Need to update the library to use Quandl API v3 instead of v1
The v3 api also has a slightly different response structure, so its not only updating the endpoint URLs.

Changes needed:

If anyone feels like taking a stub at this, I will gladly merge a PR.

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.