-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added missing enpoints for lastest trade for symbol v2, last quote fo…
…r symbol v2 abd forex ticker snapshot (#13) Co-authored-by: Ersin Demirtas <[email protected]>
- Loading branch information
1 parent
f86dfc7
commit 9b4875d
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace PolygonIO\Rest\Forex; | ||
|
||
use GuzzleHttp\Exception\GuzzleException; | ||
use PolygonIO\Rest\RestResource; | ||
|
||
/** | ||
* Class SnapshotAllTickers | ||
* | ||
* @package PolygonIO\Rest\Forex | ||
*/ | ||
class SnapshotTickerV2 extends RestResource | ||
{ | ||
/** | ||
* @param $tickerSymbol | ||
* | ||
* @return array | ||
* | ||
*/ | ||
public function get($tickerSymbol): array | ||
{ | ||
return $this->_get('/v2/snapshot/locale/global/markets/forex/tickers/' . $tickerSymbol); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace PolygonIO\Rest\Stocks; | ||
|
||
use GuzzleHttp\Exception\GuzzleException; | ||
use PolygonIO\Rest\RestResource; | ||
|
||
/** | ||
* Class LastQuoteForSymbol | ||
* | ||
* @package PolygonIO\Rest\Stocks | ||
*/ | ||
class LastQuoteForSymbolV2 extends RestResource | ||
{ | ||
/** | ||
* @param $tickerSymbol | ||
* | ||
* @return array | ||
* | ||
* @throws GuzzleException | ||
*/ | ||
public function get($tickerSymbol): array | ||
{ | ||
return $this->_get('/v2/last/nbbo/' . $tickerSymbol); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace PolygonIO\Rest\Stocks; | ||
|
||
use GuzzleHttp\Exception\GuzzleException; | ||
use PolygonIO\Rest\RestResource; | ||
|
||
/** | ||
* Class LastTradeForSymbol | ||
* | ||
* @package PolygonIO\Rest\Stocks | ||
*/ | ||
class LastTradeForSymbolV2 extends RestResource | ||
{ | ||
/** | ||
* @param $tickerSymbol | ||
* | ||
* @return array | ||
* | ||
* @throws GuzzleException | ||
*/ | ||
public function get($tickerSymbol): array | ||
{ | ||
return $this->_get('/v2/last/trade/' . $tickerSymbol); | ||
} | ||
} |