question

Upvotes
Accepted
3 0 1 4

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

#technologypython apidatastream-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
5.9k 21 2 6

Hi @thomas.osowski ,

The URL is product.datastream.com
The port number is 443.
The procedure is HTTPS and TLS 1.2.
We suggest NOT connecting to IPs but rather the DNS product.datastream.com

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
14.4k 30 5 10

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 0 1 4

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



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25.1k 57 17 14

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25.1k 57 17 14

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.