last 90 days of DOCN

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-11-26 23:22:39 -06:00
parent 3332eb1e84
commit 45191cbf84
4 changed files with 1325 additions and 0 deletions

1272
DOCN-last-90DAYS.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,10 @@
# check out this: https://github.com/intrinio/python-sdk.git # check out this: https://github.com/intrinio/python-sdk.git
# then run: python setup.py install --user # then run: python setup.py install --user
docn-stock-price:
./stock_prices-DOCN.py
# ./stock_prices-DOCN.py > DOCN-last-90DAYS.txt
docn-insiders: docn-insiders:
./DOCN-institutional-trans.py ./DOCN-institutional-trans.py

24
stock_prices-AAPL.py Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/python3
from __future__ import print_function
import time
from datetime import datetime, date, timedelta
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint
intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'OjZjZGIzZmYyNDg4NDZjYjQ4NzAzMzAyZjg0OTU5MDcz'
security_api = intrinio_sdk.SecurityApi()
identifier = 'AAPL' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
start_date = str(date.today() - timedelta(days = 90)) # date | Get historical data on or after this date (optional)
end_date = str(date.today()) # date | Get historical date on or before this date (optional)
frequency = 'daily' # str | Sort by date `asc` or `desc` (optional)
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)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityApi->get_security_historical_data: %s\n" % e)

24
stock_prices-DOCN.py Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/python3
from __future__ import print_function
import time
from datetime import datetime, date, timedelta
import intrinio_sdk
from intrinio_sdk.rest import ApiException
from pprint import pprint
intrinio_sdk.ApiClient().configuration.api_key['api_key'] = 'OjZjZGIzZmYyNDg4NDZjYjQ4NzAzMzAyZjg0OTU5MDcz'
security_api = intrinio_sdk.SecurityApi()
identifier = 'DOCN' # str | A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)
start_date = str(date.today() - timedelta(days = 90)) # date | Get historical data on or after this date (optional)
end_date = str(date.today()) # date | Get historical date on or before this date (optional)
frequency = 'daily' # str | Sort by date `asc` or `desc` (optional)
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)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityApi->get_security_historical_data: %s\n" % e)