Security Trades

Security Trades Ruby API Documentation

Returns all trades between start time and end time, up to seven days ago for the specified source.

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

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
source = nil
opts = {
start_date: nil,
start_time: nil,
end_date: nil,
end_time: nil,
timezone: "UTC",
page_size: 100,
darkpool_only: false,
min_size: 100,
next_page: nil
}
result = security_api.get_security_trades(source, opts)
pp result
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
sourceStringThe specific source of the data being requested. 
start_dateDateThe start date for the data being requested.[optional]  
start_timeStringThe start time for the data being requested.[optional]  
end_dateDateThe end date for the data being requested.[optional]  
end_timeStringThe end time for the data being requested.[optional]  
timezoneStringThe timezone the start and end date/times use.[optional] [default to UTC]  
page_sizeIntegerThe maximum number of results to return per page.[optional] [default to 100]  
darkpool_onlyBOOLEANSet to true to show only darkpool trades[optional] [default to false]  
min_sizeIntegerTrades must be larger or equal to this size.[optional]  
next_pageStringGets the next page of data from a previous API call[optional]  

Return Type

object
Intrinio::SecurityTradesResult

Properties

NameTypeDescription
next_pageStringThe token required to request the next page of the data. If null, no further results are available.  
sourceStringThe source of the trades.  
tradesArrayArray of all the trades in this page of the result.  
object
Intrinio::SecurityTrades

Properties

NameTypeDescription
symbolStringThe ticker symbol  
timestampDateTimeThe UTC timestamp at the time of the trade.  
priceFloatThe price of the trade.  
sizeFloatThe size of the trade.  
total_volumeFloatThe total volume of the symbol for the day up to the timestamp point in time.  
market_centerStringThe market center for the trade.  
conditionStringThe condition of the trade.  
is_darkpoolBOOLEANIf the trade was darkpool or not.