don't have access to real time stock price

This commit is contained in:
Jeff Carr 2022-11-03 03:10:35 -05:00
parent bcad060859
commit bcf3f2d6e6
1 changed files with 17 additions and 0 deletions

17
realtime-stock-price.py Executable file
View File

@ -0,0 +1,17 @@
#!/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)