Unable to connect to the tradeapi server (sandbox or live)
Created at 22 Nov 2016, 14:36
RK
Unable to connect to the tradeapi server (sandbox or live)
22 Nov 2016, 14:36
Hi!
i am unable to connect to the tradeapi server (both sandbox & live) due to a server timeout.
Am using python ssl to connect:
context = ssl.create_default_context() ssl_socket = context.wrap_socket(socket.socket(socket.AF_INET), server_hostname=hostname) ssl_connection = ssl_socket.connect((hostname, hostport))
where the time out exception is:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/___/spotware/api/trading_api.py", line 69, in connect ssl_connection = ssl_socket.connect((hostname, hostport)) File "/___/lib/python3.5/ssl.py", line 1019, in connect self._real_connect(addr, False) File "/___/lib/python3.5/ssl.py", line 1006, in _real_connect socket.connect(self, addr) TimeoutError: [Errno 60] Operation timed out
Are there any parameters/config to be done when using the trading api?
Thanks
Rajeev
rkaramc@gmail.com
22 Nov 2016, 14:37
RE:
(hostname, hostport) are ('sandbox-tradeapi.spotware.com',5032) for the sandbox, and ('tradeapi.spotware.com',5032) for the live server..
Thanks
Rajeev
@rkaramc@gmail.com