Downloading the dataset

This section describes the steps for downloading our required prices and technical indicator values from Intrinio. Comprehensive documentation on the API calls can be found at https://docs.intrinio.com/documentation/api_v2. If you decide to use another data provider, go ahead and skip this section:

  1. Write a query_intrinio() function that will make an API call to Intrinio, with the following codes:
In [ ]:    import requests    BASE_URL = 'https://api-v2.intrinio.com'    # REPLACE YOUR INTRINIO API KEY HERE!    INTRINIO_API_KEY = 'Ojc3NjkzOGNmNDMxMGFiZWZiMmMxMmY0Yjk3MTQzYjdh'    def query_intrinio(path, **kwargs):           url = '%s%s'%(BASE_URL, path)        kwargs['api_key'] = INTRINIO_API_KEY        response = requests.get(url, params=kwargs) status_code ...

Get Mastering Python for Finance - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.