22
33namespace MarketDataApp \Endpoints ;
44
5- use Carbon \Carbon ;
65use GuzzleHttp \Exception \GuzzleException ;
76use MarketDataApp \Client ;
87use MarketDataApp \Endpoints \Responses \Options \Expirations ;
@@ -35,13 +34,13 @@ public function __construct($client)
3534 * @param int|null $strike Limit the lookup of expiration dates to the strike provided. This will cause the endpoint to
3635 * only return expiration dates that include this strike.
3736 *
38- * @param Carbon |null $date Use to lookup a historical list of expiration dates from a specific previous trading
37+ * @param string |null $date Use to lookup a historical list of expiration dates from a specific previous trading
3938 * day. If date is omitted the expiration dates will be from the current trading day during market hours or from the
40- * last trading day when the market is closed.
39+ * last trading day when the market is closed. Accepted timestamp inputs: ISO 8601, unix, spreadsheet.
4140 *
4241 * @throws ApiException|GuzzleException
4342 */
44- public function expirations (string $ symbol , int $ strike = null , Carbon $ date = null ): Expirations
43+ public function expirations (string $ symbol , int $ strike = null , string $ date = null ): Expirations
4544 {
4645 // Stub
4746 return new Expirations ($ this ->client ->execute (self ::BASE_URL . "options/expirations/ $ symbol " ,
@@ -72,15 +71,15 @@ public function lookup(string $input): Lookup
7271 *
7372 * @param string $symbol The underlying ticker symbol for the options chain you wish to lookup.
7473 *
75- * @param Carbon |null $expiration Limit the lookup of strikes to options that expire on a specific expiration date.
74+ * @param string |null $expiration Limit the lookup of strikes to options that expire on a specific expiration date.
7675 *
77- * @param Carbon |null $date Use to lookup a historical list of strikes from a specific previous trading day. If date
76+ * @param string |null $date Use to lookup a historical list of strikes from a specific previous trading day. If date
7877 * is omitted the expiration dates will be from the current trading day during market hours or from the last trading
79- * day when the market is closed.
78+ * day when the market is closed. Accepted timestamp inputs: ISO 8601, unix, spreadsheet.
8079 *
8180 * @throws ApiException|GuzzleException
8281 */
83- public function strikes (string $ symbol , Carbon $ expiration = null , Carbon $ date = null ): Strikes
82+ public function strikes (string $ symbol , string $ expiration = null , string $ date = null ): Strikes
8483 {
8584 // Stub
8685 return new Strikes ($ this ->client ->execute (self ::BASE_URL . "options/strikes/ $ symbol " ,
@@ -97,13 +96,15 @@ public function strikes(string $symbol, Carbon $expiration = null, Carbon $date
9796 * all expirations.
9897 *
9998 * @param string $symbol The ticker symbol of the underlying asset.
100- * @param Carbon|null $date Use to lookup a historical end of day options chain from a specific trading day. If no
99+ *
100+ * @param string|null $date Use to lookup a historical end of day options chain from a specific trading day. If no
101101 * date is specified the chain will be the most current chain available during market hours. When the market is
102- * closed the chain will be from the last trading day.
102+ * closed the chain will be from the last trading day. Accepted timestamp inputs: ISO 8601, unix, spreadsheet.
103103 *
104- * @param Carbon |Expiration $expiration
104+ * @param string |Expiration $expiration
105105 * - Limits the option chain to a specific expiration date. Accepted date inputs: ISO 8601, unix, spreadsheet. This
106- * parameter is only required if requesting a quote along with the chain.
106+ * parameter is only required if requesting a quote along with the chain. Accepted timestamp inputs: ISO 8601, unix,
107+ * spreadsheet.
107108 *
108109 * - If omitted the next monthly expiration for real-time quotes or the next monthly expiration relative to the date
109110 * parameter for historical quotes will be returned.
@@ -114,11 +115,11 @@ public function strikes(string $symbol, Carbon $expiration = null, Carbon $date
114115 * consume your requests very quickly. The full SPX option chain has more than 20,000 contracts. A request is
115116 * consumed for each contact you request with a price in the option chain.
116117 *
117- * @param Carbon |null $from Limit the option chain to expiration dates after from (inclusive). Should be combined
118- * with to create a range.
118+ * @param string |null $from Limit the option chain to expiration dates after from (inclusive). Should be combined
119+ * with to create a range. Accepted timestamp inputs: ISO 8601, unix, spreadsheet.
119120 *
120- * @param Carbon |null $to Limit the option chain to expiration dates before to (not inclusive). Should be combined
121- * with from to create a range.
121+ * @param string |null $to Limit the option chain to expiration dates before to (not inclusive). Should be combined
122+ * with from to create a range. Accepted timestamp inputs: ISO 8601, unix, spreadsheet.
122123 *
123124 * @param int|null $month Limit the option chain to options that expire in a specific month (1-12).
124125 *
@@ -202,10 +203,10 @@ public function strikes(string $symbol, Carbon $expiration = null, Carbon $date
202203 */
203204 public function option_chain (
204205 string $ symbol ,
205- Carbon $ date = null ,
206- Carbon |Expiration $ expiration = Expiration::ALL ,
207- Carbon $ from = null ,
208- Carbon $ to = null ,
206+ string $ date = null ,
207+ string |Expiration $ expiration = Expiration::ALL ,
208+ string $ from = null ,
209+ string $ to = null ,
209210 int $ month = null ,
210211 int $ year = null ,
211212 bool $ weekly = true ,
@@ -261,21 +262,23 @@ public function option_chain(
261262 * @param string $option_symbol The option symbol (as defined by the OCC) for the option you wish to lookup. Use the
262263 * current OCC option symbol format, even for historic options that quoted before the format change in 2010.
263264 *
264- * @param Carbon |null $date Use to lookup a historical end of day quote from a specific trading day. If no date is
265+ * @param string |null $date Use to lookup a historical end of day quote from a specific trading day. If no date is
265266 * specified the quote will be the most current price available during market hours. When the market is closed the
266- * quote will be from the last trading day.
267+ * quote will be from the last trading day. Accepted timestamp inputs: ISO 8601, unix, spreadsheet.
267268 *
268- * @param Carbon |null $from Use to lookup a series of end of day quotes. From is the oldest (leftmost) date to
269+ * @param string |null $from Use to lookup a series of end of day quotes. From is the oldest (leftmost) date to
269270 * return (inclusive). If from/to is not specified the quote will be the most current price available during market
270- * hours. When the market is closed the quote will be from the last trading day.
271+ * hours. When the market is closed the quote will be from the last trading day. Accepted timestamp inputs: ISO
272+ * 8601, unix, spreadsheet.
271273 *
272- * @param Carbon |null $to Use to lookup a series of end of day quotes. From is the newest (rightmost) date to return
274+ * @param string |null $to Use to lookup a series of end of day quotes. From is the newest (rightmost) date to return
273275 * (exclusive). If from/to is not specified the quote will be the most current price available during market hours.
274- * When the market is closed the quote will be from the last trading day.
276+ * When the market is closed the quote will be from the last trading day. Accepted timestamp inputs: ISO 8601, unix,
277+ * spreadsheet.
275278 *
276279 * @throws ApiException|GuzzleException
277280 */
278- public function quotes (string $ option_symbol , Carbon $ date = null , Carbon $ from = null , Carbon $ to = null ): Quotes
281+ public function quotes (string $ option_symbol , string $ date = null , string $ from = null , string $ to = null ): Quotes
279282 {
280283 // Stub
281284 return new Quotes ($ this ->client ->execute (self ::BASE_URL . "options/quotes/ $ option_symbol/ " ,
0 commit comments