1111use MarketDataApp \Exceptions \ApiException ;
1212use MarketDataApp \Traits \UniversalParameters ;
1313
14+ /**
15+ * Indices class for handling index-related API endpoints.
16+ */
1417class Indices
1518{
1619
1720 use UniversalParameters;
1821
22+ /** @var Client The Market Data API client instance. */
1923 private Client $ client ;
24+
25+ /** @var string The base URL for index endpoints. */
2026 public const BASE_URL = "v1/indices/ " ;
2127
28+ /**
29+ * Indices constructor.
30+ *
31+ * @param Client $client The Market Data API client instance.
32+ */
2233 public function __construct ($ client )
2334 {
2435 $ this ->client = $ client ;
@@ -27,13 +38,15 @@ public function __construct($client)
2738 /**
2839 * Get a real-time quote for an index.
2940 *
30- * @param string $symbol The index symbol, without any leading or trailing index identifiers. For example, use DJI
31- * do not use $DJI, ^DJI, .DJI, DJI.X, etc.
41+ * @param string $symbol The index symbol, without any leading or trailing index identifiers. For
42+ * example, use DJI do not use $DJI, ^DJI, .DJI, DJI.X, etc.
3243 *
33- * @param bool $fifty_two_week Enable the output of 52-week high and 52-week low data in the quote output.
44+ * @param bool $fifty_two_week Enable the output of 52-week high and 52-week low data in the quote
45+ * output.
3446 *
35- * @param Parameters|null $parameters Universal parameters for all methods (such as format).
47+ * @param Parameters|null $parameters Universal parameters for all methods (such as format).
3648 *
49+ * @return Quote
3750 * @throws GuzzleException|ApiException
3851 */
3952 public function quote (
@@ -44,14 +57,15 @@ public function quote(
4457 return new Quote ($ this ->execute ("quotes/ $ symbol " , ['52week ' => $ fifty_two_week ], $ parameters ));
4558 }
4659
47-
4860 /**
49- * Get a real-time price quote for a multiple indices by doing parallel requests.
61+ * Get real-time price quotes for multiple indices by doing parallel requests.
5062 *
51- * @param array $symbols The ticker symbols to return in the response.
52- * @param bool $fifty_two_week Enable the output of 52-week high and 52-week low data in the quote output.
53- * @param Parameters|null $parameters Universal parameters for all methods (such as format).
63+ * @param array $symbols The ticker symbols to return in the response.
64+ * @param bool $fifty_two_week Enable the output of 52-week high and 52-week low data in the quote
65+ * output.
66+ * @param Parameters|null $parameters Universal parameters for all methods (such as format).
5467 *
68+ * @return Quotes
5569 * @throws \Throwable
5670 */
5771 public function quotes (
@@ -71,27 +85,27 @@ public function quotes(
7185 /**
7286 * Get historical price candles for an index.
7387 *
74- * @param string $symbol The index symbol, without any leading or trailing index identifiers. For example, use DJI
75- * do not use $DJI, ^DJI, .DJI, DJI.X, etc.
88+ * @param string $symbol The index symbol, without any leading or trailing index identifiers. For
89+ * example, use DJI do not use $DJI, ^DJI, .DJI, DJI.X, etc.
7690 *
77- * @param string $from The leftmost candle on a chart (inclusive). If you use countback, to is not required.
78- * Accepted timestamp inputs: ISO 8601, unix, spreadsheet.
91+ * @param string $from The leftmost candle on a chart (inclusive). If you use countback, to is not
92+ * required. Accepted timestamp inputs: ISO 8601, unix, spreadsheet.
7993 *
80- * @param string|null $to The rightmost candle on a chart (inclusive). Accepted timestamp inputs: ISO 8601, unix,
81- * spreadsheet.
94+ * @param string|null $to The rightmost candle on a chart (inclusive). Accepted timestamp inputs: ISO
95+ * 8601, unix, spreadsheet.
8296 *
83- * @param string $resolution The duration of each candle.
84- * Minutely Resolutions: (minutely, 1, 3, 5, 15, 30, 45, ...) Hourly Resolutions: (hourly, H, 1H, 2H, ...)
85- * Daily Resolutions: (daily, D, 1D, 2D, ...)
86- * Weekly Resolutions: (weekly, W, 1W, 2W, ...)
87- * Monthly Resolutions: (monthly, M, 1M, 2M, ...)
88- * Yearly Resolutions:(yearly, Y, 1Y, 2Y, ...)
97+ * @param string $resolution The duration of each candle.
98+ * Minutely Resolutions: (minutely, 1, 3, 5, 15, 30, 45, ...) Hourly
99+ * Resolutions: (hourly, H, 1H, 2H, ...) Daily Resolutions: (daily, D, 1D, 2D,
100+ * ...) Weekly Resolutions: (weekly, W, 1W, 2W, ...) Monthly Resolutions:
101+ * (monthly, M, 1M, 2M, ...) Yearly Resolutions:(yearly, Y, 1Y, 2Y, ...)
89102 *
90- * @param int|null $countback Will fetch a number of candles before (to the left of) to. If you use from, countback
91- * is not required.
103+ * @param int|null $countback Will fetch a number of candles before (to the left of) to. If you use from,
104+ * countback is not required.
92105 *
93106 * @param Parameters|null $parameters Universal parameters for all methods (such as format).
94107 *
108+ * @return Candles
95109 * @throws ApiException|GuzzleException
96110 */
97111 public function candles (
0 commit comments