OptionChains
extends ResponseBase
in package
Represents a collection of option chains with associated data.
Table of Contents
Properties
- $next_time : Carbon
- Time of the next quote if there is no data in the requested period, but there is data in a subsequent period.
- $option_chains : array<string, array<string|int, OptionChainStrike>>
- Multidimensional array of OptionChainStrike objects organized by date.
- $prev_time : Carbon
- Time of the previous quote if there is no data in the requested period, but there is data in a previous period.
- $status : string
- Status of the option chains request. Will always be ok when there is the quote requested.
- $csv : string
- $html : string
Methods
- __construct() : mixed
- Constructs a new OptionChains instance from the given response object.
- getCsv() : string
- Get the CSV content of the response.
- getHtml() : string
- Get the HTML content of the response.
- isCsv() : bool
- Check if the response is in CSV format.
- isHtml() : bool
- Check if the response is in HTML format.
- isJson() : bool
- Check if the response is in JSON format.
Properties
$next_time
Time of the next quote if there is no data in the requested period, but there is data in a subsequent period.
public
Carbon
$next_time
$option_chains
Multidimensional array of OptionChainStrike objects organized by date.
public
array<string, array<string|int, OptionChainStrike>>
$option_chains
= []
$prev_time
Time of the previous quote if there is no data in the requested period, but there is data in a previous period.
public
Carbon
$prev_time
$status
Status of the option chains request. Will always be ok when there is the quote requested.
public
string
$status
$csv
protected
string
$csv
The CSV content of the response.
$html
protected
string
$html
The HTML content of the response.
Methods
__construct()
Constructs a new OptionChains instance from the given response object.
public
__construct(object $response) : mixed
Parameters
- $response : object
-
The response object containing option chains data.
getCsv()
Get the CSV content of the response.
public
getCsv() : string
Return values
string —The CSV content.
getHtml()
Get the HTML content of the response.
public
getHtml() : string
Return values
string —The HTML content.
isCsv()
Check if the response is in CSV format.
public
isCsv() : bool
Return values
bool —True if the response is in CSV format, false otherwise.
isHtml()
Check if the response is in HTML format.
public
isHtml() : bool
Return values
bool —True if the response is in HTML format, false otherwise.
isJson()
Check if the response is in JSON format.
public
isJson() : bool
Return values
bool —True if the response is in JSON format, false otherwise.