Skip to content

Latest commit

 

History

History
127 lines (84 loc) · 3.56 KB

ReferencestocksmarketApi.md

File metadata and controls

127 lines (84 loc) · 3.56 KB

OpenAPI\Client\ReferencestocksmarketApi

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()

getMarketHolidays(): \OpenAPI\Client\Model\GetMarketHolidays200ResponseInner[]

Market Holidays

Get upcoming market holidays and their open/close times.

Example

<?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;
}

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\GetMarketHolidays200ResponseInner[]

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMarketStatus()

getMarketStatus(): \OpenAPI\Client\Model\GetMarketStatus200Response

Market Status

Get the current trading status of the exchanges and overall financial markets.

Example

<?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;
}

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\GetMarketStatus200Response

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]