ricog / coinbase-exchange
Coinbase Exchange API library
Installs: 70
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 5
Open Issues: 1
pkg:composer/ricog/coinbase-exchange
Requires (Dev)
- phpunit/phpunit: ~4.4
This package is not auto-updated.
Last update: 2025-09-23 22:20:06 UTC
README
A PHP library for communicating with the Coinbase Exchange.
WARNING: This is a work in progress. Some parts may not work as expected.
Installation
Composer Install
Require the library in your composer.json
. (What is Composer?)
"require": {
"ricog/coinbase-exchange": ">=0.1"
}
Manual Install
Download the latest release and require lib/CoinbaseExchange.php
.
require_once('lib/CoinbaseExchange.php');
Usage
Detailed usage can be found in lib/CoinbaseExchange/CoinbaseExchange.php.
Public endpoints
Public endpoints do not require authentication.
$exchange = new CoinbaseExchange();
print_r($exchange->getTicker(), 1);
Private endpoints
Private endpoints require authentication. Create an API key at https://exchange.coinbase.com/settings.
$exchange = new CoinbaseExchange();
$exchange->auth('key', 'passphrase', 'secret');
$exchange->placeOrder('sell', '1200.01', '.25', 'BTC-USD');
Tests
Tests can be run with:
./test/runner.sh
TODO
- Implement public endpoints.
- Implement private trade enpoints.
- Add tests (started).
- Implement transfer endpoint.