/** * Returns summarised historical trading data for a given currency pair. Data is summarised into * 1 hour intervals. * @note This method caches return values for 30 minutes. Calling it more than once per 30 * minutes will result in cached data being returned. * @param string $primaryCurrencyCode The digital currency for which to retrieve the trade * history summary. Must be a valid primary currency, which can be checked via the * getValidPrimaryCurrencyCodes() method. * @param string $secondaryCurrencyCode The fiat currency in which to retrieve the trade history * summary. Must be a valid secondary currency, which can be checked via the * getValidSecondaryCurrencyCodes() method. * @param int $numberOfHoursInThePastToRetrieve How many past hours of historical summary data * to retrieve (maximum is 240). * @return TradeHistorySummary */ public function getTradeHistorySummary($primaryCurrencyCode, $secondaryCurrencyCode, $numberOfHoursInThePastToRetrieve) { return TradeHistorySummary::createFromObject($this->getEndpoint('GetTradeHistorySummary', ['primaryCurrencyCode' => $primaryCurrencyCode, 'secondaryCurrencyCode' => $secondaryCurrencyCode, 'numberOfHoursInThePastToRetrieve' => $numberOfHoursInThePastToRetrieve])); }
public function testFactorySetsAllHistorySummaryItems() { $items = $this->tradeHistorySummary->getHistorySummaryItems(); $this->assert($items[1], instance_of, '\\IndependentReserve\\Object\\HistorySummaryItem'); }