4

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

1
  • error suggests you have to create different account - or on different platform/portal - and probably code has nothing to do with this problem. Better ask XTB's admins for help.
    – furas
    Commented May 17, 2021 at 23:18

1 Answer 1

8

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 :/

1
  • Great !!! just be careful those copying the shell declarations as it is mispelled DEFAULT for the STREAMING one. Commented Aug 30 at 9:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.