Giter Club home page Giter Club logo

Comments (4)

dragonflyuk avatar dragonflyuk commented on May 30, 2024 1

Just double checked running 1.0.7 using pip

from ejtraderct.

dragonflyuk avatar dragonflyuk commented on May 30, 2024 1

I have found that if I place 1s sleep between connecting the ctrader, and calling the positions, then I get one position.

So I am now get a single position but I know there are actually 3 positions.

have you loop to get all the positions

for position in positions:
         print(position['pos_id'])

from ejtraderct.

traderpedroso avatar traderpedroso commented on May 30, 2024

I've been playing with the Python API Class, and managed to connect to my broker Pepperstone, however, my first real test is to list open positions, so I've enabled "DEBUG" logging, and used the sample code

positions = api.positions()
print(positions)

Watching the debug code the correct data is in debug logging, however the returned value is []

So then I used Thonny to step through the code, and if I step through my code, the correct data is returned and printed, however if I let the debugger simply run past the code, not result is returned.

Using Python 3.10.6 if it makes any difference.

Thanks.

are you on version 1.0.6 just update to 1.0.7 pip install ejtraderCT -U ou git pull fixed on the last version

from ejtraderct.

traderpedroso avatar traderpedroso commented on May 30, 2024

Just double checked running 1.0.7 using pip

ill open account on ppton to check, thank you and let you know as Sooners possible

from ejtraderct.

Related Issues (20)

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.