| @@ 46-53 (lines=8) @@ | ||
| 43 | * @return AskBidModel |
|
| 44 | * @throws \Exception |
|
| 45 | */ |
|
| 46 | public function getAsk($assetPair) |
|
| 47 | { |
|
| 48 | if (!isset($assetPair)) { |
|
| 49 | throw new \Exception($assetPair . " is not included in response"); |
|
| 50 | } |
|
| 51 | ||
| 52 | return $this->models[$assetPair]->getAsk(); |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * @param string $assetPair |
|
| @@ 61-68 (lines=8) @@ | ||
| 58 | * @return AskBidModel |
|
| 59 | * @throws \Exception |
|
| 60 | */ |
|
| 61 | public function getBid($assetPair) |
|
| 62 | { |
|
| 63 | if (!isset($assetPair)) { |
|
| 64 | throw new \Exception($assetPair . " is not included in response"); |
|
| 65 | } |
|
| 66 | ||
| 67 | return $this->models[$assetPair]->getBid(); |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * @param string $assetPair |
|
| @@ 76-83 (lines=8) @@ | ||
| 73 | * @return mixed |
|
| 74 | * @throws \Exception |
|
| 75 | */ |
|
| 76 | public function getLastTradeClosed($assetPair) |
|
| 77 | { |
|
| 78 | if (!isset($assetPair)) { |
|
| 79 | throw new \Exception($assetPair . " is not included in response"); |
|
| 80 | } |
|
| 81 | ||
| 82 | return $this->models[$assetPair]->getLastTradeClosed(); |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * @param string $assetPair |
|
| @@ 91-98 (lines=8) @@ | ||
| 88 | * @return DayPriceModel |
|
| 89 | * @throws \Exception |
|
| 90 | */ |
|
| 91 | public function getVolume($assetPair) |
|
| 92 | { |
|
| 93 | if (!isset($assetPair)) { |
|
| 94 | throw new \Exception($assetPair . " is not included in response"); |
|
| 95 | } |
|
| 96 | ||
| 97 | return $this->models[$assetPair]->getVolume(); |
|
| 98 | } |
|
| 99 | ||
| 100 | /** |
|
| 101 | * @param string $assetPair |
|
| @@ 106-113 (lines=8) @@ | ||
| 103 | * @return DayPriceModel |
|
| 104 | * @throws \Exception |
|
| 105 | */ |
|
| 106 | public function getVolumeWeightedAverage($assetPair) |
|
| 107 | { |
|
| 108 | if (!isset($assetPair)) { |
|
| 109 | throw new \Exception($assetPair . " is not included in response"); |
|
| 110 | } |
|
| 111 | ||
| 112 | return $this->models[$assetPair]->getVolumeWeightedAverage(); |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * @param string $assetPair |
|
| @@ 121-128 (lines=8) @@ | ||
| 118 | * @return DayPriceModel |
|
| 119 | * @throws \Exception |
|
| 120 | */ |
|
| 121 | public function getNumberOfTrades($assetPair) |
|
| 122 | { |
|
| 123 | if (!isset($assetPair)) { |
|
| 124 | throw new \Exception($assetPair . " is not included in response"); |
|
| 125 | } |
|
| 126 | ||
| 127 | return $this->models[$assetPair]->getNumberOfTrades(); |
|
| 128 | } |
|
| 129 | ||
| 130 | /** |
|
| 131 | * @param string $assetPair |
|
| @@ 136-143 (lines=8) @@ | ||
| 133 | * @return DayPriceModel |
|
| 134 | * @throws \Exception |
|
| 135 | */ |
|
| 136 | public function getLow($assetPair) |
|
| 137 | { |
|
| 138 | if (!isset($assetPair)) { |
|
| 139 | throw new \Exception($assetPair . " is not included in response"); |
|
| 140 | } |
|
| 141 | ||
| 142 | return $this->models[$assetPair]->getLow(); |
|
| 143 | } |
|
| 144 | ||
| 145 | /** |
|
| 146 | * @param string $assetPair |
|
| @@ 151-158 (lines=8) @@ | ||
| 148 | * @return DayPriceModel |
|
| 149 | * @throws \Exception |
|
| 150 | */ |
|
| 151 | public function getHigh($assetPair) |
|
| 152 | { |
|
| 153 | if (!isset($assetPair)) { |
|
| 154 | throw new \Exception($assetPair . " is not included in response"); |
|
| 155 | } |
|
| 156 | ||
| 157 | return $this->models[$assetPair]->getHigh(); |
|
| 158 | } |
|
| 159 | ||
| 160 | /** |
|
| 161 | * @param string $assetPair |
|
| @@ 166-173 (lines=8) @@ | ||
| 163 | * @return float |
|
| 164 | * @throws \Exception |
|
| 165 | */ |
|
| 166 | public function getTodaysOpeningPrice($assetPair) |
|
| 167 | { |
|
| 168 | if (!isset($assetPair)) { |
|
| 169 | throw new \Exception($assetPair . " is not included in response"); |
|
| 170 | } |
|
| 171 | ||
| 172 | return $this->models[$assetPair]->getTodaysOpeningPrice(); |
|
| 173 | } |
|
| 174 | } |
|
| 175 | ||