Facades: merchant
Overview
Retrieve a list of ledgers by date range using the merchant facade.
Parameters
Parameter | Description |
---|---|
currency | The three digit currency string for the ledger to retrieve. |
startDate | The first date for the query filter. |
endDate | The last date for the query filter. |
Example
$ledger = null;
//check within the last few days
$date = new \DateTime();
$today = $date->format("Y-m-d");
$dateBefore = $date->modify('-30 day');
$sevenDaysAgo = $dateBefore->format("Y-m-d");
$ledger = $bitpay->getLedgerEntries(Currency::BTC, $sevenDaysAgo, $today);