last 90 days of DOCN
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
3332eb1e84
commit
45191cbf84
File diff suppressed because it is too large
Load Diff
5
Makefile
5
Makefile
|
@ -1,5 +1,10 @@
|
|||
# check out this: https://github.com/intrinio/python-sdk.git
|
||||
# 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-institutional-trans.py
|
||||
|
||||
|
|
|
@ -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)
|
|
@ -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)
|
Loading…
Reference in New Issue