GithubHelp home page GithubHelp logo

pawelkn / xapi-python Goto Github PK

View Code? Open in Web Editor NEW
23.0 5.0 3.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

xapi-python's People

Contributors

chapnitsky avatar pawelkn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xapi-python's Issues

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?

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?

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.