peterszombati / xapi-node

xStation5 Trading API for NodeJS/JS
https://peterszombati.github.io/xapi-node/
Other
57 stars 19 forks source link

[REAL ACCOUNT] EX017 - You are trying to login using the account from a different platform #9

Closed SilvioLuis closed 3 years ago

SilvioLuis commented 3 years ago

First, I want to thank you very much for this repository, it has helped me a lot!

I created an application that uses this module, and in DEMO it works perfectly.

However, when you put the actual data, I get this return:

CODE:

const x = new XAPI({
    accountId: '.....',
    password: '...',
    type: 'real',
  });

RETURN:

{
 code: 'EX017',
 explain: 'You are trying to login using the account from a different platform'
}
artursobon commented 3 years ago

Maybe your real account was created for MetaTrader 4 platform?

peterszombati commented 3 years ago

@SilvioLuis If you are using with XTB account, you should use like this

const x = new XAPI({
    accountId: '...',
    password: '...',
    host: 'ws.xtb.com', // only for XTB accounts
    type: 'real' // or demo
});
SilvioLuis commented 3 years ago

@SilvioLuis If you are using with XTB account, you should use like this

const x = new XAPI({
    accountId: '...',
    password: '...',
    host: 'ws.xtb.com', // only for XTB accounts
    type: 'real' // or demo
});

Thx!!!!