public function setUp() { parent::setUp(); $obj = (object) ["CreatedTimestampUtc" => "2014-08-05T06:42:11.3032208Z", "CurrentHighestBidPrice" => 500.0, "CurrentLowestOfferPrice" => 1001.0, "DayAvgPrice" => 510.0, "DayHighestPrice" => 515.0, "DayLowestPrice" => 509.0, "DayVolumeXbt" => 2.0, "LastPrice" => 511.0, "PrimaryCurrencyCode" => "Xbt", "SecondaryCurrencyCode" => "Usd"]; $this->marketSummary = MarketSummary::createFromObject($obj); }
/** * Returns a current snapshot of the Independent Reserve market for a given currency pair. * @param string $primaryCurrencyCode The digital currency for which to retrieve market 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 market summary. * Must be a valid secondary currency, which can be checked via the * getValidSecondaryCurrencyCodes() method. * @return MarketSummary */ public function getMarketSummary($primaryCurrencyCode, $secondaryCurrencyCode) { return MarketSummary::createFromObject($this->getEndpoint('GetMarketSummary', ['primaryCurrencyCode' => $primaryCurrencyCode, 'secondaryCurrencyCode' => $secondaryCurrencyCode])); }