The xStation5 API Python library provides a simple and easy-to-use API for interacting with the xStation5 trading platform. With this library, you can connect to the xStation5 platform, retrieve market data, and execute trades.
Hello,
Thanks for this Library!
While working on it I hit the issue, I cannot Close opened transaction, here is my code:
open_trades = await x.socket.getTrades(openedOnly=True)
open_trades = open_trades["returnData"]
for trade in open_trades:
response = await x.socket.tradeTransaction(
symbol=trade['symbol'],
cmd=xapi.TradeCmd(value=trade['cmd']),
type=xapi.TradeType.CLOSE,
price=trade['close_price'],
volume=trade['volume'],
order=trade['order'],
)
API returns error:
{'status': False, 'errorCode': 'SE199', 'errorDescr': 'Internal error'}
any suggestions?
As I understand it, it should return results every 1 minute. Unfortunately, no data is coming in, and I'm not receiving any error or session disconnection information either. Am I correct in assuming that the XTB operator has stopped sending data in response to this request?
Hi, please excuse my ignorance and lack of experience, but how can I explain such a significant difference between what I see on the real chart in XTB and what I get from xapi? EURUSD in XTB bid: 1.8244 and in xapi: bid: 1.08239. Example shown in the screenshot.