All URIs are relative to https://api.polygon.io, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
getMarketHolidays() | GET /v1/marketstatus/upcoming | Market Holidays |
getMarketStatus() | GET /v1/marketstatus/now | Market Status |
getMarketHolidays(): \OpenAPI\Client\Model\GetMarketHolidays200ResponseInner[]
Market Holidays
Get upcoming market holidays and their open/close times.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKey
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('apiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apiKey', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\ReferencestocksmarketApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->getMarketHolidays();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReferencestocksmarketApi->getMarketHolidays: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\OpenAPI\Client\Model\GetMarketHolidays200ResponseInner[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getMarketStatus(): \OpenAPI\Client\Model\GetMarketStatus200Response
Market Status
Get the current trading status of the exchanges and overall financial markets.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKey
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('apiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apiKey', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\ReferencestocksmarketApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->getMarketStatus();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReferencestocksmarketApi->getMarketStatus: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\OpenAPI\Client\Model\GetMarketStatus200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]