Skip to content

Commit

Permalink
added support for swedish and norwegian stocks
Browse files Browse the repository at this point in the history
  • Loading branch information
swar8080 committed Jun 27, 2018
1 parent 4992581 commit 3608e96
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/markets/ExchangeCodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ class ExchangeCodes {
const JAPAN = 'T';
const LONDON = "L";
const NEW_ZEALAND = "NZ";
const NORWAY = "OL";
const PARIS = "PA";
const SHANGHAI = "SS";
const SHENZHEN = "SZ";
const STOCKHOLM = "ST";
const US = '';

private function __construct() {}
Expand Down
16 changes: 14 additions & 2 deletions src/markets/StockExchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class StockExchange {

public static function isValidExchangeCode($exchangeCode){
public static function isValidExchangeCode($exchangeCode){
return array_key_exists($exchangeCode, self::Exchanges);
}

Expand Down Expand Up @@ -199,11 +199,17 @@ public function timestampOfLastClose(){
'opens' => '10:00',
'closes' => '16:45'
],
ExchangeCodes::NORWAY => [
'name' => 'Stockholm Stock Exchange',
'timezone' => 'Europe/Oslo',
'opens' => '9:00',
'closes' => '17:30'
],
ExchangeCodes::PARIS => [
'name' => 'Euronext Paris',
'timezone' => 'Europe/Paris',
'opens' => '9:00',
'closes' => '15:30'
'closes' => '17:30'
],
ExchangeCodes::SHANGHAI => [
'name' => 'Shanghai Stock Exchange',
Expand All @@ -216,6 +222,12 @@ public function timestampOfLastClose(){
'timezone' => 'Asia/Shanghai',
'opens' => '9:30',
'closes' => '15:00'
],
ExchangeCodes::STOCKHOLM => [
'name' => 'Stockholm Stock Exchange',
'timezone' => 'Europe/Stockholm',
'opens' => '9:00',
'closes' => '17:30'
]
];
}

0 comments on commit 3608e96

Please sign in to comment.