Skip to content
PHP client for Barchart OnDemand
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
README.md
composer.json

README.md

PHP Client for Barchart OnDemand

Get access to Barchart's market data through Barchart OnDemand.

https://www.barchart.com/ondemand

Installation

composer require barchart/ondemand-client

Usage

require_once 'vendor/autoload.php';

use Barchart\OnDemand\Client;

$ondemand = new Client('YOUR API KEY');
$results = $ondemand->getQuote(['symbols' => 'AAPL,AMZN']);

// Generic request
$results = $ondemand->makeRequest('getQuote', ['symbols' => 'AAPL,AMZN']);

Free API

If you're using Barchart's free OnDemand API's, you need to overwrite the host on initialization:

$ondemand = new Client('YOUR API KEY', ['host' => 'marketdata.websol.barchart.com']);

https://www.barchart.com/ondemand/free-market-data-api

You can’t perform that action at this time.