|
| 1 | +# OpenAPI\Client\CrpytoaggregatesApi |
| 2 | + |
| 3 | +All URIs are relative to https://api.polygon.io, except if the operation defines another base path. |
| 4 | + |
| 5 | +| Method | HTTP request | Description | |
| 6 | +| ------------- | ------------- | ------------- | |
| 7 | +| [**cryptoEMA()**](CrpytoaggregatesApi.md#cryptoEMA) | **GET** /v1/indicators/ema/{cryptoTicker} | Exponential Moving Average (EMA) | |
| 8 | +| [**cryptoRSI()**](CrpytoaggregatesApi.md#cryptoRSI) | **GET** /v1/indicators/rsi/{cryptoTicker} | Relative Strength Index (RSI) | |
| 9 | +| [**cryptoSMA()**](CrpytoaggregatesApi.md#cryptoSMA) | **GET** /v1/indicators/sma/{cryptoTicker} | Simple Moving Average (SMA) | |
| 10 | + |
| 11 | + |
| 12 | +## `cryptoEMA()` |
| 13 | + |
| 14 | +```php |
| 15 | +cryptoEMA($crypto_ticker, $timestamp, $timespan, $window, $series_type, $expand_underlying, $order, $limit, $timestamp_gte, $timestamp_gt, $timestamp_lte, $timestamp_lt): \OpenAPI\Client\Model\CryptoEMA200Response |
| 16 | +``` |
| 17 | + |
| 18 | +Exponential Moving Average (EMA) |
| 19 | + |
| 20 | +Get the exponential moving average (EMA) for a ticker symbol over a given time range. |
| 21 | + |
| 22 | +### Example |
| 23 | + |
| 24 | +```php |
| 25 | +<?php |
| 26 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 27 | + |
| 28 | + |
| 29 | +// Configure API key authorization: apiKey |
| 30 | +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('apiKey', 'YOUR_API_KEY'); |
| 31 | +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 32 | +// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apiKey', 'Bearer'); |
| 33 | + |
| 34 | + |
| 35 | +$apiInstance = new OpenAPI\Client\Api\CrpytoaggregatesApi( |
| 36 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 37 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 38 | + new GuzzleHttp\Client(), |
| 39 | + $config |
| 40 | +); |
| 41 | +$crypto_ticker = X:BTCUSD; // string | The ticker symbol for which to get exponential moving average (EMA) data. |
| 42 | +$timestamp = 'timestamp_example'; // string | Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. |
| 43 | +$timespan = day; // string | The size of the aggregate time window. |
| 44 | +$window = 50; // int | The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average. |
| 45 | +$series_type = close; // string | The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to calculate the exponential moving average (EMA). |
| 46 | +$expand_underlying = false; // bool | Whether or not to include the aggregates used to calculate this indicator in the response. |
| 47 | +$order = desc; // string | The order in which to return the results, ordered by timestamp. |
| 48 | +$limit = 10; // int | Limit the number of results returned, default is 10 and max is 5000 |
| 49 | +$timestamp_gte = 'timestamp_gte_example'; // string | Range by timestamp. |
| 50 | +$timestamp_gt = 'timestamp_gt_example'; // string | Range by timestamp. |
| 51 | +$timestamp_lte = 'timestamp_lte_example'; // string | Range by timestamp. |
| 52 | +$timestamp_lt = 'timestamp_lt_example'; // string | Range by timestamp. |
| 53 | + |
| 54 | +try { |
| 55 | + $result = $apiInstance->cryptoEMA($crypto_ticker, $timestamp, $timespan, $window, $series_type, $expand_underlying, $order, $limit, $timestamp_gte, $timestamp_gt, $timestamp_lte, $timestamp_lt); |
| 56 | + print_r($result); |
| 57 | +} catch (Exception $e) { |
| 58 | + echo 'Exception when calling CrpytoaggregatesApi->cryptoEMA: ', $e->getMessage(), PHP_EOL; |
| 59 | +} |
| 60 | +``` |
| 61 | + |
| 62 | +### Parameters |
| 63 | + |
| 64 | +| Name | Type | Description | Notes | |
| 65 | +| ------------- | ------------- | ------------- | ------------- | |
| 66 | +| **crypto_ticker** | **string**| The ticker symbol for which to get exponential moving average (EMA) data. | | |
| 67 | +| **timestamp** | **string**| Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. | [optional] | |
| 68 | +| **timespan** | **string**| The size of the aggregate time window. | [optional] [default to 'day'] | |
| 69 | +| **window** | **int**| The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average. | [optional] [default to 50] | |
| 70 | +| **series_type** | **string**| The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to calculate the exponential moving average (EMA). | [optional] [default to 'close'] | |
| 71 | +| **expand_underlying** | **bool**| Whether or not to include the aggregates used to calculate this indicator in the response. | [optional] [default to false] | |
| 72 | +| **order** | **string**| The order in which to return the results, ordered by timestamp. | [optional] [default to 'desc'] | |
| 73 | +| **limit** | **int**| Limit the number of results returned, default is 10 and max is 5000 | [optional] [default to 10] | |
| 74 | +| **timestamp_gte** | **string**| Range by timestamp. | [optional] | |
| 75 | +| **timestamp_gt** | **string**| Range by timestamp. | [optional] | |
| 76 | +| **timestamp_lte** | **string**| Range by timestamp. | [optional] | |
| 77 | +| **timestamp_lt** | **string**| Range by timestamp. | [optional] | |
| 78 | + |
| 79 | +### Return type |
| 80 | + |
| 81 | +[**\OpenAPI\Client\Model\CryptoEMA200Response**](../Model/CryptoEMA200Response.md) |
| 82 | + |
| 83 | +### Authorization |
| 84 | + |
| 85 | +[apiKey](../../README.md#apiKey) |
| 86 | + |
| 87 | +### HTTP request headers |
| 88 | + |
| 89 | +- **Content-Type**: Not defined |
| 90 | +- **Accept**: `application/json`, `text/csv` |
| 91 | + |
| 92 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 93 | +[[Back to Model list]](../../README.md#models) |
| 94 | +[[Back to README]](../../README.md) |
| 95 | + |
| 96 | +## `cryptoRSI()` |
| 97 | + |
| 98 | +```php |
| 99 | +cryptoRSI($crypto_ticker, $timestamp, $timespan, $window, $series_type, $expand_underlying, $order, $limit, $timestamp_gte, $timestamp_gt, $timestamp_lte, $timestamp_lt): \OpenAPI\Client\Model\CryptoRSI200Response |
| 100 | +``` |
| 101 | + |
| 102 | +Relative Strength Index (RSI) |
| 103 | + |
| 104 | +Get the relative strength index (RSI) for a ticker symbol over a given time range. |
| 105 | + |
| 106 | +### Example |
| 107 | + |
| 108 | +```php |
| 109 | +<?php |
| 110 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 111 | + |
| 112 | + |
| 113 | +// Configure API key authorization: apiKey |
| 114 | +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('apiKey', 'YOUR_API_KEY'); |
| 115 | +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 116 | +// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apiKey', 'Bearer'); |
| 117 | + |
| 118 | + |
| 119 | +$apiInstance = new OpenAPI\Client\Api\CrpytoaggregatesApi( |
| 120 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 121 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 122 | + new GuzzleHttp\Client(), |
| 123 | + $config |
| 124 | +); |
| 125 | +$crypto_ticker = X:BTCUSD; // string | The ticker symbol for which to get relative strength index (RSI) data. |
| 126 | +$timestamp = 'timestamp_example'; // string | Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. |
| 127 | +$timespan = day; // string | The size of the aggregate time window. |
| 128 | +$window = 14; // int | The window size used to calculate the relative strength index (RSI). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average. |
| 129 | +$series_type = close; // string | The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to calculate the relative strength index (RSI). |
| 130 | +$expand_underlying = false; // bool | Whether or not to include the aggregates used to calculate this indicator in the response. |
| 131 | +$order = desc; // string | The order in which to return the results, ordered by timestamp. |
| 132 | +$limit = 10; // int | Limit the number of results returned, default is 10 and max is 5000 |
| 133 | +$timestamp_gte = 'timestamp_gte_example'; // string | Range by timestamp. |
| 134 | +$timestamp_gt = 'timestamp_gt_example'; // string | Range by timestamp. |
| 135 | +$timestamp_lte = 'timestamp_lte_example'; // string | Range by timestamp. |
| 136 | +$timestamp_lt = 'timestamp_lt_example'; // string | Range by timestamp. |
| 137 | + |
| 138 | +try { |
| 139 | + $result = $apiInstance->cryptoRSI($crypto_ticker, $timestamp, $timespan, $window, $series_type, $expand_underlying, $order, $limit, $timestamp_gte, $timestamp_gt, $timestamp_lte, $timestamp_lt); |
| 140 | + print_r($result); |
| 141 | +} catch (Exception $e) { |
| 142 | + echo 'Exception when calling CrpytoaggregatesApi->cryptoRSI: ', $e->getMessage(), PHP_EOL; |
| 143 | +} |
| 144 | +``` |
| 145 | + |
| 146 | +### Parameters |
| 147 | + |
| 148 | +| Name | Type | Description | Notes | |
| 149 | +| ------------- | ------------- | ------------- | ------------- | |
| 150 | +| **crypto_ticker** | **string**| The ticker symbol for which to get relative strength index (RSI) data. | | |
| 151 | +| **timestamp** | **string**| Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. | [optional] | |
| 152 | +| **timespan** | **string**| The size of the aggregate time window. | [optional] [default to 'day'] | |
| 153 | +| **window** | **int**| The window size used to calculate the relative strength index (RSI). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average. | [optional] [default to 14] | |
| 154 | +| **series_type** | **string**| The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to calculate the relative strength index (RSI). | [optional] [default to 'close'] | |
| 155 | +| **expand_underlying** | **bool**| Whether or not to include the aggregates used to calculate this indicator in the response. | [optional] [default to false] | |
| 156 | +| **order** | **string**| The order in which to return the results, ordered by timestamp. | [optional] [default to 'desc'] | |
| 157 | +| **limit** | **int**| Limit the number of results returned, default is 10 and max is 5000 | [optional] [default to 10] | |
| 158 | +| **timestamp_gte** | **string**| Range by timestamp. | [optional] | |
| 159 | +| **timestamp_gt** | **string**| Range by timestamp. | [optional] | |
| 160 | +| **timestamp_lte** | **string**| Range by timestamp. | [optional] | |
| 161 | +| **timestamp_lt** | **string**| Range by timestamp. | [optional] | |
| 162 | + |
| 163 | +### Return type |
| 164 | + |
| 165 | +[**\OpenAPI\Client\Model\CryptoRSI200Response**](../Model/CryptoRSI200Response.md) |
| 166 | + |
| 167 | +### Authorization |
| 168 | + |
| 169 | +[apiKey](../../README.md#apiKey) |
| 170 | + |
| 171 | +### HTTP request headers |
| 172 | + |
| 173 | +- **Content-Type**: Not defined |
| 174 | +- **Accept**: `application/json`, `text/csv` |
| 175 | + |
| 176 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 177 | +[[Back to Model list]](../../README.md#models) |
| 178 | +[[Back to README]](../../README.md) |
| 179 | + |
| 180 | +## `cryptoSMA()` |
| 181 | + |
| 182 | +```php |
| 183 | +cryptoSMA($crypto_ticker, $timestamp, $timespan, $window, $series_type, $expand_underlying, $order, $limit, $timestamp_gte, $timestamp_gt, $timestamp_lte, $timestamp_lt): \OpenAPI\Client\Model\CryptoSMA200Response |
| 184 | +``` |
| 185 | + |
| 186 | +Simple Moving Average (SMA) |
| 187 | + |
| 188 | +Get the simple moving average (SMA) for a ticker symbol over a given time range. |
| 189 | + |
| 190 | +### Example |
| 191 | + |
| 192 | +```php |
| 193 | +<?php |
| 194 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 195 | + |
| 196 | + |
| 197 | +// Configure API key authorization: apiKey |
| 198 | +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('apiKey', 'YOUR_API_KEY'); |
| 199 | +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 200 | +// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apiKey', 'Bearer'); |
| 201 | + |
| 202 | + |
| 203 | +$apiInstance = new OpenAPI\Client\Api\CrpytoaggregatesApi( |
| 204 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 205 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 206 | + new GuzzleHttp\Client(), |
| 207 | + $config |
| 208 | +); |
| 209 | +$crypto_ticker = X:BTCUSD; // string | The ticker symbol for which to get simple moving average (SMA) data. |
| 210 | +$timestamp = 'timestamp_example'; // string | Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. |
| 211 | +$timespan = day; // string | The size of the aggregate time window. |
| 212 | +$window = 50; // int | The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average. |
| 213 | +$series_type = close; // string | The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to calculate the simple moving average (SMA). |
| 214 | +$expand_underlying = false; // bool | Whether or not to include the aggregates used to calculate this indicator in the response. |
| 215 | +$order = desc; // string | The order in which to return the results, ordered by timestamp. |
| 216 | +$limit = 10; // int | Limit the number of results returned, default is 10 and max is 5000 |
| 217 | +$timestamp_gte = 'timestamp_gte_example'; // string | Range by timestamp. |
| 218 | +$timestamp_gt = 'timestamp_gt_example'; // string | Range by timestamp. |
| 219 | +$timestamp_lte = 'timestamp_lte_example'; // string | Range by timestamp. |
| 220 | +$timestamp_lt = 'timestamp_lt_example'; // string | Range by timestamp. |
| 221 | + |
| 222 | +try { |
| 223 | + $result = $apiInstance->cryptoSMA($crypto_ticker, $timestamp, $timespan, $window, $series_type, $expand_underlying, $order, $limit, $timestamp_gte, $timestamp_gt, $timestamp_lte, $timestamp_lt); |
| 224 | + print_r($result); |
| 225 | +} catch (Exception $e) { |
| 226 | + echo 'Exception when calling CrpytoaggregatesApi->cryptoSMA: ', $e->getMessage(), PHP_EOL; |
| 227 | +} |
| 228 | +``` |
| 229 | + |
| 230 | +### Parameters |
| 231 | + |
| 232 | +| Name | Type | Description | Notes | |
| 233 | +| ------------- | ------------- | ------------- | ------------- | |
| 234 | +| **crypto_ticker** | **string**| The ticker symbol for which to get simple moving average (SMA) data. | | |
| 235 | +| **timestamp** | **string**| Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. | [optional] | |
| 236 | +| **timespan** | **string**| The size of the aggregate time window. | [optional] [default to 'day'] | |
| 237 | +| **window** | **int**| The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average. | [optional] [default to 50] | |
| 238 | +| **series_type** | **string**| The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to calculate the simple moving average (SMA). | [optional] [default to 'close'] | |
| 239 | +| **expand_underlying** | **bool**| Whether or not to include the aggregates used to calculate this indicator in the response. | [optional] [default to false] | |
| 240 | +| **order** | **string**| The order in which to return the results, ordered by timestamp. | [optional] [default to 'desc'] | |
| 241 | +| **limit** | **int**| Limit the number of results returned, default is 10 and max is 5000 | [optional] [default to 10] | |
| 242 | +| **timestamp_gte** | **string**| Range by timestamp. | [optional] | |
| 243 | +| **timestamp_gt** | **string**| Range by timestamp. | [optional] | |
| 244 | +| **timestamp_lte** | **string**| Range by timestamp. | [optional] | |
| 245 | +| **timestamp_lt** | **string**| Range by timestamp. | [optional] | |
| 246 | + |
| 247 | +### Return type |
| 248 | + |
| 249 | +[**\OpenAPI\Client\Model\CryptoSMA200Response**](../Model/CryptoSMA200Response.md) |
| 250 | + |
| 251 | +### Authorization |
| 252 | + |
| 253 | +[apiKey](../../README.md#apiKey) |
| 254 | + |
| 255 | +### HTTP request headers |
| 256 | + |
| 257 | +- **Content-Type**: Not defined |
| 258 | +- **Accept**: `application/json`, `text/csv` |
| 259 | + |
| 260 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 261 | +[[Back to Model list]](../../README.md#models) |
| 262 | +[[Back to README]](../../README.md) |
0 commit comments