I am using the following Coinbase PHP api:
The class file includes the following line:
* An array of API endpoints
*/
public $endpoints = array(
'book' => array('method' => 'GET', 'uri' => '/products/%s/book'),
);
public function getOrderBook($product = 'BTC-EUR') {
//$this->validate('product', $product);
return $this->request('book', array('id' => $product));
}
In my file I call it using:
$exchange = new CoinbaseExchange();//Connect to Coinbase API
$getOrderbook = $exchange->getOrderBook();
print_r($getOrderbook);
Nothing is returned.
Though if I modify the class from:
'book' => array('method' => 'GET', 'uri' => '/products/%s/book'),
To:
'book' => array('method' => 'GET', 'uri' => '/products/%s/book?level=2'),
I get the desired out put in my file.
How can I leave the class as 'book' => array('method' => 'GET', 'uri' => '/products/%s/book'), as it is calling it through $getOrderbook = $exchange->getOrderBook();. Where do I include 'level=2` in the latter line please?