PHPackages                             php-coinbase/php-coinbase - 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. php-coinbase/php-coinbase

ActiveLibrary

php-coinbase/php-coinbase
=========================

PHP based coinbase api library

314PHP

Since Nov 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Peter2962/php-coinbase)[ Packagist](https://packagist.org/packages/php-coinbase/php-coinbase)[ RSS](/packages/php-coinbase-php-coinbase/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Based Coinbase SDK Library
==============================

[](#php-based-coinbase-sdk-library)

Unofficial sdk library for Coinbase. Note: This library is still in development.

For more information, please refer to the [official documentation](https://developers.coinbase.com/api/v2).

Installation
------------

[](#installation)

Install the library using Composer. Please read the Composer Documentation if you are unfamiliar with Composer or dependency managers in general.

```
"require": {
    "php-coinbase/php-coinbase": "dev-master"
}
```

Authentication
--------------

[](#authentication)

### API Key

[](#api-key)

This library makes use of the API key authentication. Oauth2 authentication will be added in future.

```
use PHPCoinbase\PHPCoinbase;

// Setting your api keys
PHPCoinbase::setApiKey($apiKey);
PHPCoinbase::setApiSecret($apiSecret);

// OR

$phpcoinbase = new PHPCoinbase($apiKey, $apiSecret);
```

### Responses

[](#responses)

Each request returns a response object \[PHPCoinbase\\PHPCoinbaseResponse\]. The response object contains three methods:

- getStatus: *'OK'*
- getStatusCode: *'200'*
- getData: *{'data': 'my response'}*

Usage
-----

[](#usage)

### \[Wallet API Endpoints\]

[](#wallet-api-endpoints)

```
$walletService = PHPCoinbase::useWalletsService();
```

#### [Users resource](https://developers.coinbase.com/api/v2#users)

[](#users-resource)

```
$usersResource = $walletService->users;
```

#### Show a user

[](#show-a-user)

```
$usersResource->getPublicUser('1a2b3c4d-5e6f7g8h-9i0j0k0l');
```

#### Show current user

[](#show-current-user)

```
$usersResource->getCurrentUser();
```

#### Show authorization information

[](#show-authorization-information)

```
$usersResource->getCurrentUserAuthInfo()
```

#### Update current user

[](#update-current-user)

\[See: \]

```
$data = [
    'name' => 'My new name'
];
$usersResource->updateCurrentUser($data)
```

#### [Accounts resource](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts)

[](#accounts-resource)

```
$accountsResource = $walletsService->accounts;
```

#### List accounts

[](#list-accounts)

```
$accountsResource->listAccounts()
```

#### Update account

[](#update-account)

```
$accountsResource->updateAccount('account_id', 'name');
```

#### Show an account

[](#show-an-account)

```
$accountsResource->getAccount('account_id');
```

#### Delete account

[](#delete-account)

```
$accountsResource->deleteAccount('account_id');
```

#### [Addresses resource](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-addresses)

[](#addresses-resource)

```
$addressResource = $walletsService->address;
```

#### List addresses

[](#list-addresses)

```
$addressResource->listAddresses('account_id');
```

#### Show Address

[](#show-address)

```
$addressResource->getAddress('account_id', 'address_id');
```

#### List Transactions

[](#list-transactions)

```
$addressResource->listTransactions('account_id');
```

#### Create Address

[](#create-address)

```
$addressResource->createAddress('account_id', 'address_name');
```

#### [Transactions resource](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions)

[](#transactions-resource)

```
$transactionsResource = $walletsService->transactions;
```

#### List Transactions

[](#list-transactions-1)

```
$transactionsResource->listTransactions('account_id');
```

#### Show a Transaction

[](#show-a-transaction)

```
$transactionsResource->getTransaction('account_id', 'transaction_id');
```

#### Send Money

[](#send-money)

\[See: \]

```
$data = [
    'to' => 'blockchain address or email',
    'amount' => 50
];
$transactionsResource->sendMoney('account_id', $data);
```

#### Transfer Money (between accounts)

[](#transfer-money-between-accounts)

\[See: \]

```
$data = [
    'to' => 'to_account_id',
    'amount' => 50,
    'currency' => 'ETH'
];
$transactionsResource->transferMoneyBetweenAccounts('account_id', $data);
```

#### Request Money

[](#request-money)

\[See: \]

```
$data = [
    'to' => 'to@email.com', // email
    'amount' => 50,
    'currency' => 'ETH'
];
$transactionsResource->requestMoney('account_id', $data);
```

#### Complete Request Money

[](#complete-request-money)

```
$transactionsResource->completeRequestMoney('account_id', 'transaction_id');
```

#### Re-send Request Money

[](#re-send-request-money)

```
$transactionsResource->resendRequestMoney('account_id', 'transaction_id');
```

#### Cancel Request Money

[](#cancel-request-money)

```
$transactionsResource->cancelRequestMoney('account_id', 'transaction_id');
```

#### [Buys resource](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#buy-resource)

[](#buys-resource)

```
$buysResource = $walletsService->buys;
```

#### List buys

[](#list-buys)

```
$buysResource->listBuys('account_id');
```

#### Show a buy

[](#show-a-buy)

```
$buysResource->getBuy('account_id', 'buy_id');
```

#### Place buy order

[](#place-buy-order)

```
$data = [
    'amount' => 50,
    'currency' => 'ETH'
];
$buysResource->placeBuyOrder('account_id', $data);
```

#### Commit a buy

[](#commit-a-buy)

```
$buysResource->commitBuy('account_id', 'buy_id');
```

#### [Sells resource](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-sells)

[](#sells-resource)

```
$sellsResource = $walletsService->sells;
```

#### List sells

[](#list-sells)

```
$sellsResource->listSells('account_id');
```

#### Show a sell

[](#show-a-sell)

```
$sellsResource->getSell('account_id', 'sell_id');
```

#### Place sell order

[](#place-sell-order)

\[See: \]

```
$data = [
    'amount' => 50,
    'currency' => 'ETH'
];
$sellsResource->placeSellOrder('account_id', $data);
```

#### Commit a sell

[](#commit-a-sell)

```
$sellsResource->commitSell('account_id', 'sell_id');
```

#### [Deposits resource](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits)

[](#deposits-resource)

```
$depositsResource = $walletsService->deposits;
```

#### List Deposits

[](#list-deposits)

```
$depositsResource->listDeposits('account_id');
```

#### Show a Deposit

[](#show-a-deposit)

```
$depositsResource->getDeposit('account_id', 'deposit_id');
```

#### Deposit Funds

[](#deposit-funds)

\[See: \]

```
$data = [
    'amount' => 50,
    'currency' => 'ETH',
    'payment_method' => 'payment_method_id'
];
$depositsResource->depositFunds('account_id', $data);
```

#### Commit a Deposit

[](#commit-a-deposit)

```
$depositsResource->commitDeposit('account_id', 'deposit_id');
```

#### [Withdrawals resource](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-withdrawals)

[](#withdrawals-resource)

```
$withdrawalsResource = $walletsService->withdrawals;
```

#### List Withdrawals

[](#list-withdrawals)

```
$withdrawalsResource->listWithdrawals('account_id');
```

#### Show a Withdrawal

[](#show-a-withdrawal)

```
$withdrawalsResource->getWithdrawal('account_id', 'withdrawal_id');
```

#### Withdraw Funds

[](#withdraw-funds)

\[See: \]

```
$data = [
    'amount' => 50,
    'currency' => 'ETH',
    'payment_method' => 'payment_method_id'
];
$withdrawalsResource->withdrawFunds('account_id', $data);
```

#### Commit a Withdrawal

[](#commit-a-withdrawal)

```
$withdrawalsResource->commitWithdrawal('account_id', 'withdrawal_id');
```

#### [Payment Methods resource](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-payment-methods)

[](#payment-methods-resource)

```
$paymentMethodsResource = $walletsService->paymentMethods;
```

#### List Payment Methods

[](#list-payment-methods)

```
$paymentMethodsResource->listPaymentMethods('account_id');
```

#### Show a Payment Method

[](#show-a-payment-method)

```
$paymentMethodsResource->getPaymentMethod('account_id', 'payment_method_id');
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/86c7c3ce993231b92d977f1bfcb0a23de14df47480513c1eb24a064f65f36374?d=identicon)[Peter2962](/maintainers/Peter2962)

---

Top Contributors

[![Peter2962](https://avatars.githubusercontent.com/u/18626464?v=4)](https://github.com/Peter2962 "Peter2962 (1 commits)")

### Embed Badge

![Health badge](/badges/php-coinbase-php-coinbase/health.svg)

```
[![Health](https://phpackages.com/badges/php-coinbase-php-coinbase/health.svg)](https://phpackages.com/packages/php-coinbase-php-coinbase)
```

PHPackages © 2026

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