bitbuy-at/bitstamp-api-client

Client for Bitstamp.net HTTP API v2 with support for Laravel

v0.8.0 2023-06-27 15:22 UTC

This package is auto-updated.

Last update: 2024-03-27 16:58:46 UTC


README

This project is only supporting a selected choice of api calls to the bitstamp api, feel free to contribute!

bitstamp-api-client

Client for Bitstamp.net HTTP API v2 with support for Laravel

The structure of this package was strongly influenced by the design of the kraken-api-client from Butschster.

Install

composer require bitbuy-at/bitstamp-api-client

Laravel

Laravel 5.5+

If you're using Laravel 5.5 or above, the package will automatically register the Bitstamp provider and facade.

Laravel 5.4 and below

Add bitbuyAT\Bitstamp\BitstampServiceProvider to the providers array in your config/app.php:

'providers' => [
    // Other service providers...

    bitbuyAT\Bitstamp\BitstampServiceProvider::class,
],

If you want to use the facade interface, you can use the facade class when needed:

use bitbuyAT\Bitstamp\Facade\Bitstamp;

Or add an alias in your config/app.php:

'aliases' => [
    ...
    'Bitstamp' => bitbuyAT\Bitstamp\Facade\Bitstamp::class,
],

Configuration

You can update your .env file with the following settings (only needed for private calls):

BITSTAMP_KEY=key
BITSTAMP_SECRET=secret
BITSTAMP_CUSTOMER_ID=customer-id

Usage

Get current prices

use bitbuyAT\Bitstamp\Facade\Bitstamp;

$prices = Bitstamp::getTicker($tradingPair);
$prices->getData();
$prices->askPrice();
$prices->bidPrice();

More examples can be found in the /tests folder.

Supported Methods

All currently supported methods with params explanation can be found in the client interface (src/Contracts/Client.php).

Do you need any further method, which is not listed here? Just open an issue with the required method or even better open a PR to speed things up!

Contributing

Want to contribute? Great!

Create a new issue first, describing the feature or bug.

Just fork our code, make your changes, then let us know and we will review it.

  1. Fork it.
  2. Create a feature branch (git checkout -b my_feature)
  3. Commit your changes (git commit -m "Added My Feature")
  4. Push to the branch (git push origin my_feature)
  5. Open a Pull Request
  6. Enjoy and wait ;)

We are constantly updating and improving our code. We hope it can be for the benefit of the entire community.

License

MIT License

Please check LICENSE.txt

Visit us

bitbuy GmbH / bitcoin.wien (https://www.bitcoin.wien/)