bitbuy-at / bitstamp-api-client
Client for Bitstamp.net HTTP API v2 with support for Laravel
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^8 || ^9 || ^10
- nesbot/carbon: ^2.16
Requires (Dev)
- phpunit/phpunit: ^9
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.
- 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.
License
MIT License
Please check LICENSE.txt
Visit us
bitbuy GmbH / bitcoin.wien (https://www.bitcoin.wien/)