ju5t/bitvavo-client

A Modern Bitvavo Client

dev-main 2021-08-17 07:59 UTC

This package is auto-updated.

Last update: 2024-04-17 13:38:44 UTC


README

This is a work in progress.

All trades on the Bitvavo platform are processed based on Trading Rules. Please read this document to understand more about the nitty gritty of fees, orders and other parameters.

We want to be 100% clear. Using this client is at your own risk. Bitvavo and the makers of this package are not liable for any potential damages caused. We provide no warranties whatsoever, neither explicit or implicit.

Installation

composer install bitvavo/bitvavo-client

Usage

include 'vendor/autoload.php';

use Bitvavo\Bitvavo;

$bitvavo = new Bitvavo(apiKey: $apiKey, apiSecret: $apiSecret);
Bitvavo::setInstance($bitvavo);

This will give you access to the Bitvavo API through $bitvavo. However, we do recommend using Models to fetch information from the API. For example:

$market = Market::make(coin: 'BTC', currency: 'EUR');
$all = Trade::market($market)->all();

This will give you all Trades, based on the BTC-EUR market.

Dates & Timezones

Bitvavo returns timestamps, not dates. As timestamps are hard(er) to work with when developing applications, we try to append a public property called date. This will be a Carbon object.

By default, timestamps are returned as UTC. This can be practical, but it isn't when your displaying dates. The date property is converted to the Europe/Amsterdam timezone by default. If you want to change this, you can use:

Bitvavo::setTimezone('America/Toronto')

Contributing

Please see CONTRIBUTING for details.