Code Monkey home page Code Monkey logo

pawelkn / xapi-python Goto Github PK

View Code? Open in Web Editor NEW
26.0 6.0 4.0 54 KB

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.

License: MIT License

Python 100.00%
python forex trading trading-api websocket exchange-api forex-data forex-trading x-trade-brokers xapi xopenhub-api xstation-api xstation5 xtb xtb-api xstation bitcoin python3

xapi-python's Issues

Close transaction throws error

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?

getCandles

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?

Difference between the real chart in XTB and xapi

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.


Zrzut ekranu 2024-07-31 o 06 51 12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.