Giter Club home page Giter Club logo

Comments (2)

brndnmtthws avatar brndnmtthws commented on May 26, 2024

In this particular case, it looks like thetagang is waiting for the order status to change from PendingSubmit or PreSubmitted to Submitted. Looks like the issue is with MGA, but I can't really tell you why the order isn't submitting. In this particular case it might be a harmless error/delay, assuming the order does eventually submit. Thetagang is a bit strict in that it waits for the orders to reach a submitted state before proceeding, which might occasionally result in this error.

One option is to increase the amount of time it will wait for the API by adjusting the ib_insync.api_response_wait_time value in thetagang.toml, which is 60s by default. You could try 90 or 120s if you keep hitting this. Note that this affects all API calls, so it could introduce unwanted delays elsewhere.

In my experience, this happens sometimes with any lower volume stocks/ETFs (for whatever reason IBKR waits to submit the order to an exchange, and I suppose it does this to avoid bad fills or because they're waiting to sell the order flow for a bit of $$$).

There's a little more information on the order statuses (under the header "Possible Order States") here: https://interactivebrokers.github.io/tws-api/order_submission.html

from thetagang.

robby28-11 avatar robby28-11 commented on May 26, 2024

Already changed that to 120, but it still threw the error. Nevertheless the orders were transmitted to IBKR.
Haven't seen the error with the orders afterwards.

from thetagang.

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.