title: What am I missing to fix my SSL Error related to a finance API?
body: <p>I cannot find a solution when reading through other posts on SOF. Every demo and youtube is able to run a different scenario than the code listed below and get an output without an error.</p>
  <p>I've found many solutions for other codes I've written on SOF, but after an entire weekend looking for something, I've decided to make a post about it.</p>
  <p>Thanks in advance!</p>
  <p>My code:</p>
  <pre><code>import requests
  
  url = &quot;https://alpha-vantage.p.rapidapi.com/query&quot;
  
  querystring = {&quot;symbol&quot;:&quot;TSLA&quot;,&quot;function&quot;:&quot;GLOBAL_QUOTE&quot;}
  
  headers = {
      'x-rapidapi-host': &quot;alpha-vantage.p.rapidapi.com&quot;,
      'x-rapidapi-key': &quot;4f4624778bmsh7bd5b2d7f4e011ap154d47jsn07dedf36b055&quot;
      }
  
  response = requests.request(&quot;GET&quot;, url, headers=headers, params=querystring)
  
  print(response.text)
  </code></pre>
  <p><strong>Parts of the error:</strong></p>
  <pre><code>Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]
  
  During handling of the above exception, another exception occurred:
  </code></pre>
  <p>then further into it:</p>
  <pre><code>MaxRetryError: HTTPSConnectionPool(host='alpha-vantage.p.rapidapi.com', port=443): Max retries 
  exceeded with url: /query?symbol=TSLA&amp;function=GLOBAL_QUOTE (Caused by SSLError(SSLError(&quot;bad 
  handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify 
  failed')])&quot;)))
  
  During handling of the above exception, another exception occurred:
  </code></pre>
  <p>then at the very end is the following:</p>
  <pre><code>SSLError: HTTPSConnectionPool(host='alpha-vantage.p.rapidapi.com', port=443): Max retries exceeded 
  with url: /query?symbol=TSLA&amp;function=GLOBAL_QUOTE (Caused by SSLError(SSLError(&quot;bad handshake: 
  Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])&quot;)))
  </code></pre>