Interval Stock Prices for Security

Interval Stock Prices for Security Ruby API Documentation

Return open, close, high, low, volume, average price, and change ratio for a particular interval for the Security with the given `identifier`

API Class:
Intrinio::SecurityApi
Instance Method:
get_security_interval_prices()

Stock Price Code Example

Use my API Key
# Load the gem
require 'intrinio-sdk'
require 'pp'
# Setup authorization
Intrinio.configure do |config|
config.api_key['api_key'] = 'YOUR_API_KEY'
config.allow_retries = true
end
security_api = Intrinio::SecurityApi.new
identifier = "AAPL"
interval_size = "15m"
opts = {
source: nil,
start_date: Date.parse("2023-01-01"),
start_time: 33300,
end_date: Date.parse("2023-02-01"),
end_time: 33300,
timezone: "UTC",
page_size: 100,
split_adjusted: false,
include_quote_only_bars: false,
next_page: nil
}
result = security_api.get_security_interval_prices(identifier, interval_size, opts)
pp result
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierStringA Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) 
interval_sizeStringThe interval for which to return stock prices[default to 15m]  
sourceStringReturn intervals from the specified data source[optional]  
start_dateDateReturn intervals starting at the specified date[optional]  
start_timeStringReturn intervals starting at the specified time on the `start_date` (24-hour in ‘hh:mm:ss' format)[optional]  
end_dateDateReturn intervals stopping at the specified date[optional]  
end_timeStringReturn intervals stopping at the specified time on the `end_date` (24-hour in ‘hh:mm:ss' format)[optional]  
timezoneStringInterprets the input times in this time zone, as well as returns times in this timezone.[optional] [default to UTC]  
page_sizeIntegerThe number of results to return[optional] [default to 100]  
split_adjustedBOOLEANWhether to return the values adjusted for splits or not. Default is false.[optional] [default to false]  
include_quote_only_barsBOOLEANIf true, also include bars where no trades occurred but quotes did.[optional] [default to false]  
next_pageStringGets the next page of data from a previous API call[optional]  

Return Type

object
Intrinio::ApiResponseSecurityIntervalPrices

Properties

NameTypeDescription
intervalsArrayOpen, close, high, low, volume, average price, and change ratio for a particular interval  
securitySecuritySummaryThe Security resolved from the given identifier  
sourceStringThe source of the data  
next_pageStringThe token required to request the next page of the data. If null, no further results are available.  
object
Intrinio::StockPriceInterval

Properties

NameTypeDescription
timeDateTimeThe timestamp that represents the start of the interval span.  
openFloatThe first traded price during the period  
closeFloatThe last traded price during the period  
highFloatThe highest price over the span of the period  
lowFloatThe lowest price over the span of the period  
volumeFloatThe number of shares exchanged during the period  
close_timeDateTimeThe timestamp that represents the end of the interval span.  
intervalStringThe size of the interval.  
averageFloatThe average trade price of an individual stock during the interval.  
changeFloatThe change ratio from open to close. ((Close - Open)/Open).  
bid_highFloatThe highest bid price from the interval.  
bid_lowFloatThe lowest bid price from the interval.  
bid_closeFloatThe last bid price from the interval.  
bid_openFloatThe first bid price from the interval.  
bid_first_timeDateTimeThe timestamp that represents the first bid time from the interval span.  
bid_last_timeDateTimeThe timestamp that represents the last bid time from the interval span.  
bid_change_percentFloatThe ratio of the close to open bid difference, in percent.  
ask_highFloatThe highest ask price from the interval.  
ask_lowFloatThe lowest ask price from the interval.  
ask_closeFloatThe last ask price from the interval.  
ask_openFloatThe first ask price from the interval.  
ask_first_timeDateTimeThe timestamp that represents the first ask time from the interval span.  
ask_last_timeDateTimeThe timestamp that represents the last ask time from the interval span.  
ask_change_percentFloatThe ratio of the close to open ask difference, in percent.  
trade_countFloatThe number of qualified trades executed during the period  
object
Intrinio::SecuritySummary

Properties

NameTypeDescription
idStringThe Intrinio ID for Security  
company_idStringThe Intrinio ID for the Company for which the Security is issued  
exchangeStringThe exchange's MIC  
exchange_micStringThe security's exchange MIC  
stock_exchange_idStringThe exchange's Intrinio ID  
nameStringThe name of the Security  
codeStringA 2-3 digit code classifying the Security (reference)  
currencyStringThe currency in which the Security is traded on the exchange  
tickerStringThe common/local ticker of the Security  
composite_tickerStringThe country-composite ticker of the Security  
figiStringThe OpenFIGI identifier  
composite_figiStringThe country-composite OpenFIGI identifier  
share_class_figiStringThe global-composite OpenFIGI identifier  
primary_listingBOOLEANIf true, the Security is the primary issue for the company, otherwise it is a secondary issue on a secondary stock exchange