Download the PHP package dannyben/php-quandl without Composer

On this page you can find all versions of the php package dannyben/php-quandl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-quandl

PHP Quandl

Latest Stable Version Build Status Maintainability


This library provides easy access to the Quandl API using PHP.

It provides several convenience methods to common Quandl API endpoints, as well as a generic method to access any of Quandl's endpoints directly.


Geting Started

Include the Quandl.php class in your code, and run one of the examples.

To install with composer:

Examples

This is a basic call. It will return a PHP object with price data for AAPL:

You may pass any parameter that is mentioned in the Quandl documentation:

The date range options get a special treatment. You may use any date string that PHP's strtotime() understands.

You can also search the entire Quandl database and get a list of supported symbols in a data source:

To access any Quandl API endpoint directly, use the get method

More examples can be found in the examples.php file

Caching

You may provide the quandl object with a cache handler function. This function should be responsible for both reading from your cache and storing to it.

See the example_cache.php file.

Reference

Constructor

The constructor accepts two optional parameters: $api_key and $format:

You may also set these properties later (see below);

Public Properties

$api_key

Set your API key

$format

Set the output format. Can be: csv, xml, json, and object (which will return a php object obtained with json_decode()).

$force_curl

Force download using curl. By default, we will try to download with file_get_contents if available, and fall back to curl only as a last resort.

$no_ssl_verify

Disables curl SSL verification. Set to true if you get an error saying "SSL certificate problem".

$timeout

Set the timeout for the download operations.

$last_url

Holds the last API URL as requested from Quandl, for debugging.

$error

In case there was an error getting the data from Quandl, the request response will be false and this property will contain the error message.

$was_cached

When using a cache handler, this property will be set to true if the response came from the cache.

Methods

get

Returns an object containing the response from any of Quandl's API endpoints. The format of the result depends on the value of $quandl->format.

The optional parameters array is an associative key => value array with any of the parameters supported by Quandl.

You do not need to pass auth_token in the array, it will be automatically appended.

getSymbol

Returns an object containing data for a given symbol. The format of the result depends on the value of $quandl->format.

The optional parameters array is an associative key => value array with any of the parameters supported by Quandl.

You do not need to pass auth_token in the array, it will be automatically appended.

getSearch

Returns a search result object. Number of results per page is limited to 300 by default.

Note that currently Quandl does not support CSV response for this node so if $quandl->format is "csv", this call will return a JSON string instead.

getList

Returns a list of symbols in a given source. Number of results per page is limited to 300 by default.

getMeta

Returns metadata about a symbol.

getDatabases

Returns a list of available databases. Number of results per page is limited to 100 by default.

getBulk

This feature is only supported with premium databases.

Downloads the entire database and saves it to a ZIP file. If $complete is true (false by default), it will download the entire database, otherwise, it will download the last day only.


All versions of php-quandl with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dannyben/php-quandl contains the following files

Loading the files please wait ....