Skip to content

Latest commit

 

History

History
538 lines (379 loc) · 20.8 KB

SecurityApi.md

File metadata and controls

538 lines (379 loc) · 20.8 KB

intrinio_sdk.SecurityApi

All URIs are relative to https://api-v2.intrinio.com

Method HTTP request Description
get_all_securities GET /securities All Securities
get_security_by_id GET /securities/{identifier} Lookup Security
get_security_data_point_number GET /securities/{identifier}/data_point/{tag}/number Data Point (Number) for Security
get_security_data_point_text GET /securities/{identifier}/data_point/{tag}/text Data Point (Text) for Security
get_security_historical_data GET /securities/{identifier}/historical_data/{tag} Historical Data for Security
get_security_latest_dividend_record GET /securities/{identifier}/dividends/latest Lastest Dividend Record for Security
get_security_latest_earnings_record GET /securities/{identifier}/earnings/latest Lastest Earnings Record for Security
get_security_realtime_price GET /securities/{identifier}/prices/realtime Realtime Stock Price for Security
get_security_stock_price_adjustments GET /securities/{identifier}/prices/adjustments Stock Price Adjustments by Security
get_security_stock_prices GET /securities/{identifier}/prices Stock Prices by Security
screen_securities POST /securities/screen Screen Securities
search_securities GET /securities/search Search Securities

get_all_securities

ApiResponseSecurities get_all_securities(next_page=next_page)

All Securities

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

next_page = '' # str | Gets the next page of data from a previous API call (optional)

try:
    api_response = security_api.get_all_securities(next_page=next_page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_all_securities: %s\n" % e)

Parameters

Name Type Description Notes
next_page str Gets the next page of data from a previous API call [optional]

Return type

ApiResponseSecurities

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

get_security_by_id

Security get_security_by_id(identifier)

Lookup Security

Returns the Security with the given identifier

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)

try:
    api_response = security_api.get_security_by_id(identifier)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_security_by_id: %s\n" % e)

Parameters

Name Type Description Notes
identifier str A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)

Return type

Security

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

get_security_data_point_number

float get_security_data_point_number(identifier, tag)

Data Point (Number) for Security

Returns a numeric value for the given tag for the Security with the given identifier

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
tag = '52_week_high' # str | An Intrinio data tag ID or code-name

try:
    api_response = security_api.get_security_data_point_number(identifier, tag)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_security_data_point_number: %s\n" % e)

Parameters

Name Type Description Notes
identifier str A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
tag str An Intrinio data tag ID or code-name

Return type

float

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

get_security_data_point_text

str get_security_data_point_text(identifier, tag)

Data Point (Text) for Security

Returns a text value for the given tag for the Security with the given identifier

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
tag = 'figi' # str | An Intrinio data tag ID or code-name

try:
    api_response = security_api.get_security_data_point_text(identifier, tag)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_security_data_point_text: %s\n" % e)

Parameters

Name Type Description Notes
identifier str A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
tag str An Intrinio data tag ID or code-name

Return type

str

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

get_security_historical_data

ApiResponseSecurityHistoricalData get_security_historical_data(identifier, tag, frequency=frequency, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, next_page=next_page)

Historical Data for Security

Returns historical values for the given tag and the Security with the given identifier

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
tag = 'volume' # str | An Intrinio data tag ID or code-name
frequency = 'daily' # str | Return historical data in the given frequency (optional) (default to daily)
type = '' # str | Filter by type, when applicable (optional)
start_date = '2018-01-01' # date | Get historical data on or after this date (optional)
end_date = '2019-01-01' # date | Get historical date on or before this date (optional)
sort_order = 'desc' # str | Sort by date `asc` or `desc` (optional) (default to desc)
next_page = '' # str | Gets the next page of data from a previous API call (optional)

try:
    api_response = security_api.get_security_historical_data(identifier, tag, frequency=frequency, type=type, start_date=start_date, end_date=end_date, sort_order=sort_order, next_page=next_page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_security_historical_data: %s\n" % e)

Parameters

Name Type Description Notes
identifier str A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
tag str An Intrinio data tag ID or code-name
frequency str Return historical data in the given frequency [optional] [default to daily]
type str Filter by type, when applicable [optional]
start_date date Get historical data on or after this date [optional]
end_date date Get historical date on or before this date [optional]
sort_order str Sort by date `asc` or `desc` [optional] [default to desc]
next_page str Gets the next page of data from a previous API call [optional]

Return type

ApiResponseSecurityHistoricalData

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

get_security_latest_dividend_record

DividendRecord get_security_latest_dividend_record(identifier)

Lastest Dividend Record for Security

Returns the latest available dividend information for the Security with the given identifier

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)

try:
    api_response = security_api.get_security_latest_dividend_record(identifier)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_security_latest_dividend_record: %s\n" % e)

Parameters

Name Type Description Notes
identifier str A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)

Return type

DividendRecord

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

get_security_latest_earnings_record

EarningsRecord get_security_latest_earnings_record(identifier)

Lastest Earnings Record for Security

Returns latest available earnings information for the Security with the given identifier

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)

try:
    api_response = security_api.get_security_latest_earnings_record(identifier)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_security_latest_earnings_record: %s\n" % e)

Parameters

Name Type Description Notes
identifier str A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)

Return type

EarningsRecord

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

get_security_realtime_price

RealtimeStockPrice get_security_realtime_price(identifier, source=source)

Realtime Stock Price for Security

Return the realtime stock price for the Security with the given identifier

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
source = '' # str | Return the realtime price from the specified data source (optional)

try:
    api_response = security_api.get_security_realtime_price(identifier, source=source)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_security_realtime_price: %s\n" % e)

Parameters

Name Type Description Notes
identifier str A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
source str Return the realtime price from the specified data source [optional]

Return type

RealtimeStockPrice

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

get_security_stock_price_adjustments

ApiResponseSecurityStockPriceAdjustments get_security_stock_price_adjustments(identifier, start_date=start_date, end_date=end_date, next_page=next_page)

Stock Price Adjustments by Security

Returns stock price adjustments for the Security with the given identifier

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
start_date = '2018-01-01' # date | Return price adjustments on or after the date (optional)
end_date = '2019-01-01' # date | Return price adjustments on or before the date (optional)
next_page = '' # str | Gets the next page of data from a previous API call (optional)

try:
    api_response = security_api.get_security_stock_price_adjustments(identifier, start_date=start_date, end_date=end_date, next_page=next_page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_security_stock_price_adjustments: %s\n" % e)

Parameters

Name Type Description Notes
identifier str A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
start_date date Return price adjustments on or after the date [optional]
end_date date Return price adjustments on or before the date [optional]
next_page str Gets the next page of data from a previous API call [optional]

Return type

ApiResponseSecurityStockPriceAdjustments

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

get_security_stock_prices

ApiResponseSecurityStockPrices get_security_stock_prices(identifier, start_date=start_date, end_date=end_date, frequency=frequency, next_page=next_page)

Stock Prices by Security

Return end-of-day stock prices for the Security with the given identifier

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
start_date = '2018-01-01' # date | Return prices on or after the date (optional)
end_date = '2019-01-01' # date | Return prices on or before the date (optional)
frequency = 'daily' # str | Return stock prices in the given frequency (optional) (default to daily)
next_page = '' # str | Gets the next page of data from a previous API call (optional)

try:
    api_response = security_api.get_security_stock_prices(identifier, start_date=start_date, end_date=end_date, frequency=frequency, next_page=next_page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->get_security_stock_prices: %s\n" % e)

Parameters

Name Type Description Notes
identifier str A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
start_date date Return prices on or after the date [optional]
end_date date Return prices on or before the date [optional]
frequency str Return stock prices in the given frequency [optional] [default to daily]
next_page str Gets the next page of data from a previous API call [optional]

Return type

ApiResponseSecurityStockPrices

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

screen_securities

list[SecurityScreenResult] screen_securities(logic=logic, order_column=order_column, order_direction=order_direction, primary_only=primary_only)

Screen Securities

Screen Securities using complex logic

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

logic = intrinio_sdk.SecurityScreenGroup() # SecurityScreenGroup | The logic to screen with, consisting of operators, clauses, and nested groups.<br/> See <a href=\"/documentation/screener_v2\" target=\"_blank\">screener documentation</a> for details on how to construct conditions. (optional)
order_column = 'order_column_example' # str | Results returned sorted by this column (optional)
order_direction = 'asc' # str | Sort order to use with the order_column (optional) (default to asc)
primary_only = False # bool | Return only primary securities (optional) (default to False)

try:
    api_response = security_api.screen_securities(logic=logic, order_column=order_column, order_direction=order_direction, primary_only=primary_only)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->screen_securities: %s\n" % e)

Parameters

Name Type Description Notes
logic SecurityScreenGroup The logic to screen with, consisting of operators, clauses, and nested groups.<br/> See <a href=&quot;/documentation/screener_v2&quot; target=&quot;_blank&quot;>screener documentation</a> for details on how to construct conditions. [optional]
order_column str Results returned sorted by this column [optional]
order_direction str Sort order to use with the order_column [optional] [default to asc]
primary_only bool Return only primary securities [optional] [default to False]

Return type

list[SecurityScreenResult]

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

search_securities

ApiResponseSecurities search_securities(query)

Search Securities

Searches for Securities matching the text query

Example

from __future__ import print_function
import time
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint

intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'YOUR_API_KEY'

security_api = intrinio_sdk.SecurityApi()

query = 'Apple' # str | 

try:
    api_response = security_api.search_securities(query)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SecurityApi->search_securities: %s\n" % e)

Parameters

Name Type Description Notes
query str

Return type

ApiResponseSecurities

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