PHPackages                             dalvin1991/cobinhood\_client\_api - 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. dalvin1991/cobinhood\_client\_api

ActiveProject

dalvin1991/cobinhood\_client\_api
=================================

Cobinhood Client API

17PHP

Since Feb 14Pushed 8y ago2 watchersCompare

[ Source](https://github.com/dalvin1991/CobinhoodClientAPI)[ Packagist](https://packagist.org/packages/dalvin1991/cobinhood_client_api)[ RSS](/packages/dalvin1991-cobinhood-client-api/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Cobinhood Client API
====================

[](#cobinhood-client-api)

Cobinhood Client API

Refer Cobinhood Public API

Composer Command

```
composer create-project dalvin1991/cobinhood_client_api

```

Initialize
----------

[](#initialize)

##### Initialize

[](#initialize-1)

`Client $client = new CobinhoodClientAPI("API-KEY");`

System Section
--------------

[](#system-section)

##### Get System Time

[](#get-system-time)

`$client->getTime();`

### Get System Info

[](#get-system-info)

`$client->getInfo();`

Market Section
--------------

[](#market-section)

##### Get Currencies

[](#get-currencies)

`$client->getCurrencies();`

##### Get Trading Pairs

[](#get-trading-pairs)

`$client->getTradingPairs();`

##### Get Order Books

[](#get-order-books)

`$client->getOrderBooks($tradingPairID,$limit);`
$tradingPairID (string) : you may use the value return by *Get Trading Pairs*
$limit (int) : number of records return (Optional parameter)

##### Get Trading Statistics

[](#get-trading-statistics)

`$client->getStats();`

##### Get Tickers

[](#get-tickers)

`$client->getTickers($tradingPairID);`
$tradingPairID (string) : you may use the value return by *Get Trading Pairs*

##### Get Recent Trades

[](#get-recent-trades)

`$client->getRecentTrades($tradingPairID,$limit);`
$tradingPairID (string) : you may use the value return by *Get Trading Pairs*
$limit (int) : number of records return (Optional parameter)

Chart Section
-------------

[](#chart-section)

##### Get Candles

[](#get-candles)

`$client->getCandles($tradingPairID,$timeframe,$startTime,$endTime);`
$tradingPairID (string) : you may use the value return by *Get Trading Pairs*
$timeframe (string) : candles timeframe ("1m", "5m", "15m", "30m", "1h", "3h", "6h", "12h", "1D", "7D", "14D", "1M")
$startTime (int) : the unix timestamp for the first of candles (Optional parameter)
$endTime (int) : the unix timestamp for the last of candles (Optional parameter)

Trading Section
---------------

[](#trading-section)

##### Get Order

[](#get-order)

`$client->getOrder($orderID);`
$orderID (string) : order id for the order

##### Get Order's Trades

[](#get-orders-trades)

`$client->getOrderTrades($orderID);`
$orderID (string) : order id for the order

##### Get All Orders

[](#get-all-orders)

`$client->getOrders($tradingPairID,$limit);`
$tradingPairID (string) : you may use the value return by *Get Trading Pairs* (Optional parameter)
$limit (int) : number of records return (Optional parameter)

##### Place Order

[](#place-order)

`$client->placeOrder($tradingPairID, $side, $type, $price, $size);`
$tradingPairID (string) : you may use the value return by *Get Trading Pairs*
$side (string) : the order side ("bid", "ask")
$type (string) : the order type ("market", "limit", "stop", "stop\_limit")
$price (string) : price for the order
$size (string) : size for the order

##### Modify Order

[](#modify-order)

`$client->modifyOrder($orderID,$price,$size);`
$orderID (string) : order id for the order
$price (string) : price for the order
$size (string) : size for the order

##### Cancel Order

[](#cancel-order)

`$client->cancelOrder($orderID);`
$orderID (string) : order id for the order

##### Get Order History

[](#get-order-history)

`$client->getOrderHistory($tradingPairID, $limit);`
$tradingPairID (string) : you may use the value return by *Get Trading Pairs* (Optional parameter)
$limit (int) : number of records return (Optional parameter)

##### Get Trade

[](#get-trade)

`$client->getTrade($tradeID);`
$tradeID (string) : trade id for the trade

##### Get Trades History

[](#get-trades-history)

`$client->getTrades($tradingPairID, $limit);`
$tradingPairID (string) : you may use the value return by *Get Trading Pairs* (Optional parameter)
$limit (int) : number of records return (Optional parameter)

Wallet Section
--------------

[](#wallet-section)

##### Get Ledger Entries

[](#get-ledger-entries)

`$client->getLedger($currency,$limit);`
$currency (string) : you may use the value return by *Get Currencies* (Optional parameter)
$limit (int) : number of records return (Optional parameter)

##### Get Deposit Addresses

[](#get-deposit-addresses)

`$client->getDepositAddresses($currency);`
$currency (string) : you may use the value return by *Get Currencies* (Optional parameter)

##### Get Withdrawal Addresses

[](#get-withdrawal-addresses)

`$client->getWithdrawalAddresses($currency);`
$currency (string) : you may use the value return by *Get Currencies* (Optional parameter)

##### Get Withdrawal

[](#get-withdrawal)

`$client->getWithdrawal($withdrawalID);`
$withdrawalID (string) : withdrawal ID

##### Get All Withdrawal

[](#get-all-withdrawal)

`$client->getWithdrawals();`

##### Get Deposit

[](#get-deposit)

`$client->getDeposit($depositID);`
$depositID (string) : depositID ID

##### Get All Deposit

[](#get-all-deposit)

`$client->getDeposits();`

Websocket Section
-----------------

[](#websocket-section)

In websocket, I have implemented the ping message to be sent every 5 sec to maintain the socket stay open after each socket function has called.

You may refer my index.php example, for each websocket function you may put in your callback function, when receive any message. $class will be your class, then $functionName is the class function name to be call.

##### Order

[](#order)

```
$client->startOrderWS($keepAlive,$timeout,$class,$functionName);

```

$keepAlive (bool) : keep the socket alive until the timeout (Optional parameter)
$timeout (int) : the socket timeout time with seconds (Optional parameter)
$class (class) : the callback Class (Optional parameter)
$functionName (string) : the callback Class's function (Optional parameter)

##### Trades

[](#trades)

```
$client->startTradesWS($tradingPairID,$keepAlive,$timeout,$class,$functionName);

```

$tradingPairID (string or array) : it can be string for single trading pair or array for multiple trading pair subscribe
$keepAlive (bool) : keep the socket alive until the timeout (Optional parameter)
$timeout (int) : the socket timeout time with seconds (Optional parameter)
$class (class) : the callback Class (Optional parameter)
$functionName (string) : the callback Class's function (Optional parameter)

##### Order Book

[](#order-book)

```
$client->startOrderBookWS($tradingPairsForOrderBookWS,$keepAlive,$timeout,$class,$functionName);

```

$tradingPairsForOrderBookWS (array) : you may refer the structure like this

```
$tradingPairsForOrderBookWS=[
    ["tradingPairID"=>"BAT-BTC","precision"=>"1E-8"],
    ["tradingPairID"=>"COB-BTC","precision"=>"1E-8"],
    ["tradingPairID"=>"ETH-BTC","precision"=>"1E-8"]
];

```

$keepAlive (bool) : keep the socket alive until the timeout (Optional parameter)
$timeout (int) : the socket timeout time with seconds (Optional parameter)
$class (class) : the callback Class (Optional parameter)
$functionName (string) : the callback Class's function (Optional parameter)

##### Tinker

[](#tinker)

```
$client->startTinkerWS($tradingPairID,$keepAlive,$timeout,$class,$functionName);

```

$tradingPairID (string or array) : it can be string for single trading pair or array for multiple trading pair subscribe
$keepAlive (bool) : keep the socket alive until the timeout (Optional parameter)
$timeout (int) : the socket timeout time with seconds (Optional parameter)
$class (class) : the callback Class (Optional parameter)
$functionName (string) : the callback Class's function (Optional parameter)

##### Candles

[](#candles)

```
$client->startCandlesWS($tradingPairsForCandlesWS,$keepAlive,$timeout,$class,$functionName);

```

$tradingPairsForOrderBookWS (array) : you may refer the structure like this

```
$tradingPairsForCandlesWS=[
    ["tradingPairID"=>"BAT-BTC","timeframe"=>"30m"],
    ["tradingPairID"=>"COB-BTC","timeframe"=>"30m"],
    ["tradingPairID"=>"ETH-BTC","timeframe"=>"30m"]
];

```

$keepAlive (bool) : keep the socket alive until the timeout (Optional parameter)
$timeout (int) : the socket timeout time with seconds (Optional parameter)
$class (class) : the callback Class (Optional parameter)
$functionName (string) : the callback Class's function (Optional parameter)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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/7418f9fb13fc6ebc72d4c4adad7aaed5bc2b823da4848f84afb8b8e93173bbbe?d=identicon)[dalvin1991](/maintainers/dalvin1991)

---

Top Contributors

[![dalvin1991](https://avatars.githubusercontent.com/u/16516897?v=4)](https://github.com/dalvin1991 "dalvin1991 (9 commits)")

### Embed Badge

![Health badge](/badges/dalvin1991-cobinhood-client-api/health.svg)

```
[![Health](https://phpackages.com/badges/dalvin1991-cobinhood-client-api/health.svg)](https://phpackages.com/packages/dalvin1991-cobinhood-client-api)
```

PHPackages © 2026

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