Datastream Python API

Hi,

when attempting to connect to the DataStream API via Python, I receive the following connection error:


ConnectionError: HTTPSConnectionPool(host='product.datastream.com', port=443): Max retries exceeded with url: /dswsclient/V1/DSService.svc/rest/GetToken (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000176423F7780>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))


I believe that the IT unit in our bank has not correctly configurated all elements of the firewall. Can I ascertain from this message what should be changed in the firewall to get the connection to work?

Best,

Thomas

Best Answer

Answers

  • Hi @thomas.osowski ,

    Yes, you could check if your machine can resolve and connect to the host product.datastream.com , as answered in this thread that

    You could use network tools to verify that your machine can resolve the host product.datastream.com, and that it can connect to it. You can try:

    telnet product.datastream.com 443

    If this command fails and you know that there is a proxy server on your network, then you will have to explicitly pass that proxy URL/port to the DSWS library.

  • Dear Raksina,

    thanks for your comment. Indeed, the port appears to be blocked.

    In order to communicate efficiently which Ports / Procedures / etc has to be opened to our IT Department:


    Do you have a comprehensive summary of everything that needs to be opened up regarding the firefall to use Datastream via python?

    Best,

    Thomas



  • Hello @thomas.osowski

    Thank you for contacting us. I am asking the Datastream API team about the question.
    I will get back to you as soon as I receive any information from the team.

  • Hello @thomas.osowski

    I just got information from the Datastream API team. The API does not have any network guides. However, the team confirms my colleague @jonathan.legrand answer is the suggested configuration.