Giter Site home page Giter Site logo

btc-ex's Introduction

BTC-ex

Multi-exchange bitcoin trading interface for php.

This project aims to create a common interface to the various exchange API's that is easy to install and use via composer.

Curent list of clients and their status is as follows.

  • Bitstamp - willmoss/bitstamp-php-api (mostly normalized)
  • MtGox - thed1360/mtgox-api-v1-php-class (mostly normalized doesn't matter they're dead anyways)
  • BTC-e - marinu666/PHP-btce-api (only ticker method normalized)
  • Kraken - payward/kraken-api-client (only ticker method normalized)

Installation

Installation is extremely easy using composer by adding the package to your composer.json

    "require": {
        "php": ">=5.4.0",
        "thed1360/array-helper": "dev-master",
        "thed1360/btc-ex": "dev-master"
    }

If you are unfamiliar please visit.

Usage

use BitcoinExchange\Factory;
use \Exception;


try{
	// first parameter is the driver mtgox|btc-e|bitstamp
	// second parameter is an array with the key, secret, and usually a third parameter which is either client_id, cert, or noonce

	$instance = new Factory("bitstamp", ["key"=>"test", "secret"=>"sdklfj", "client_id"=>0000]);
	$client = $instance->client();

	var_dump($client->balance());
	
}catch(Exception $e){
	echo $e->getMessage()."\n";

}

As work progresses the aim is to normalize not only the methods into simple buy, sell, ticker, cancel, and balance but to also normalize their output as well.

Currently all but one of the libraries (the dead one) are included in this package but I will be trying to work with the authors to have them published to packagist.

Drivers

Drivers are extensions of the libraries for the different APIs and mormalize the methods and their output.

The standard is to return an Arr object for every response. Once you have written a driver you can add it to the Factory::Divers array to make it available to us.

Contributions

Currently this project needs contributions not only by the original authors of the libraries but we also require people with accounts at different exchanges to write drivers.

If you would like to make a contribution just fork us and make a pull request.

btc-ex's People

Contributors

alicegrey avatar rawlbot avatar thed1360 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.