2017 © Pedro Peláez
 

library okcoin

Laravel wrapper for OKCoin API.

image

doublebit/okcoin

Laravel wrapper for OKCoin API.

  • Sunday, July 30, 2017
  • by doublebit
  • Repository
  • 1 Watchers
  • 3 Stars
  • 283 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 3 % Grown

The README.md

doublebit/okcoin

A simple Laravel 5 wrapper for OKCoin API., (*1)

This package is not ready for use in production!, (*2)

Installation

Install with composer:, (*3)

composer require doublebit/okcoin, (*4)

Then add the provider to config/app.php, (*5)

DoubleBit\OKCoin\OkcoinServiceProvider::class,, (*6)

and optionally add the facade to aliases, (*7)

'OKCoin' => DoubleBit\OKCoin\Facade::class,, (*8)

Then run php artisan vendor:publish --provider="Doublebit\Okcoin\OkcoinServiceProvider, (*9)

Usage

echo json_encode(\OKCoin::getTicker()), (*10)

The package has no built-in API calls, you can make a call to any endpoint from the OKCoin API., (*11)

If the OKCoin API adds new endpoints you can make calls to those without updating the package., (*12)

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(), (*13)

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., (*14)

OkcoinException

// @todo, (*15)

Issues

Report any issues on github, (*16)

License

See LICENSE file, (*17)

The Versions

30/07 2017

dev-master

9999999-dev

Laravel wrapper for OKCoin API.

  Sources   Download

MIT

The Requires

 

by Vasile Goian

05/03 2017

1.0.0-alpha4

1.0.0.0-alpha4

Laravel wrapper for OKCoin API.

  Sources   Download

MIT

The Requires

 

by Vasile Goian

06/09 2016

1.0.0-alpha3

1.0.0.0-alpha3

Laravel wrapper for OKCoin API.

  Sources   Download

MIT

The Requires

 

by Vasile Goian

01/09 2016

1.0.0-alpha2

1.0.0.0-alpha2

Laravel wrapper for OKCoin API.

  Sources   Download

MIT

The Requires

 

by Vasile Goian

16/08 2016

1.0.0-alpha

1.0.0.0-alpha

Laravel wrapper for OKCoin API.

  Sources   Download

MIT

The Requires

 

by Vasile Goian

16/08 2016

0.2.0-alpha

0.2.0.0-alpha

Laravel wrapper for OKCoin API.

  Sources   Download

MIT

The Requires

 

by Vasile Goian

15/08 2016

0.1.0-alpha

0.1.0.0-alpha

Laravel wrapper for OKCoin API.

  Sources   Download

MIT

The Requires

 

by Vasile Goian