Reputation: 121
I know this XTB question could be rare but I find troubles and I want to know if somebody has connected an API from XTB. My problem is the following:
I have downloaded a wrapper for python from this url : http://developers.xstore.pro/api/wrappers/2.5.0
XTB can have 2 types of account: Demo & Real. For demo account the streaming and no-streaming methods work, but when I try to connect to a REAL account I got this error:
{'status': False, 'errorCode': 'EX017', 'errorDescr': 'You are trying to login using the account from
a different platform'}
So, if somebody can help me out in how to use the wrapper to connect to REAL acoount would be great.
Thanks
Upvotes: 4
Views: 2940
Reputation: 733
The wrapper uses demo port numbers, to connect to the live API you need to change the ports:
DEFAULT_XAPI_PORT = 5112
DEFUALT_XAPI_STREAMING_PORT = 5113
This is described in the documentation, section 4:
Here are the details of DEMO and REAL servers hosted on each of the addresses above:
DEMO: main port: 5124, streaming port: 5125, REAL: main port: 5112, streaming port: 5113.
Just spent half an hour solving this problem :/
Upvotes: 8