PHPackages                             royopa/quandl-elephant-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. royopa/quandl-elephant-api

ActiveLibrary[API Development](/categories/api)

royopa/quandl-elephant-api
==========================

A API to provide easy access to the Quandl API using PHP

v0.3.3(11y ago)098MITPHPPHP ~5.4

Since Oct 29Pushed 10y ago2 watchersCompare

[ Source](https://github.com/royopa/quandl-elephant-api)[ Packagist](https://packagist.org/packages/royopa/quandl-elephant-api)[ RSS](/packages/royopa-quandl-elephant-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

Quandl Elephant API
===================

[](#quandl-elephant-api)

This project is a fork of [php-quandl](https://github.com/DannyBen/php-quandl), a great API to provide easy access to the [Quandl API](https://www.quandl.com/help/api) using PHP.

The name of this project was changed to answer the [PHP Licensing](http://php.net/license/).

[![Build Status](https://camo.githubusercontent.com/24e4426cd78329b3466a40173b85b9bb58b2474e22b38f887f39814fa94b3822/68747470733a2f2f7472617669732d63692e6f72672f726f796f70612f7175616e646c2d656c657068616e742d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/royopa/quandl-elephant-api)[![Latest Stable Version](https://camo.githubusercontent.com/ea2c737e98775bb8668794d8b0fd4bad21857dbdda442f733c34d263f1bead31/68747470733a2f2f706f7365722e707567782e6f72672f726f796f70612f7175616e646c2d656c657068616e742d6170692f762f737461626c65)](https://packagist.org/packages/royopa/quandl-elephant-api) [![Total Downloads](https://camo.githubusercontent.com/093b5952d441ace247acdd59bbfb637f224946d29b549429f4efb73baaaa3787/68747470733a2f2f706f7365722e707567782e6f72672f726f796f70612f7175616e646c2d656c657068616e742d6170692f646f776e6c6f616473)](https://packagist.org/packages/royopa/quandl-elephant-api) [![Latest Unstable Version](https://camo.githubusercontent.com/e46765f1327fd5b9fd7a03aad5639dfdd0cfef97f400f45691d2f58e8dcf34bb/68747470733a2f2f706f7365722e707567782e6f72672f726f796f70612f7175616e646c2d656c657068616e742d6170692f762f756e737461626c65)](https://packagist.org/packages/royopa/quandl-elephant-api) [![License](https://camo.githubusercontent.com/56734fcc5051ac9f6503a37942076ca5d1bf21664d47e34e17504b6fc015dfbb/68747470733a2f2f706f7365722e707567782e6f72672f726f796f70612f7175616e646c2d656c657068616e742d6170692f6c6963656e7365)](https://packagist.org/packages/royopa/quandl-elephant-api)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/71bc159d73a91198b6bef5c6da772ca62f0f7c67382baa6ae9c6f7502e2b91f9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726f796f70612f7175616e646c2d656c657068616e742d6170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/royopa/quandl-elephant-api/?branch=master)

Install
-------

[](#install)

To install with composer:

```
composer require royopa/quandl-elephant-api
```

Examples
--------

[](#examples)

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

```
use Royopa\Quandl;

$api_key = "YOUR_KEY_HERE";
$quandl  = new Quandl($api_key);
$data    = $quandl->getSymbol("GOOG/NASDAQ_AAPL");
```

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

```
use Royopa\Quandl;

$quandl = new Quandl($api_key);
$data = $quandl->getSymbol($symbol, [
	"sort_order"      => "desc",
	"exclude_headers" => true,
	"rows"            => 10,
	"column"          => 4,
]);
```

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

```
use Royopa\Quandl;

$quandl = new Quandl($api_key, "csv");
$data = $quandl->getSymbol($symbol, [
	"trim_start" => "today-30 days",
	"trim_end"   => "today",
]);
```

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

```
use Royopa\Quandl;

$quandl = new Quandl($api_key);
$data   = $quandl->getSearch("crude oil");
$data   = $quandl->getList("WIKI", 1, 10);
```

More examples can be found in the [examples.php](https://github.com/DannyBen/php-quandl/blob/master/examples.php) file

Caching
-------

[](#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](https://github.com/DannyBen/php-quandl/blob/master/example_cache.php) file.

Reference
---------

[](#reference)

### Constructor and public properties

[](#constructor-and-public-properties)

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

```
$quandl = new Quandl("YOUR KEY", "csv");
```

You may also set these properties later:

```
$quandl->api_key = "YOUR KEY";
$quandl->format  = "json";
```

`$format` can be one of `csv`, `xml`, `json`, and `object` (which will return a php object obtained with `json_decode()`).

After each call to Quandl, the property `$last_url` will be set for debugging and other purposes. In case there was an error getting the data from Quandl, the result will be `false` and the property `$error` will contain the error message.

### getSymbol

[](#getsymbol)

```
mixed getSymbol( string $symbol [, array $params ] )
```

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

[](#getsearch)

```
mixed getSearch( string $query [, int $page, int $per_page] )
```

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

[](#getlist)

```
mixed getList( string $source [, int $page, int $per_page] )
```

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

Tests
-----

[](#tests)

From the project directory, tests can be ran using:

```
./vendor/bin/phpunit
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~67 days

Total

4

Last Release

4017d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d40665a360eef88be50ddf2fad41317ab6378c4ef77a767f88050ab22bef402?d=identicon)[royopa](/maintainers/royopa)

---

Top Contributors

[![royopa](https://avatars.githubusercontent.com/u/442991?v=4)](https://github.com/royopa "royopa (47 commits)")[![DannyBen](https://avatars.githubusercontent.com/u/2405099?v=4)](https://github.com/DannyBen "DannyBen (33 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")[![morticue](https://avatars.githubusercontent.com/u/165028?v=4)](https://github.com/morticue "morticue (1 commits)")

### Embed Badge

![Health badge](/badges/royopa-quandl-elephant-api/health.svg)

```
[![Health](https://phpackages.com/badges/royopa-quandl-elephant-api/health.svg)](https://phpackages.com/packages/royopa-quandl-elephant-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
