intrinio-jcarr/realtime-stock-price.py

18 lines
487 B
Python
Executable File

#!/usr/bin/python3
# https://docs.intrinio.com/documentation/python/get_security_snapshots_v2
from __future__ import print_function
import time
import intrinio_sdk as intrinio
from intrinio_sdk.rest import ApiException
intrinio.ApiClient().set_api_key('OjZjZGIzZmYyNDg4NDZjYjQ4NzAzMzAyZjg0OTU5MDcz')
intrinio.ApiClient().allow_retries(True)
identifier = 'AAPL'
source = 'bats'
response = intrinio.SecurityApi().get_security_realtime_price(identifier, source=source)
print(response)