PHPackages                             hellovoid/gdax - 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. hellovoid/gdax

ActiveLibrary

hellovoid/gdax
==============

GDAX API library

v1.0.2(8y ago)169.0k↓50%8[1 PRs](https://github.com/hellovoid/gdax/pulls)MITPHPPHP &gt;=5.5.0CI failing

Since Nov 7Pushed 5y ago3 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/6171b3ec0ad6432a624fbc6a415439ed2002a9e0052b6ddc220c046971a9e08e/68747470733a2f2f706f7365722e707567782e6f72672f68656c6c6f766f69642f676461782f762f737461626c65)](https://packagist.org/packages/hellovoid/gdax)[![Total Downloads](https://camo.githubusercontent.com/6c35e5bfb974f4ffa0642a8daa49169b2055f4bad41cc4d9a92c2d792ddc8abb/68747470733a2f2f706f7365722e707567782e6f72672f68656c6c6f766f69642f676461782f646f776e6c6f616473)](https://packagist.org/packages/hellovoid/gdax)[![License](https://camo.githubusercontent.com/bbc3843cb0b6f5923d8f50abd1fc38dc1f009e0efd260645deae906b44074a08/68747470733a2f2f706f7365722e707567782e6f72672f68656c6c6f766f69642f676461782f6c6963656e7365)](https://packagist.org/packages/hellovoid/gdax)

GDAX PHP API Client Library
===========================

[](#gdax-php-api-client-library)

This is the unofficial client library for the [GDAX API](https://docs.gdax.com). Inspired by [Coinbase PHP Library](https://github.com/coinbase/coinbase-php).

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

[](#installation)

Install the library using Composer. Please read the [Composer Documentation](https://getcomposer.org/doc/01-basic-usage.md) if you are unfamiliar with Composer or dependency managers in general.

```
composer require hellovoid/gdax

```

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

[](#authentication)

Use an API key, secret and passphrase to access your own GDAX account.

```
use Hellovoid\Gdax\Configuration;
use Hellovoid\Gdax\Client;

$configuration = Configuration::apiKey($apiKey, $apiSecret, $apiPassphrase);
$client = Client::create($configuration);
```

Response
--------

[](#response)

Every successful method request returns decoded json array.

Pagination [\#ref](https://docs.gdax.com/#pagination)
-----------------------------------------------------

[](#pagination-ref)

Your requests should use these cursor values when making requests for pages after the initial request.

ParameterDescription$beforeRequest page before (newer) this pagination id. (default null)$afterRequest page after (older) this pagination id. (default null)$limitNumber of results per request. Maximum 100. (default 100)```
use \Hellovoid\Gdax\Pagination;

$pagination = Pagination::create($before, null, $limit);

$client->setPagination($pagination);

$pagination->setEndingBefore(null);
$pagination->setStartingAfter($after);
```

Accounts [\#ref](https://docs.gdax.com/#accounts)
-------------------------------------------------

[](#accounts-ref)

### List Accounts

[](#list-accounts)

```
$client->getAccounts();
```

### Account details

[](#account-details)

```
$client->getAccount($accountId);
```

### Account history

[](#account-history)

```
$client->getAccountHistory($accountId);
```

### Account holds

[](#account-holds)

```
$client->getAccountHolds($accountId);
```

Orders [\#ref](https://docs.gdax.com/#orders)
---------------------------------------------

[](#orders-ref)

### Place new order

[](#place-new-order)

```
$order = $client->placeOrder([
    'size'       => 0.1,
    'price'      => 0.1,
    'side'       => 'buy',
    'product_id' => 'BTC-USD'
]);
```

### Cancel an order

[](#cancel-an-order)

```
try {
    $response = $client->orderCancel($orderId);
} catch (HttpException $e) { // Order could not be canceled
    $e->getMessage();
}
```

### Cancel all orders

[](#cancel-all-orders)

```
$response = $client->ordersCancel();
```

Cancel all orders for a specific product:

```
$response = $client->ordersCancel([
    'product_id' => $productId
]);
```

### List orders

[](#list-orders)

```
$response = $client->getOrders();
```

### Get order details

[](#get-order-details)

```
$response = $client->getOrder($orderId);
```

Fills [\#ref](https://docs.gdax.com/#fills)
-------------------------------------------

[](#fills-ref)

### List fills

[](#list-fills)

```
$response = $client->getFills([
    'order_id'   => 'all',
    'product_id' => 'all'
]);
```

Funding [\#ref](https://docs.gdax.com/#funding)
-----------------------------------------------

[](#funding-ref)

### List fundings

[](#list-fundings)

Get fundings with status "settled".

```
$response = $client->getFundings([
    'status' => 'settled', // outstanding, settled, or rejected
]);
```

### Repay

[](#repay)

```
$response = $client->fundingRepay([
    'amount' => 1.00,
    'currency' => 'EUR',
]);
```

Margin Transfer [\#ref](https://docs.gdax.com/#margin-transfer)
---------------------------------------------------------------

[](#margin-transfer-ref)

```
$response = $client->marginTransfer([
    'margin_profile_id' => '45fa9e3b-00ba-4631-b907-8a98cbdf21be',
    'type'              => 'deposit',
    'currency'          => 'USD',
    'amount'            => 2,
]);
```

Position [\#ref](https://docs.gdax.com/#position)
-------------------------------------------------

[](#position-ref)

### Get overview of your profile

[](#get-overview-of-your-profile)

```
$response = $client->position();
```

### Close

[](#close)

```
$response = $client->positionClose([
    'repay_only' => true
]);
```

Deposits [\#ref](https://docs.gdax.com/#payment-method)
-------------------------------------------------------

[](#deposits-ref)

### Payment method

[](#payment-method)

```
$response = $client->depositPaymentMethod([
    'amount'            => 2.00,
    'currency'          => 'USD',
    'payment_method_id' => 'bc677162-d934-5f1a-968c-a496b1c1270b'
]);
```

### Coinbase

[](#coinbase)

Deposit funds from a coinbase account.

```
$response = $client->depositCoinbase([
    'amount'              => 2.00,
    'currency'            => 'BTC',
    'coinbase_account_id' => 'c13cd0fc-72ca-55e9-843b-b84ef628c198'
]);
```

Withdrawals [\#ref](https://docs.gdax.com/#payment-method53)
------------------------------------------------------------

[](#withdrawals-ref)

### Payment method

[](#payment-method-1)

```
$response = $client->withdrawalPaymentMethod([
    'amount'            => 2.00,
    'currency'          => 'USD',
    'payment_method_id' => 'bc677162-d934-5f1a-968c-a496b1c1270b'
]);
```

### Coinbase

[](#coinbase-1)

Withdrawal funds to a coinbase account.

```
$response = $client->withdrawalCoinbase([
    'amount'              => 2.00,
    'currency'            => 'BTC',
    'coinbase_account_id' => 'c13cd0fc-72ca-55e9-843b-b84ef628c198'
]);
```

### Crypto

[](#crypto)

Withdrawal funds to a crypto address.

```
$response = $client->withdrawalCoinbase([
    'amount'         => 0.01,
    'currency'       => 'BTC',
    'crypto_address' => '0x5ad5769cd04681FeD900BCE3DDc877B50E83d469'
]);
```

Payment methods [\#ref](https://docs.gdax.com/#list-payment-methods)
--------------------------------------------------------------------

[](#payment-methods-ref)

Get a list of your payment methods.

```
$response = $client->getPaymentMethods();
```

Coinbase accounts [\#ref](https://docs.gdax.com/#list-accounts59)
-----------------------------------------------------------------

[](#coinbase-accounts-ref)

Get a list of your coinbase accounts.

```
$response = $client->getCoinbaseAccounts();
```

Reports [\#ref](https://docs.gdax.com/#create-a-new-report)
-----------------------------------------------------------

[](#reports-ref)

### Create a new report

[](#create-a-new-report)

```
$response = $client->createReport([
    'type' => 'fills',
    'start_date' => '2014-11-01T00:00:00.000Z',
    'end_date' => '2014-11-30T23:59:59.000Z'
]);
```

### Get report status

[](#get-report-status)

```
$response = $client->getReportStatus($reportId);
```

Products [\#ref](https://docs.gdax.com/#products)
-------------------------------------------------

[](#products-ref)

### Get products

[](#get-products)

```
$response = $client->getProducts();
```

### Get Product Order Book

[](#get-product-order-book)

```
$response = $client->getProductOrderBook($productId);
```

### Get Product Ticker

[](#get-product-ticker)

```
$response = $client->getProductTicker($productId);
```

### Get Product Trades

[](#get-product-trades)

```
$response = $client->getProductTrades($productId);
```

### Get Historic Rates

[](#get-historic-rates)

```
$response = $client->getProductHistoricRates($productId);
```

### Get 24hr Stats

[](#get-24hr-stats)

```
$response = $client->getProductLast24HrStats($productId);
```

Currencies [\#ref](https://docs.gdax.com/#currencies)
-----------------------------------------------------

[](#currencies-ref)

```
$response = $client->getCurrencies();
```

### Get Time [\#ref](https://docs.gdax.com/#time)

[](#get-time-ref)

```
$response = $client->getTime();
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~39 days

Total

3

Last Release

3035d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/02bd0bd4488ec76d1b7e90670bf31f5ec40c6c74ce8cb5ed792ba91ef4744cfa?d=identicon)[hellovoid](/maintainers/hellovoid)

---

Top Contributors

[![hellovoid](https://avatars.githubusercontent.com/u/7906586?v=4)](https://github.com/hellovoid "hellovoid (3 commits)")

---

Tags

coinbasecoinbase-progdaxgdax-apibitcoincoinbasegdax

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hellovoid-gdax/health.svg)

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

###  Alternatives

[coinbase/coinbase-commerce

Coinbase Commerce API library

148275.7k2](/packages/coinbase-coinbase-commerce)[mocking-magician/coinbase-pro-sdk

Library for coinbase pro API calls

223.2k](/packages/mocking-magician-coinbase-pro-sdk)

PHPackages © 2026

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