gbanina / coinbase-pro
Client library for the Coinbase Pro. Intuitive and stable interface to integrate Coinbase Market into your Laravel project.
Requires
- guzzlehttp/guzzle: ~7.3
This package is auto-updated.
Last update: 2025-04-05 17:02:03 UTC
README
This is the client library for the Coinbase Pro API. We provide an intuitive, stable interface to integrate Coinbase Pro into your Laravel project.
Installation
Install the library using Composer. Please read the Composer Documentation if you are unfamiliar with Composer or dependency managers in general.
composer require gbanina/coinbase-pro
Once installed, if you are not using automatic package discovery, then you need to register the Gbanina\CoinbasePro\CoinbaseProServiceProvider
in your config/app.php
.
'providers' => [
Gbanina\CoinbasePro\CoinbaseProServiceProvider::class,
],
You can also optionally alias our facade:
'CoinbasePro' => Gbanina\CoinbasePro\CoinbasePro::class,
Copy the package config to your local config with the publish command:
php artisan vendor:publish --provider="Gbanina\CoinbasePro\CoinbaseProServiceProvider"
Authentication
You need to add the following to your .env
file:
COINBASEPRO_KEY=<your_key_here>
COINBASEPRO_SECRET=<your_secret_here>
COINBASEPRO_PASSPHRASE=<your_passphrase_here>
Usage
This is not intended to provide complete documentation of the API. For more detail, please refer to the official documentation.
Orders
List your current open orders. Only open or un-settled orders are returned. As soon as an order is no longer open and settled, it will no longer appear in the default request.
$service = new CoinbasePro(); $orders = $service->getOrders();
Accounts
Get a list of trading accounts.
$service = new CoinbasePro(); $accounts = $service->getAccounts();
Products
Get a list of available currency pairs for trading.
$service = new CoinbasePro(); $products = $service->getProducts();
Currencies
List known currencies.
$service = new CoinbasePro(); $currencies = $service->getCurrencies();
Contributing
Feel free to submit pull requests, fix any bugs, or add missing functions.