This project is only supporting a selected choice of api calls to the bitstamp api, feel free to contribute!
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.
composer require bitbuy-at/bitstamp-api-client
If you're using Laravel 5.5 or above, the package will automatically register the Bitstamp provider and facade.
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,
],
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
use bitbuyAT\Bitstamp\Facade\Bitstamp;
$prices = Bitstamp::getTicker($tradingPair);
$prices->getData();
$prices->askPrice();
$prices->bidPrice();
More examples can be found in the /tests folder.
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!
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.
- Fork it.
- Create a feature branch (git checkout -b my_feature)
- Commit your changes (git commit -m "Added My Feature")
- Push to the branch (git push origin my_feature)
- Open a Pull Request
- Enjoy and wait ;)
We are constantly updating and improving our code. We hope it can be for the benefit of the entire community.
MIT License
Please check LICENSE.txt
bitbuy GmbH / bitcoin.wien (https://www.bitcoin.wien/)