Ruby SDK

  6.35.0

The Intrinio Ruby SDK wraps all API endpoints into an easy-to-use set of classes, methods, and response objects.

Ruby SDK Installation

To install the SDK use RubyGems:

gem install intrinio-sdk

Be sure to require the SDK in your code as follows:

require 'intrinio-sdk'
View Ruby SDK on GitHub

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"
opts = {
source: ["iex,delayed_sip"]
}
result = security_api.get_security_realtime_price(identifier, opts)
pp result
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierStringA Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) 
sourceArrayReturn the realtime price from the specified comma-delimited data sources. If no source is specified, the best source available is used.[optional]  

Return Type

object
Intrinio::RealtimeStockPrice

Properties

NameTypeDescription
last_priceFloatThe price of the last trade.  
last_timeDateTimeThe date and time when the last trade occurred.  
last_sizeFloatThe size of the last trade.  
bid_priceFloatThe price of the top bid order.  
bid_sizeFloatThe size of the top bid order.  
bid_timeDateTimeThe date and time when the last bid occurred.  
ask_priceFloatThe price of the top ask order.  
ask_sizeFloatThe size of the top ask order.  
ask_timeDateTimeThe date and time when the last ask occurred.  
open_priceFloatThe price at the open of the trading day.  
close_priceFloatThe price at the close of the trading day. (IEX only)  
high_priceFloatThe high price for the trading day.  
low_priceFloatThe low price for the trading day.  
exchange_volumeFloatThe number of shares exchanged during the trading day on the exchange.  
market_volumeFloatThe number of shares exchanged during the trading day for the whole market.  
updated_onDateTimeThe date and time when the data was last updated.  
eod_close_priceFloatThe previous trading session's closing price.  
eod_close_dateDateThe date of the previous trading session's closing price.  
normal_market_hours_last_timeDateTimeThe date and time of the last trade that qualifies for last price consideration during normal market hours according to exchange rules on trade conditions.  
normal_market_hours_last_priceFloatThe price of the last that qualifies for last price consideration during normal market hours according to exchange rules on trade conditions.  
normal_market_hours_last_sizeFloatThe size of the last trade that qualifies for last price consideration during normal market hours according to exchange rules on trade conditions.  
qualified_last_priceFloatThe price of the last trade that qualifies for last price consideration according to exchange rules on trade conditions.  
qualified_last_timeDateTimeThe date and time of the last trade that qualifies for last price consideration according to exchange rules on trade conditions.  
qualified_last_sizeFloatThe size of the last trade that qualifies for last price consideration according to exchange rules on trade conditions.  
sourceStringThe source of the data.  
listing_venueStringThe listing venue where the trade took place. Available only where source is SIP. Listing Venue Modifiers include: Q – NasdaqN – NYSEA – NYSE AmericanP – NYSE Arcau – Other OTC MarketsV – Investors Exchange LLC  
sales_conditionsStringWhen applicable, indicates any sales condition modifiers associated with the trade. Sales Condition Modifers include: @ – Regular SaleA – AcquisitionB – Bunched TradeC – Cash SaleD – DistributionE – PlaceholderF – Intermarket SweepG – Bunched Sold TradeH – Priced Variation TradeI – Odd Lot TradeK – Rule 155 Trade (AMEX)L – Sold LastM – Market Center Official CloseN – Next DayO – Opening PrintsP – Prior Reference PriceQ – Market Center Official OpenR – SellerS – Split TradeT – Form TU – Extended Trading Hours (Sold Out of Sequence)V – Contingent TradeW – Average Price TradeX – Cross/Periodic Auction TradeY – Yellow Flag Regular TradeZ – Sold (Out of Sequence)1 – Stopped Stock (Regular Trade)4 – Derivatively Priced5 – Re-Opening Prints6 – Closing Prints7 – Qualified Contingent Trade (QCT)8 – Placeholder for 611 Exempt9 – Corrected Consolidated Close (Per Listing Market)  
quote_conditionsStringWhen applicable, indicates any quote condition modifiers associated with the trade. Quote Condition Modifiers include: R – RegularA – Slow on Ask– Slow on BidC – ClosingD – News DisseminationF – Slow on ASK (LRP or Gap Quote)E – Slow on Bid (LRP or Gap Quote)G – Trading Range IndicationH – Slow on Bid and AskI – Order ImbalanceJ – Due to Related - News DisseminationK – Due to Related - News PendingO – OpenL – ClosedM – Volatility Trading PauseN – Non-Firm QuoteO – OpeningP – News PendingS – Due to RelatedT – ResumeU – Slow on Bid and Ask (LRP or Gap Quote)V – In View of CommonW – Slow on Bid and Ask (LRP or Gap Quote)X – Equipment ChangeoverY – Sub-Penny TradingZ – No Open / No ResumeF – Fast TradingU – Slow on Bid and Ask (Non-Firm)One-Sided – One-SidedX – Order Influx0 – Special Opening QuoteHalted – HaltedBenchmark – BenchmarkImplied – ImpliedExchange Best – Exchange Best1 – Market Wide Circuit Breaker Level 12 – Market Wide Circuit Breaker Level 23 – Market Wide Circuit Breaker Level 3Rotation – RotationAuto Exec Eligible – Auto Exec EligibleBid Side Firm – Bid Side FirmAsk Side Firm – Ask Side Firm4 – On Demand Intraday AuctionI – Indicative Value (OPRA)45 – Additional Information Required (CTS)46 – Regulatory Concern (CTS)47 – Merger Effective49 – Corporate Action (CTS)50 – New Security Offering (CTS)51 – Intraday Indicative Value Unavailable (CTS)  
market_center_codeStringThe market center character code.  
is_darkpoolBOOLEANWhether or not the current trade is from a darkpool or not.  
securityRealtimeStockPriceSecurity 
object
Intrinio::RealtimeStockPriceSecurity

Properties

NameTypeDescription
idStringThe Intrinio ID for Security  
tickerStringThe common/local ticker of the Security  
exchange_tickerStringThe exchange-level ticker  
figiStringThe OpenFIGI identifier  
composite_figiStringThe country-composite OpenFIGI identifier  
View Documentation for Realtime Stock Price for Security Example

Release History

6.35.0

Released 02/26/2025

No notes for this release.

ruby-sdk-source-code-6.35.0.zip

6.34.0

Released 11/27/2024

No release notes for this build.

ruby-sdk-source-code-6.34.0.zip

6.33.0

Released 11/21/2024

No release notes for this build

ruby-sdk-source-code-6.33.0.zip

6.32.0

Released 10/31/2024
ruby-sdk-source-code-6.32.0.zip

6.31.0

Released 09/19/2024

Added stock exchange quote endpoint

ruby-sdk-source-code-6.31.0.zip

6.30.0

Released 08/23/2024

Fix type on one endpoint.
Add quote type fields to equity intervals.

ruby-sdk-source-code-6.30.0.zip

6.29.1

Released 08/10/2024

No description for this build.

ruby-sdk-source-code-6.29.1.zip

6.29.0

Released 08/02/2024

Quote endpoint
Can specify multiple tickers on specific endpoints

ruby-sdk-source-code-6.29.0.zip

6.28.1

Released 07/22/2024
ruby-sdk-source-code-6.28.1.zip

6.28.0

Released 07/22/2024

No release notes for this build

ruby-sdk-source-code-6.28.0.zip

6.27.4

Released 06/25/2024

No release notes for this build.

ruby-sdk-source-code-6.27.4.zip

6.27.3

Released 06/05/2024

No release notes for this build

ruby-sdk-source-code-6.27.3.zip

6.27.2

Released 04/10/2024

Advanced company news endpoints

ruby-sdk-source-code-6.27.2.zip

6.27.1

Released 04/10/2024

Advanced Company News endpoints.

ruby-sdk-source-code-6.27.1.zip

6.27.0

Released 03/11/2024

No release notes for this build.

ruby-sdk-source-code-6.27.0.zip

6.26.8

Released 02/20/2024

Added Zacks Sales Estimate Endpoint

ruby-sdk-source-code-6.26.8.zip

6.26.7

Released 02/06/2024

No release notes for this release.

ruby-sdk-source-code-6.26.7.zip

6.26.6

Released 02/01/2024

No release notes for this build.

ruby-sdk-source-code-6.26.6.zip

6.26.5

Released 12/21/2023

Add extended price fields to options realtime calls
Add bid/ask time and size to options eod calls

ruby-sdk-source-code-6.26.5.zip

6.26.3

Released 12/05/2023

Documentation updates and fixes

ruby-sdk-source-code-6.26.3.zip

6.26.2

Released 11/08/2023

-Adjusting and releasing Company Public Float endpoint.

ruby-sdk-source-code-6.26.2.zip

6.26.1

Released 10/03/2023

Added missing preexisting parameters to the SDK methods.

ruby-sdk-source-code-6.26.1.zip

6.26.0

Released 09/08/2023

Add extra hint message to a Trade Alerts endpoint if user doesn’t have access
Fix enum on depreciated intraday endpoint docs
Add date filters to shares outstanding endpoint
Allow either datetime format for param on snapshot endpoints
Add missing next page param to docs for institutional ownership endpoint
Add documentation for market status endpoint

ruby-sdk-source-code-6.26.0.zip

6.25.0

Released 08/01/2023

Can specify greeks underlying price source in some options calls
Can specify greeks IV method of calculation in some options calls
Update intervals syntax so it can pull from more performant source

ruby-sdk-source-code-6.25.0.zip

6.24.1

Released 07/12/2023
ruby-sdk-source-code-6.24.1.zip

6.24.0

Released 06/14/2023

No release notes for this build

ruby-sdk-source-code-6.24.0.zip

6.23.1

Released 03/28/2023

-Fixed next_page parameter for an endpoint

ruby-sdk-source-code-6.23.1.zip

6.23.0

Released 03/17/2023

Added intervals endpoints and movers endpoints.

ruby-sdk-source-code-6.23.0.zip

6.22.3

Released 01/11/2023

Added options intervals and equitites delayed SIP endpoints
Added Intervals Movers endpoints

ruby-sdk-source-code-6.22.3.zip

6.22.2

Released 09/19/2022
ruby-sdk-source-code-6.22.2.zip