PHPackages                             doublebit/okcoin - 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. [API Development](/categories/api)
4. /
5. doublebit/okcoin

AbandonedArchivedLibrary[API Development](/categories/api)

doublebit/okcoin
================

Laravel wrapper for OKCoin API.

1.0.0-alpha4(9y ago)43561MITPHP

Since Aug 15Pushed 8y agoCompare

[ Source](https://github.com/doublebit/okcoin)[ Packagist](https://packagist.org/packages/doublebit/okcoin)[ RSS](/packages/doublebit-okcoin/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

doublebit/okcoin
================

[](#doublebitokcoin)

A simple Laravel 5 wrapper for OKCoin API.

**This package is not ready for use in production!**

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

[](#installation)

Install with [composer](https://getcomposer.org):

`composer require doublebit/okcoin`

Then add the provider to `config/app.php`

`DoubleBit\OKCoin\OkcoinServiceProvider::class,`

and optionally add the facade to aliases

`'OKCoin' => DoubleBit\OKCoin\Facade::class,`

Then run `php artisan vendor:publish --provider="Doublebit\Okcoin\OkcoinServiceProvider`

Usage
-----

[](#usage)

`echo json_encode(\OKCoin::getTicker())`

The package has no built-in API calls, you can make a call to any endpoint from the [OKCoin API](https://www.okcoin.com/about/rest_api.do).

If the OKCoin API adds new endpoints you can make calls to those without updating the package.

The methods are constructed as follows: first all lowercase word is the method (get/post). Then starting with an uppercase letter is the name of the endpoint from OKCoin API. In the name of the endpoint remove all the underscores (\_) and start each word after an underscore with an uppercase. Example: `POST /api/v1/batch_trade` becomes `OKCoin::postBatchTrade()`

The methods support up to 4 arguments, as follows:

- If the first argument is not a string, it MUST BE an array of parameters for the query (according to the API docs)
- If the first argument is string, it's considered API\_KEY and the second argument MUST BE SECRET\_KEY and the array of parameters are moved to the third argument
- Last argument is always the callback. The callback receives the following 3 arguments: `$endpoint, $params, $result`. The $endpoint is the API endpoint, not the method name. The $params is an array of params (sent to the method). The $result is the json received from the server or `false` in case of error.

OkcoinException
---------------

[](#okcoinexception)

// @todo

Issues
------

[](#issues)

Report any issues on [github](https://github.com/doublebit/okcoin/issues)

License
-------

[](#license)

See [LICENSE](https://github.com/doublebit/okcoin/blob/master/LICENSE) file

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84% 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 ~40 days

Recently: every ~50 days

Total

6

Last Release

3404d ago

Major Versions

0.2.0-alpha → 1.0.0-alpha2016-08-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/37620802?v=4)[DoubleBit](/maintainers/doublebit)[@doublebit](https://github.com/doublebit)

---

Top Contributors

[![vasilegoian](https://avatars.githubusercontent.com/u/2268684?v=4)](https://github.com/vasilegoian "vasilegoian (21 commits)")[![gsoros](https://avatars.githubusercontent.com/u/12033369?v=4)](https://github.com/gsoros "gsoros (4 commits)")

---

Tags

laravellaravel-wrapperokcoinokcoin-api

### Embed Badge

![Health badge](/badges/doublebit-okcoin/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M932](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k34](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[fschmtt/keycloak-rest-api-client-php

PHP client to interact with Keycloak's Admin REST API.

49108.6k2](/packages/fschmtt-keycloak-rest-api-client-php)

PHPackages © 2026

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