briones/bitso-api-php

A Wrapper for Bitso API made in PHP 7 and Symfony 4

0.0.1 2017-12-12 03:31 UTC

This package is not auto-updated.

Last update: 2024-04-28 02:48:07 UTC


README

A wrapper for the Bitso® API made in PHP 7 and Symfony 4

Motivation

I'm a Developer that use Bitso as platform for buying and selling Cryptocurrencies, and Bitso provides an API in order to create new ways to communicate with theirs systems so I searched for a composer package for abstract the API requests in PHP and I found the official bitso-php library but seems that this library is made in old an ugly PHP (the kind of PHP that all we hate) so I created this project in order to try replicate the functionality but with a better implementation and new technologies, like PHP 7 and Symfony 4.

I hope this could be useful for someone.

Installation

To install the bitso-api-php api wrapper: $ composer require briones/bitso-api-php or equivalently in your composer.json file:

{
    "require": {
        "briones/bitsoAPI-php": "master"
    }
}

Public API Usage

use App\Entity\BitsoPublicApi

$bitsoClient = new BitsoClient('https://api.bitso.com/v3/');
$bitsoPublicApi = new BitsoPublicApi();
$availableBooks = $bitsoPublicAPI->getAvailableBooks(['book'=>'btc_mxn','aggregate'=> 'true']);

Private API Usage

use App\Entity\BitsoPublicApi;

$bitsoClient = new BitsoClient('https://api.bitso.com/v3/');
$bitsoPrivateApi = new BitsoPrivateApi('YOUR_PRIVATE_KEY', 'YOUR_SECRET_KEY');

$accountStatus = $bitsoPrivateApi->getAccountStatus();

UNDER CONSTRUCTION