2017 © Pedro Peláez
 

library binance-api

Simple Binance API Wrapper, written in PHP. Includes the basics and assumes you know your way around.

image

mvaessen/binance-api

Simple Binance API Wrapper, written in PHP. Includes the basics and assumes you know your way around.

  • Thursday, May 24, 2018
  • by mvaessen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 6 % Grown

The README.md

Binance API Wrapper PHP

Simple Binance API Wrapper, written in PHP. Includes some basic methods to work with the API and assumes you know your way around. Check out the Binance API Documentation for more information about the available endpoints. Will throw an exception when errors are encountered., (*1)

Please note:

  • Does NOT include mechanism to intercept rate limit.
  • Comes without any support.
  • Use at your own risk.

Getting started

composer require mvaessen/binance-api, (*2)

require 'vendor/autoload.php';
$api = new Mvaessen\BinanceApi\Client('<api key>','<secret>');

Get account information

$result = $api->account();
print $result;
Public endpoint call
$result = $api->queryPublic('<method>', '<endpoint>', '<request>');
Private endpoint call
$result = $api->queryPrivate('<method>', '<endpoint>', '<request>');

Custom error reporting

You can choose to overwrite the processErrorCode and processException methods to report the errors to your favorite bugreporting software., (*3)

<?php
namespace App;

use Mvaessen\BinanceApi\BinanceApiException;
use Mvaessen\BinanceApi\Client;

class BinanceApi extends Client
{
   protected function processErrorCode($response, $method, $url, $request)
   {
       //todo report to bugtracking software

       throw new BinanceApiException($response['msg']);
   }

   protected function processException($e, $method, $url, $request)
   {
       //todo report to bugtracking software

       throw new BinanceApiException($e->getMessage());
   }
}

The Versions

24/05 2018

dev-master

9999999-dev

Simple Binance API Wrapper, written in PHP. Includes the basics and assumes you know your way around.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Max Vaessen

api binance

24/05 2018

0.2.2

0.2.2.0

Simple Binance API Wrapper, written in PHP. Includes the basics and assumes you know your way around.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Max Vaessen

api binance

09/05 2018

0.2.1

0.2.1.0

Simple Binance API Wrapper, written in PHP. Includes the basics and assumes you know your way around.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Max Vaessen

api binance

09/05 2018

0.2

0.2.0.0

Simple Binance API Wrapper, written in PHP. Includes the basics and assumes you know your way around.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Max Vaessen

api binance

08/05 2018

0.1

0.1.0.0

Simple Binance API Wrapper, written in PHP. Includes the basics and assumes you know your way around.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Max Vaessen

api binance