# API connection error

**URL:** <https://forum.celo.org/t/api-connection-error/667>\
**Category:** Dapps\
**Created:** [November 6, 2020, 3:02pm UTC](https://forum.celo.org/t/api-connection-error/667 "2020-11-06T15:02:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tammatammy](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@tammatammy](https://forum.celo.org/u/tammatammy)\
**Post date:** [November 6, 2020, 3:02pm UTC](https://forum.celo.org/t/api-connection-error/667/1 "2020-11-06T15:02:52Z")

</div>

Hi,

I tried to request historical block data (by Python) using the Celo API but I have kept receiving a connection error as beow. The API document did not mention GraphQL is available for this type of data

Sample code:  
import requests  
requests.get(‘[https://localhost:4000/api?module=stats&action=ethsupplyexchange](https://localhost:4000/api?module=stats&action=ethsupplyexchange)’,verify=False)

Error Message:  
ConnectionError: HTTPConnectionPool(host=‘localhost’, port=4000): Max retries exceeded with url: /api?module=stats&action=ethsupplyexchange (Caused by NewConnectionError(’\<urllib3.connection.HTTPConnection object at 0x00000231AA8EFB

Has anyone run into this before? Thanks!
